本文整理了Java中org.eclipse.swt.widgets.Shell.getSizeInPixels()
方法的一些代码示例,展示了Shell.getSizeInPixels()
的具体用法。这些代码示例主要来源于Github
/Stackoverflow
/Maven
等平台,是从一些精选项目中提取出来的代码,具有较强的参考意义,能在一定程度帮忙到你。Shell.getSizeInPixels()
方法的具体详情如下:
包路径:org.eclipse.swt.widgets.Shell
类名称:Shell
方法名:getSizeInPixels
暂无
代码示例来源:origin: org.eclipse.scout.sdk.deps/org.eclipse.swt.win32.win32.x86
void setMinimumSizeInPixels (int width, int height) {
int widthLimit = 0, heightLimit = 0;
int trim = SWT.TITLE | SWT.CLOSE | SWT.MIN | SWT.MAX;
if ((style & SWT.NO_TRIM) == 0 && (style & trim) != 0) {
widthLimit = OS.GetSystemMetrics (OS.SM_CXMINTRACK);
if ((style & SWT.RESIZE) != 0) {
heightLimit = OS.GetSystemMetrics (OS.SM_CYMINTRACK);
} else {
RECT rect = new RECT ();
int bits1 = OS.GetWindowLong (handle, OS.GWL_STYLE);
int bits2 = OS.GetWindowLong (handle, OS.GWL_EXSTYLE);
OS.AdjustWindowRectEx (rect, bits1, false, bits2);
heightLimit = rect.bottom - rect.top;
}
}
minWidth = Math.max (widthLimit, width);
minHeight = Math.max (heightLimit, height);
Point size = getSizeInPixels ();
int newWidth = Math.max (size.x, minWidth);
int newHeight = Math.max (size.y, minHeight);
if (minWidth <= widthLimit) minWidth = SWT.DEFAULT;
if (minHeight <= heightLimit) minHeight = SWT.DEFAULT;
if (newWidth != size.x || newHeight != size.y) setSizeInPixels (newWidth, newHeight);
}
代码示例来源:origin: org.eclipse.platform/org.eclipse.swt.gtk.linux.ppc
Point size = getSizeInPixels ();
oldWidth = size.x - trimWidth ();
oldHeight = size.y - trimHeight ();
代码示例来源:origin: org.eclipse.platform/org.eclipse.swt.gtk.linux.s390x
Point size = getSizeInPixels ();
oldWidth = size.x - trimWidth ();
oldHeight = size.y - trimHeight ();
代码示例来源:origin: org.eclipse.platform/org.eclipse.swt.gtk.aix.ppc
Point size = getSizeInPixels ();
oldWidth = size.x - trimWidth ();
oldHeight = size.y - trimHeight ();
内容来源于网络,如有侵权,请联系作者删除!