org.eclipse.swt.widgets.Shell.getClientWidth()方法的使用及代码示例

x33g5p2x  于2022-01-29 转载在 其他  
字(3.2k)|赞(0)|评价(0)|浏览(150)

本文整理了Java中org.eclipse.swt.widgets.Shell.getClientWidth()方法的一些代码示例,展示了Shell.getClientWidth()的具体用法。这些代码示例主要来源于Github/Stackoverflow/Maven等平台,是从一些精选项目中提取出来的代码,具有较强的参考意义,能在一定程度帮忙到你。Shell.getClientWidth()方法的具体详情如下:
包路径:org.eclipse.swt.widgets.Shell
类名称:Shell
方法名:getClientWidth

Shell.getClientWidth介绍

暂无

代码示例

代码示例来源:origin: org.eclipse.platform/org.eclipse.swt.gtk.linux.ppc

  1. @Override
  2. int /*long*/ fixedSizeAllocateProc(int /*long*/ widget, int /*long*/ allocationPtr) {
  3. int clientWidth = 0;
  4. if ((style & SWT.MIRRORED) != 0) clientWidth = getClientWidth ();
  5. int /*long*/ result = super.fixedSizeAllocateProc (widget, allocationPtr);
  6. if ((style & SWT.MIRRORED) != 0) moveChildren (clientWidth);
  7. return result;
  8. }

代码示例来源:origin: org.eclipse.platform/org.eclipse.swt.gtk.linux.s390x

  1. @Override
  2. long /*int*/ fixedSizeAllocateProc(long /*int*/ widget, long /*int*/ allocationPtr) {
  3. int clientWidth = 0;
  4. if ((style & SWT.MIRRORED) != 0) clientWidth = getClientWidth ();
  5. long /*int*/ result = super.fixedSizeAllocateProc (widget, allocationPtr);
  6. if ((style & SWT.MIRRORED) != 0) moveChildren (clientWidth);
  7. return result;
  8. }

代码示例来源:origin: org.eclipse.platform/org.eclipse.swt.gtk.aix.ppc

  1. @Override
  2. int /*long*/ fixedSizeAllocateProc(int /*long*/ widget, int /*long*/ allocationPtr) {
  3. int clientWidth = 0;
  4. if ((style & SWT.MIRRORED) != 0) clientWidth = getClientWidth ();
  5. int /*long*/ result = super.fixedSizeAllocateProc (widget, allocationPtr);
  6. if ((style & SWT.MIRRORED) != 0) moveChildren (clientWidth);
  7. return result;
  8. }

代码示例来源:origin: org.eclipse.platform/org.eclipse.swt.gtk.linux.ppc

  1. void forceResize (int width, int height) {
  2. int clientWidth = 0;
  3. if (OS.GTK3) {
  4. if ((style & SWT.MIRRORED) != 0) clientWidth = getClientWidth ();
  5. }
  6. GtkRequisition requisition = new GtkRequisition ();
  7. gtk_widget_get_preferred_size (vboxHandle, requisition);
  8. GtkAllocation allocation = new GtkAllocation ();
  9. int border = OS.gtk_container_get_border_width (shellHandle);
  10. allocation.x = border;
  11. allocation.y = border;
  12. allocation.width = width;
  13. allocation.height = height;
  14. OS.gtk_widget_size_allocate (vboxHandle, allocation);
  15. if (OS.GTK3) {
  16. if ((style & SWT.MIRRORED) != 0) moveChildren (clientWidth);
  17. }
  18. }

代码示例来源:origin: org.eclipse.platform/org.eclipse.swt.gtk.aix.ppc

  1. void forceResize (int width, int height) {
  2. int clientWidth = 0;
  3. if (OS.GTK3) {
  4. if ((style & SWT.MIRRORED) != 0) clientWidth = getClientWidth ();
  5. }
  6. GtkRequisition requisition = new GtkRequisition ();
  7. gtk_widget_get_preferred_size (vboxHandle, requisition);
  8. GtkAllocation allocation = new GtkAllocation ();
  9. int border = OS.gtk_container_get_border_width (shellHandle);
  10. allocation.x = border;
  11. allocation.y = border;
  12. allocation.width = width;
  13. allocation.height = height;
  14. OS.gtk_widget_size_allocate (vboxHandle, allocation);
  15. if (OS.GTK3) {
  16. if ((style & SWT.MIRRORED) != 0) moveChildren (clientWidth);
  17. }
  18. }

代码示例来源:origin: org.eclipse.platform/org.eclipse.swt.gtk.linux.s390x

  1. void forceResize (int width, int height) {
  2. int clientWidth = 0;
  3. if (OS.GTK3) {
  4. if ((style & SWT.MIRRORED) != 0) clientWidth = getClientWidth ();
  5. }
  6. GtkRequisition requisition = new GtkRequisition ();
  7. gtk_widget_get_preferred_size (vboxHandle, requisition);
  8. GtkAllocation allocation = new GtkAllocation ();
  9. int border = OS.gtk_container_get_border_width (shellHandle);
  10. allocation.x = border;
  11. allocation.y = border;
  12. allocation.width = width;
  13. allocation.height = height;
  14. OS.gtk_widget_size_allocate (vboxHandle, allocation);
  15. if (OS.GTK3) {
  16. if ((style & SWT.MIRRORED) != 0) moveChildren (clientWidth);
  17. }
  18. }

相关文章

Shell类方法