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

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

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

Scrollable.hScrollBarWidth介绍

暂无

代码示例

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

  1. Rectangle computeTrimInPixels (int x, int y, int width, int height) {
  2. checkWidget();
  3. int border = 0;
  4. if (fixedHandle != 0) border += OS.gtk_container_get_border_width (fixedHandle);
  5. if (scrolledHandle != 0) border += OS.gtk_container_get_border_width (scrolledHandle);
  6. int trimX = x - border, trimY = y - border;
  7. int trimWidth = width + (border * 2), trimHeight = height + (border * 2);
  8. trimHeight += hScrollBarWidth ();
  9. trimWidth += vScrollBarWidth ();
  10. if (scrolledHandle != 0) {
  11. if (OS.gtk_scrolled_window_get_shadow_type (scrolledHandle) != OS.GTK_SHADOW_NONE) {
  12. Point thickness = getThickness (scrolledHandle);
  13. int xthickness = thickness.x;
  14. int ythickness = thickness.y;
  15. trimX -= xthickness;
  16. trimY -= ythickness;
  17. trimWidth += xthickness * 2;
  18. trimHeight += ythickness * 2;
  19. }
  20. }
  21. return new Rectangle (trimX, trimY, trimWidth, trimHeight);
  22. }

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

  1. Rectangle computeTrimInPixels (int x, int y, int width, int height) {
  2. checkWidget();
  3. int border = 0;
  4. if (fixedHandle != 0) border += OS.gtk_container_get_border_width (fixedHandle);
  5. if (scrolledHandle != 0) border += OS.gtk_container_get_border_width (scrolledHandle);
  6. int trimX = x - border, trimY = y - border;
  7. int trimWidth = width + (border * 2), trimHeight = height + (border * 2);
  8. trimHeight += hScrollBarWidth ();
  9. trimWidth += vScrollBarWidth ();
  10. if (scrolledHandle != 0) {
  11. if (OS.gtk_scrolled_window_get_shadow_type (scrolledHandle) != OS.GTK_SHADOW_NONE) {
  12. Point thickness = getThickness (scrolledHandle);
  13. int xthickness = thickness.x;
  14. int ythickness = thickness.y;
  15. trimX -= xthickness;
  16. trimY -= ythickness;
  17. trimWidth += xthickness * 2;
  18. trimHeight += ythickness * 2;
  19. }
  20. }
  21. return new Rectangle (trimX, trimY, trimWidth, trimHeight);
  22. }

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

  1. Rectangle computeTrimInPixels (int x, int y, int width, int height) {
  2. checkWidget();
  3. int border = 0;
  4. if (fixedHandle != 0) border += OS.gtk_container_get_border_width (fixedHandle);
  5. if (scrolledHandle != 0) border += OS.gtk_container_get_border_width (scrolledHandle);
  6. int trimX = x - border, trimY = y - border;
  7. int trimWidth = width + (border * 2), trimHeight = height + (border * 2);
  8. trimHeight += hScrollBarWidth ();
  9. trimWidth += vScrollBarWidth ();
  10. if (scrolledHandle != 0) {
  11. if (OS.gtk_scrolled_window_get_shadow_type (scrolledHandle) != OS.GTK_SHADOW_NONE) {
  12. Point thickness = getThickness (scrolledHandle);
  13. int xthickness = thickness.x;
  14. int ythickness = thickness.y;
  15. trimX -= xthickness;
  16. trimY -= ythickness;
  17. trimWidth += xthickness * 2;
  18. trimHeight += ythickness * 2;
  19. }
  20. }
  21. return new Rectangle (trimX, trimY, trimWidth, trimHeight);
  22. }

相关文章

Scrollable类方法