本文整理了Java中org.eclipse.swt.widgets.Shell.forceResize()
方法的一些代码示例,展示了Shell.forceResize()
的具体用法。这些代码示例主要来源于Github
/Stackoverflow
/Maven
等平台,是从一些精选项目中提取出来的代码,具有较强的参考意义,能在一定程度帮忙到你。Shell.forceResize()
方法的具体详情如下:
包路径:org.eclipse.swt.widgets.Shell
类名称:Shell
方法名:forceResize
暂无
代码示例来源:origin: org.eclipse.platform/org.eclipse.swt.gtk.aix.ppc
@Override
void forceResize () {
GtkAllocation allocation = new GtkAllocation ();
OS.gtk_widget_get_allocation (vboxHandle, allocation);
forceResize (allocation.width, allocation.height);
}
代码示例来源:origin: org.eclipse.platform/org.eclipse.swt.gtk.linux.ppc
@Override
void forceResize () {
GtkAllocation allocation = new GtkAllocation ();
OS.gtk_widget_get_allocation (vboxHandle, allocation);
forceResize (allocation.width, allocation.height);
}
代码示例来源:origin: org.eclipse.platform/org.eclipse.swt.gtk.linux.s390x
@Override
void forceResize () {
GtkAllocation allocation = new GtkAllocation ();
OS.gtk_widget_get_allocation (vboxHandle, allocation);
forceResize (allocation.width, allocation.height);
}
代码示例来源:origin: org.eclipse.platform/org.eclipse.swt.gtk.aix.ppc
void resizeBounds (int width, int height, boolean notify) {
if (redrawWindow != 0) {
OS.gdk_window_resize (redrawWindow, width, height);
}
if (enableWindow != 0) {
OS.gdk_window_resize (enableWindow, width, height);
}
int border = OS.gtk_container_get_border_width (shellHandle);
int boxWidth = width - 2*border;
int boxHeight = height - 2*border;
if (!OS.GTK3 || (style & SWT.RESIZE) == 0) {
OS.gtk_widget_set_size_request (vboxHandle, boxWidth, boxHeight);
}
forceResize (boxWidth, boxHeight);
if (notify) {
resized = true;
sendEvent (SWT.Resize);
if (isDisposed ()) return;
if (layout != null) {
markLayout (false, false);
updateLayout (false);
}
}
}
代码示例来源:origin: org.eclipse.platform/org.eclipse.swt.gtk.linux.s390x
void resizeBounds (int width, int height, boolean notify) {
if (redrawWindow != 0) {
OS.gdk_window_resize (redrawWindow, width, height);
}
if (enableWindow != 0) {
OS.gdk_window_resize (enableWindow, width, height);
}
int border = OS.gtk_container_get_border_width (shellHandle);
int boxWidth = width - 2*border;
int boxHeight = height - 2*border;
if (!OS.GTK3 || (style & SWT.RESIZE) == 0) {
OS.gtk_widget_set_size_request (vboxHandle, boxWidth, boxHeight);
}
forceResize (boxWidth, boxHeight);
if (notify) {
resized = true;
sendEvent (SWT.Resize);
if (isDisposed ()) return;
if (layout != null) {
markLayout (false, false);
updateLayout (false);
}
}
}
代码示例来源:origin: org.eclipse.platform/org.eclipse.swt.gtk.linux.ppc
void resizeBounds (int width, int height, boolean notify) {
if (redrawWindow != 0) {
OS.gdk_window_resize (redrawWindow, width, height);
}
if (enableWindow != 0) {
OS.gdk_window_resize (enableWindow, width, height);
}
int border = OS.gtk_container_get_border_width (shellHandle);
int boxWidth = width - 2*border;
int boxHeight = height - 2*border;
if (!OS.GTK3 || (style & SWT.RESIZE) == 0) {
OS.gtk_widget_set_size_request (vboxHandle, boxWidth, boxHeight);
}
forceResize (boxWidth, boxHeight);
if (notify) {
resized = true;
sendEvent (SWT.Resize);
if (isDisposed ()) return;
if (layout != null) {
markLayout (false, false);
updateLayout (false);
}
}
}
代码示例来源:origin: org.eclipse.platform/org.eclipse.swt.gtk.aix.ppc
@Override
Rectangle computeTrimInPixels (int x, int y, int width, int height) {
checkWidget();
Rectangle trim = super.computeTrimInPixels (x, y, width, height);
int border = 0;
if ((style & (SWT.NO_TRIM | SWT.BORDER | SWT.SHELL_TRIM)) == 0) {
border = OS.gtk_container_get_border_width (shellHandle);
}
if (isCustomResize ()) {
border = OS.gtk_container_get_border_width (shellHandle);
}
int trimWidth = trimWidth (), trimHeight = trimHeight ();
trim.x -= (trimWidth / 2) + border;
trim.y -= trimHeight - (trimWidth / 2) + border;
trim.width += trimWidth + border * 2;
trim.height += trimHeight + border * 2;
if (menuBar != null) {
forceResize ();
GtkAllocation allocation = new GtkAllocation ();
OS.gtk_widget_get_allocation (menuBar.handle, allocation);
int menuBarHeight = allocation.height;
trim.y -= menuBarHeight;
trim.height += menuBarHeight;
}
return trim;
}
代码示例来源:origin: org.eclipse.platform/org.eclipse.swt.gtk.linux.ppc
@Override
Rectangle computeTrimInPixels (int x, int y, int width, int height) {
checkWidget();
Rectangle trim = super.computeTrimInPixels (x, y, width, height);
int border = 0;
if ((style & (SWT.NO_TRIM | SWT.BORDER | SWT.SHELL_TRIM)) == 0) {
border = OS.gtk_container_get_border_width (shellHandle);
}
if (isCustomResize ()) {
border = OS.gtk_container_get_border_width (shellHandle);
}
int trimWidth = trimWidth (), trimHeight = trimHeight ();
trim.x -= (trimWidth / 2) + border;
trim.y -= trimHeight - (trimWidth / 2) + border;
trim.width += trimWidth + border * 2;
trim.height += trimHeight + border * 2;
if (menuBar != null) {
forceResize ();
GtkAllocation allocation = new GtkAllocation ();
OS.gtk_widget_get_allocation (menuBar.handle, allocation);
int menuBarHeight = allocation.height;
trim.y -= menuBarHeight;
trim.height += menuBarHeight;
}
return trim;
}
代码示例来源:origin: org.eclipse.platform/org.eclipse.swt.gtk.linux.s390x
@Override
Rectangle computeTrimInPixels (int x, int y, int width, int height) {
checkWidget();
Rectangle trim = super.computeTrimInPixels (x, y, width, height);
int border = 0;
if ((style & (SWT.NO_TRIM | SWT.BORDER | SWT.SHELL_TRIM)) == 0) {
border = OS.gtk_container_get_border_width (shellHandle);
}
if (isCustomResize ()) {
border = OS.gtk_container_get_border_width (shellHandle);
}
int trimWidth = trimWidth (), trimHeight = trimHeight ();
trim.x -= (trimWidth / 2) + border;
trim.y -= trimHeight - (trimWidth / 2) + border;
trim.width += trimWidth + border * 2;
trim.height += trimHeight + border * 2;
if (menuBar != null) {
forceResize ();
GtkAllocation allocation = new GtkAllocation ();
OS.gtk_widget_get_allocation (menuBar.handle, allocation);
int menuBarHeight = allocation.height;
trim.y -= menuBarHeight;
trim.height += menuBarHeight;
}
return trim;
}
内容来源于网络,如有侵权,请联系作者删除!