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

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

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

Table.gtk_widget_get_preferred_size介绍

暂无

代码示例

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

int getHeaderHeightInPixels () {
  checkWidget ();
  if (!OS.gtk_tree_view_get_headers_visible (handle)) return 0;
  if (columnCount > 0) {
    GtkRequisition requisition = new GtkRequisition ();
    int height = 0;
    for (int i=0; i<columnCount; i++) {
      long /*int*/ buttonHandle = columns [i].buttonHandle;
      if (buttonHandle != 0) {
        gtk_widget_get_preferred_size (buttonHandle, requisition);
        height = Math.max (height, requisition.height);
      }
    }
    return height;
  }
  OS.gtk_widget_realize (handle);
  long /*int*/ fixedWindow = gtk_widget_get_window (fixedHandle);
  long /*int*/ binWindow = OS.gtk_tree_view_get_bin_window (handle);
  int [] binY = new int [1];
  OS.gdk_window_get_origin (binWindow, null, binY);
  int [] fixedY = new int [1];
  OS.gdk_window_get_origin (fixedWindow, null, fixedY);
  return binY [0] - fixedY [0];
}

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

int getHeaderHeightInPixels () {
  checkWidget ();
  if (!OS.gtk_tree_view_get_headers_visible (handle)) return 0;
  if (columnCount > 0) {
    GtkRequisition requisition = new GtkRequisition ();
    int height = 0;
    for (int i=0; i<columnCount; i++) {
      int /*long*/ buttonHandle = columns [i].buttonHandle;
      if (buttonHandle != 0) {
        gtk_widget_get_preferred_size (buttonHandle, requisition);
        height = Math.max (height, requisition.height);
      }
    }
    return height;
  }
  OS.gtk_widget_realize (handle);
  int /*long*/ fixedWindow = gtk_widget_get_window (fixedHandle);
  int /*long*/ binWindow = OS.gtk_tree_view_get_bin_window (handle);
  int [] binY = new int [1];
  OS.gdk_window_get_origin (binWindow, null, binY);
  int [] fixedY = new int [1];
  OS.gdk_window_get_origin (fixedWindow, null, fixedY);
  return binY [0] - fixedY [0];
}

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

int getHeaderHeightInPixels () {
  checkWidget ();
  if (!OS.gtk_tree_view_get_headers_visible (handle)) return 0;
  if (columnCount > 0) {
    GtkRequisition requisition = new GtkRequisition ();
    int height = 0;
    for (int i=0; i<columnCount; i++) {
      int /*long*/ buttonHandle = columns [i].buttonHandle;
      if (buttonHandle != 0) {
        gtk_widget_get_preferred_size (buttonHandle, requisition);
        height = Math.max (height, requisition.height);
      }
    }
    return height;
  }
  OS.gtk_widget_realize (handle);
  int /*long*/ fixedWindow = gtk_widget_get_window (fixedHandle);
  int /*long*/ binWindow = OS.gtk_tree_view_get_bin_window (handle);
  int [] binY = new int [1];
  OS.gdk_window_get_origin (binWindow, null, binY);
  int [] fixedY = new int [1];
  OS.gdk_window_get_origin (fixedWindow, null, fixedY);
  return binY [0] - fixedY [0];
}

相关文章

Table类方法