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

x33g5p2x  于2022-01-30 转载在 其他  
字(4.1k)|赞(0)|评价(0)|浏览(117)

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

Scrollable.forceResize介绍

暂无

代码示例

代码示例来源:origin: org.eclipse.scout.sdk.deps/org.eclipse.swt.win32.win32.x86

  1. Point getSizeInPixels () {
  2. parent.forceResize ();
  3. RECT rect = new RECT ();
  4. OS.GetClientRect (parent.scrolledHandle (), rect);
  5. int width, height;
  6. if ((style & SWT.HORIZONTAL) != 0) {
  7. width = rect.right - rect.left;
  8. height = OS.GetSystemMetrics (OS.SM_CYHSCROLL);
  9. } else {
  10. width = OS.GetSystemMetrics (OS.SM_CXVSCROLL);
  11. height = rect.bottom - rect.top;
  12. }
  13. return new Point (width, height);
  14. }

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

  1. Rectangle getClientAreaInPixels () {
  2. checkWidget ();
  3. forceResize ();
  4. long /*int*/ clientHandle = clientHandle ();
  5. GtkAllocation allocation = new GtkAllocation ();
  6. OS.gtk_widget_get_allocation (clientHandle, allocation);
  7. int x = allocation.x;
  8. int y = allocation.y;
  9. int width = (state & ZERO_WIDTH) != 0 ? 0 : allocation.width;
  10. int height = (state & ZERO_HEIGHT) != 0 ? 0 : allocation.height;
  11. return new Rectangle (x, y, width, height);
  12. }
  13. /**

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

  1. Rectangle getClientAreaInPixels () {
  2. checkWidget ();
  3. forceResize ();
  4. int /*long*/ clientHandle = clientHandle ();
  5. GtkAllocation allocation = new GtkAllocation ();
  6. OS.gtk_widget_get_allocation (clientHandle, allocation);
  7. int x = allocation.x;
  8. int y = allocation.y;
  9. int width = (state & ZERO_WIDTH) != 0 ? 0 : allocation.width;
  10. int height = (state & ZERO_HEIGHT) != 0 ? 0 : allocation.height;
  11. return new Rectangle (x, y, width, height);
  12. }
  13. /**

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

  1. Rectangle getClientAreaInPixels () {
  2. checkWidget ();
  3. forceResize ();
  4. int /*long*/ clientHandle = clientHandle ();
  5. GtkAllocation allocation = new GtkAllocation ();
  6. OS.gtk_widget_get_allocation (clientHandle, allocation);
  7. int x = allocation.x;
  8. int y = allocation.y;
  9. int width = (state & ZERO_WIDTH) != 0 ? 0 : allocation.width;
  10. int height = (state & ZERO_HEIGHT) != 0 ? 0 : allocation.height;
  11. return new Rectangle (x, y, width, height);
  12. }
  13. /**

代码示例来源:origin: org.eclipse.scout.sdk.deps/org.eclipse.swt.win32.win32.x86

  1. Rectangle getBounds () {
  2. // checkWidget ();
  3. parent.forceResize ();
  4. RECT rect = new RECT ();
  5. OS.GetClientRect (parent.scrolledHandle (), rect);
  6. int x = 0, y = 0, width, height;
  7. if ((style & SWT.HORIZONTAL) != 0) {
  8. y = rect.bottom - rect.top;
  9. width = rect.right - rect.left;
  10. height = OS.GetSystemMetrics (OS.SM_CYHSCROLL);
  11. } else {
  12. x = rect.right - rect.left;
  13. width = OS.GetSystemMetrics (OS.SM_CXVSCROLL);
  14. height = rect.bottom - rect.top;
  15. }
  16. return new Rectangle (x, y, width, height);
  17. }

代码示例来源:origin: org.eclipse.scout.sdk.deps/org.eclipse.swt.win32.win32.x86

  1. Rectangle getClientAreaInPixels () {
  2. forceResize ();
  3. RECT rect = new RECT ();
  4. int /*long*/ scrolledHandle = scrolledHandle ();
  5. OS.GetClientRect (scrolledHandle, rect);
  6. int x = rect.left, y = rect.top;
  7. int width = rect.right - rect.left;
  8. int height = rect.bottom - rect.top;
  9. if (scrolledHandle != handle) {
  10. OS.GetClientRect (handle, rect);
  11. OS.MapWindowPoints(handle, scrolledHandle, rect, 2);
  12. x = -rect.left;
  13. y = -rect.top;
  14. }
  15. return new Rectangle (x, y, width, height);
  16. }

代码示例来源:origin: org.eclipse.scout.sdk.deps/org.eclipse.swt.win32.win32.x86

  1. Rectangle getThumbBoundsInPixels () {
  2. parent.forceResize ();
  3. SCROLLBARINFO info = new SCROLLBARINFO();
  4. info.cbSize = SCROLLBARINFO.sizeof;
  5. int x, y, width, height;
  6. if ((style & SWT.HORIZONTAL) != 0) {
  7. OS.GetScrollBarInfo(parent.handle, OS.OBJID_HSCROLL, info);
  8. x = info.rcScrollBar.left + info.xyThumbTop;
  9. y = info.rcScrollBar.top;
  10. width = info.xyThumbBottom - info.xyThumbTop;
  11. height = info.rcScrollBar.bottom - info.rcScrollBar.top;
  12. } else {
  13. OS.GetScrollBarInfo(parent.handle, OS.OBJID_VSCROLL, info);
  14. x = info.rcScrollBar.left;
  15. y = info.rcScrollBar.top + info.xyThumbTop;
  16. width = info.rcScrollBar.right - info.rcScrollBar.left;
  17. height = info.xyThumbBottom - info.xyThumbTop;
  18. }
  19. RECT rect = new RECT ();
  20. rect.left = x;
  21. rect.top = y;
  22. rect.right = x + width;
  23. rect.bottom = y + height;
  24. OS.MapWindowPoints (0, parent.handle, rect, 2);
  25. return new Rectangle(rect.left, rect.top, rect.right - rect.left, rect.bottom - rect.top);
  26. }

代码示例来源:origin: org.eclipse.scout.sdk.deps/org.eclipse.swt.win32.win32.x86

  1. Rectangle getThumbTrackBoundsInPixels () {
  2. parent.forceResize ();
  3. SCROLLBARINFO info = new SCROLLBARINFO();
  4. info.cbSize = SCROLLBARINFO.sizeof;

相关文章

Scrollable类方法