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

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

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

Table.getHeaderHeightInPixels介绍

暂无

代码示例

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

  1. /**
  2. * Returns the height of the receiver's header
  3. *
  4. * @return the height of the header or zero if the header is not visible
  5. *
  6. * @exception SWTException <ul>
  7. * <li>ERROR_WIDGET_DISPOSED - if the receiver has been disposed</li>
  8. * <li>ERROR_THREAD_INVALID_ACCESS - if not called from the thread that created the receiver</li>
  9. * </ul>
  10. *
  11. * @since 2.0
  12. */
  13. public int getHeaderHeight () {
  14. checkWidget ();
  15. return DPIUtil.autoScaleDown(getHeaderHeightInPixels ());
  16. }

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

  1. /**
  2. * Returns the height of the receiver's header
  3. *
  4. * @return the height of the header or zero if the header is not visible
  5. *
  6. * @exception SWTException <ul>
  7. * <li>ERROR_WIDGET_DISPOSED - if the receiver has been disposed</li>
  8. * <li>ERROR_THREAD_INVALID_ACCESS - if not called from the thread that created the receiver</li>
  9. * </ul>
  10. *
  11. * @since 2.0
  12. */
  13. public int getHeaderHeight () {
  14. checkWidget ();
  15. return DPIUtil.autoScaleDown (getHeaderHeightInPixels ());
  16. }

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

  1. /**
  2. * Returns the height of the receiver's header
  3. *
  4. * @return the height of the header or zero if the header is not visible
  5. *
  6. * @exception SWTException <ul>
  7. * <li>ERROR_WIDGET_DISPOSED - if the receiver has been disposed</li>
  8. * <li>ERROR_THREAD_INVALID_ACCESS - if not called from the thread that created the receiver</li>
  9. * </ul>
  10. *
  11. * @since 2.0
  12. */
  13. public int getHeaderHeight () {
  14. checkWidget ();
  15. return DPIUtil.autoScaleDown (getHeaderHeightInPixels ());
  16. }

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

  1. /**
  2. * Returns the height of the receiver's header
  3. *
  4. * @return the height of the header or zero if the header is not visible
  5. *
  6. * @exception SWTException <ul>
  7. * <li>ERROR_WIDGET_DISPOSED - if the receiver has been disposed</li>
  8. * <li>ERROR_THREAD_INVALID_ACCESS - if not called from the thread that created the receiver</li>
  9. * </ul>
  10. *
  11. * @since 2.0
  12. */
  13. public int getHeaderHeight () {
  14. checkWidget ();
  15. return DPIUtil.autoScaleDown (getHeaderHeightInPixels ());
  16. }

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

  1. TableItem getItemInPixels (Point point) {
  2. checkWidget();
  3. if (point == null) error (SWT.ERROR_NULL_ARGUMENT);
  4. int /*long*/ [] path = new int /*long*/ [1];
  5. OS.gtk_widget_realize (handle);
  6. int y = point.y;
  7. if (getHeaderVisible() && OS.GTK_VERSION > OS.VERSION(3, 9, 0)) {
  8. y -= getHeaderHeightInPixels();
  9. }
  10. if (!OS.gtk_tree_view_get_path_at_pos (handle, point.x, y, path, null, null, null)) return null;
  11. if (path [0] == 0) return null;
  12. int /*long*/ indices = OS.gtk_tree_path_get_indices (path [0]);
  13. TableItem item = null;
  14. if (indices != 0) {
  15. int [] index = new int [1];
  16. OS.memmove (index, indices, 4);
  17. item = _getItem (index [0]);
  18. }
  19. OS.gtk_tree_path_free (path [0]);
  20. return item;
  21. }

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

  1. TableItem getItemInPixels (Point point) {
  2. checkWidget();
  3. if (point == null) error (SWT.ERROR_NULL_ARGUMENT);
  4. int /*long*/ [] path = new int /*long*/ [1];
  5. OS.gtk_widget_realize (handle);
  6. int y = point.y;
  7. if (getHeaderVisible() && OS.GTK_VERSION > OS.VERSION(3, 9, 0)) {
  8. y -= getHeaderHeightInPixels();
  9. }
  10. if (!OS.gtk_tree_view_get_path_at_pos (handle, point.x, y, path, null, null, null)) return null;
  11. if (path [0] == 0) return null;
  12. int /*long*/ indices = OS.gtk_tree_path_get_indices (path [0]);
  13. TableItem item = null;
  14. if (indices != 0) {
  15. int [] index = new int [1];
  16. OS.memmove (index, indices, 4);
  17. item = _getItem (index [0]);
  18. }
  19. OS.gtk_tree_path_free (path [0]);
  20. return item;
  21. }

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

  1. TableItem getItemInPixels (Point point) {
  2. checkWidget();
  3. if (point == null) error (SWT.ERROR_NULL_ARGUMENT);
  4. long /*int*/ [] path = new long /*int*/ [1];
  5. OS.gtk_widget_realize (handle);
  6. int y = point.y;
  7. if (getHeaderVisible() && OS.GTK_VERSION > OS.VERSION(3, 9, 0)) {
  8. y -= getHeaderHeightInPixels();
  9. }
  10. if (!OS.gtk_tree_view_get_path_at_pos (handle, point.x, y, path, null, null, null)) return null;
  11. if (path [0] == 0) return null;
  12. long /*int*/ indices = OS.gtk_tree_path_get_indices (path [0]);
  13. TableItem item = null;
  14. if (indices != 0) {
  15. int [] index = new int [1];
  16. OS.memmove (index, indices, 4);
  17. item = _getItem (index [0]);
  18. }
  19. OS.gtk_tree_path_free (path [0]);
  20. return item;
  21. }

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

  1. @Override
  2. Rectangle getClientAreaInPixels () {
  3. checkWidget ();
  4. forceResize ();
  5. OS.gtk_widget_realize (handle);
  6. long /*int*/ fixedWindow = gtk_widget_get_window (fixedHandle);
  7. long /*int*/ binWindow = OS.gtk_tree_view_get_bin_window (handle);
  8. int [] binX = new int [1], binY = new int [1];
  9. OS.gdk_window_get_origin (binWindow, binX, binY);
  10. int [] fixedX = new int [1], fixedY = new int [1];
  11. OS.gdk_window_get_origin (fixedWindow, fixedX, fixedY);
  12. long /*int*/ clientHandle = clientHandle ();
  13. GtkAllocation allocation = new GtkAllocation ();
  14. OS.gtk_widget_get_allocation (clientHandle, allocation);
  15. int width = (state & ZERO_WIDTH) != 0 ? 0 : allocation.width;
  16. int height = (state & ZERO_HEIGHT) != 0 ? 0 : allocation.height;
  17. Rectangle rect = new Rectangle (fixedX [0] - binX [0], fixedY [0] - binY [0], width, height);
  18. if (getHeaderVisible() && OS.GTK_VERSION > OS.VERSION(3, 9, 0)) {
  19. rect.y += getHeaderHeightInPixels();
  20. }
  21. return rect;
  22. }

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

  1. @Override
  2. Rectangle getClientAreaInPixels () {
  3. checkWidget ();
  4. forceResize ();
  5. OS.gtk_widget_realize (handle);
  6. int /*long*/ fixedWindow = gtk_widget_get_window (fixedHandle);
  7. int /*long*/ binWindow = OS.gtk_tree_view_get_bin_window (handle);
  8. int [] binX = new int [1], binY = new int [1];
  9. OS.gdk_window_get_origin (binWindow, binX, binY);
  10. int [] fixedX = new int [1], fixedY = new int [1];
  11. OS.gdk_window_get_origin (fixedWindow, fixedX, fixedY);
  12. int /*long*/ clientHandle = clientHandle ();
  13. GtkAllocation allocation = new GtkAllocation ();
  14. OS.gtk_widget_get_allocation (clientHandle, allocation);
  15. int width = (state & ZERO_WIDTH) != 0 ? 0 : allocation.width;
  16. int height = (state & ZERO_HEIGHT) != 0 ? 0 : allocation.height;
  17. Rectangle rect = new Rectangle (fixedX [0] - binX [0], fixedY [0] - binY [0], width, height);
  18. if (getHeaderVisible() && OS.GTK_VERSION > OS.VERSION(3, 9, 0)) {
  19. rect.y += getHeaderHeightInPixels();
  20. }
  21. return rect;
  22. }

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

  1. @Override
  2. Rectangle getClientAreaInPixels () {
  3. checkWidget ();
  4. forceResize ();
  5. OS.gtk_widget_realize (handle);
  6. int /*long*/ fixedWindow = gtk_widget_get_window (fixedHandle);
  7. int /*long*/ binWindow = OS.gtk_tree_view_get_bin_window (handle);
  8. int [] binX = new int [1], binY = new int [1];
  9. OS.gdk_window_get_origin (binWindow, binX, binY);
  10. int [] fixedX = new int [1], fixedY = new int [1];
  11. OS.gdk_window_get_origin (fixedWindow, fixedX, fixedY);
  12. int /*long*/ clientHandle = clientHandle ();
  13. GtkAllocation allocation = new GtkAllocation ();
  14. OS.gtk_widget_get_allocation (clientHandle, allocation);
  15. int width = (state & ZERO_WIDTH) != 0 ? 0 : allocation.width;
  16. int height = (state & ZERO_HEIGHT) != 0 ? 0 : allocation.height;
  17. Rectangle rect = new Rectangle (fixedX [0] - binX [0], fixedY [0] - binY [0], width, height);
  18. if (getHeaderVisible() && OS.GTK_VERSION > OS.VERSION(3, 9, 0)) {
  19. rect.y += getHeaderHeightInPixels();
  20. }
  21. return rect;
  22. }

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

  1. Rectangle r = new Rectangle (rect.x, rect.y, width, rect.height + 1);
  2. if (parent.getHeaderVisible() && OS.GTK_VERSION > OS.VERSION(3, 9, 0)) {
  3. r.y += parent.getHeaderHeightInPixels();

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

  1. Rectangle r = new Rectangle (rect.x, rect.y, width, rect.height + 1);
  2. if (parent.getHeaderVisible() && OS.GTK_VERSION > OS.VERSION(3, 9, 0)) {
  3. r.y += parent.getHeaderHeightInPixels();

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

  1. Rectangle r = new Rectangle (rect.x, rect.y, width, rect.height + 1);
  2. if (parent.getHeaderVisible() && OS.GTK_VERSION > OS.VERSION(3, 9, 0)) {
  3. r.y += parent.getHeaderHeightInPixels();

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

  1. Rectangle r = new Rectangle (rect.x, rect.y, width, rect.height + 1);
  2. if (parent.getHeaderVisible() && OS.GTK_VERSION > OS.VERSION(3, 9, 0)) {
  3. r.y += parent.getHeaderHeightInPixels();

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

  1. Rectangle r = new Rectangle (rect.x, rect.y, width, rect.height + 1);
  2. if (parent.getHeaderVisible() && OS.GTK_VERSION > OS.VERSION(3, 9, 0)) {
  3. r.y += parent.getHeaderHeightInPixels();

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

  1. Rectangle r = new Rectangle (rect.x, rect.y, width, rect.height + 1);
  2. if (parent.getHeaderVisible() && OS.GTK_VERSION > OS.VERSION(3, 9, 0)) {
  3. r.y += parent.getHeaderHeightInPixels();

相关文章

Table类方法