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

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

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

Table.calculateWidth介绍

暂无

代码示例

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

  1. void setScrollWidth (int /*long*/ column, TableItem item) {
  2. if (columnCount != 0 || currentItem == item) return;
  3. int width = OS.gtk_tree_view_column_get_fixed_width (column);
  4. int itemWidth = calculateWidth (column, item.handle);
  5. if (width < itemWidth) {
  6. OS.gtk_tree_view_column_set_fixed_width (column, itemWidth);
  7. }
  8. }

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

  1. void setScrollWidth (long /*int*/ column, TableItem item) {
  2. if (columnCount != 0 || currentItem == item) return;
  3. int width = OS.gtk_tree_view_column_get_fixed_width (column);
  4. int itemWidth = calculateWidth (column, item.handle);
  5. if (width < itemWidth) {
  6. OS.gtk_tree_view_column_set_fixed_width (column, itemWidth);
  7. }
  8. }

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

  1. void setScrollWidth (int /*long*/ column, TableItem item) {
  2. if (columnCount != 0 || currentItem == item) return;
  3. int width = OS.gtk_tree_view_column_get_fixed_width (column);
  4. int itemWidth = calculateWidth (column, item.handle);
  5. if (width < itemWidth) {
  6. OS.gtk_tree_view_column_set_fixed_width (column, itemWidth);
  7. }
  8. }

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

  1. TableItem item = parent.items [i];
  2. if (item != null && item.cached) {
  3. width = Math.max (width, parent.calculateWidth (handle, item.handle));
  4. if (OS.gtk_tree_model_get_iter_first (parent.modelHandle, iter)) {
  5. do {
  6. width = Math.max (width, parent.calculateWidth (handle, iter));
  7. } while (OS.gtk_tree_model_iter_next(parent.modelHandle, iter));

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

  1. TableItem item = parent.items [i];
  2. if (item != null && item.cached) {
  3. width = Math.max (width, parent.calculateWidth (handle, item.handle));
  4. if (OS.gtk_tree_model_get_iter_first (parent.modelHandle, iter)) {
  5. do {
  6. width = Math.max (width, parent.calculateWidth (handle, iter));
  7. } while (OS.gtk_tree_model_iter_next(parent.modelHandle, iter));

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

  1. if (parent.columnCount == 0) {
  2. column = OS.gtk_tree_view_get_column (parent.handle, index);
  3. parent.maxWidth = Math.max(parent.maxWidth, parent.calculateWidth(column, this.handle));

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

  1. if (parent.columnCount == 0) {
  2. column = OS.gtk_tree_view_get_column (parent.handle, index);
  3. parent.maxWidth = Math.max(parent.maxWidth, parent.calculateWidth(column, this.handle));

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

  1. if (parent.columnCount == 0) {
  2. column = OS.gtk_tree_view_get_column (parent.handle, index);
  3. parent.maxWidth = Math.max(parent.maxWidth, parent.calculateWidth(column, this.handle));

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

  1. TableItem item = parent.items [i];
  2. if (item != null && item.cached) {
  3. width = Math.max (width, parent.calculateWidth (handle, item.handle));
  4. if (OS.gtk_tree_model_get_iter_first (parent.modelHandle, iter)) {
  5. do {
  6. width = Math.max (width, parent.calculateWidth (handle, iter));
  7. } while (OS.gtk_tree_model_iter_next(parent.modelHandle, iter));

代码示例来源:origin: org.eclipse.swt.cocoa.macosx/x86_64

  1. width = Math.max (width, parent.calculateWidth (parent.items, index, gc));
  2. gc.dispose ();
  3. setWidth (width);

代码示例来源:origin: org.eclipse.swt.cocoa.macosx/x86_64

  1. public Point computeSize (int wHint, int hHint, boolean changed) {
  2. checkWidget ();
  3. int width = 0;
  4. if (wHint == SWT.DEFAULT) {
  5. if (columnCount != 0) {
  6. for (int i=0; i<columnCount; i++) {
  7. width += columns [i].getWidth ();
  8. }
  9. } else {
  10. GC gc = new GC (this);
  11. width += calculateWidth (items, 0, gc) + CELL_GAP;
  12. gc.dispose ();
  13. }
  14. if ((style & SWT.CHECK) != 0) width += getCheckColumnWidth ();
  15. } else {
  16. width = wHint;
  17. }
  18. if (width <= 0) width = DEFAULT_WIDTH;
  19. int height = 0;
  20. if (hHint == SWT.DEFAULT) {
  21. height = itemCount * getItemHeight () + getHeaderHeight();
  22. } else {
  23. height = hHint;
  24. }
  25. if (height <= 0) height = DEFAULT_HEIGHT;
  26. Rectangle rect = computeTrim (0, 0, width, height);
  27. return new Point (rect.width, rect.height);
  28. }

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

  1. if (parent.columnCount == 0) {
  2. column = OS.gtk_tree_view_get_column (parent.handle, index);
  3. parent.maxWidth = Math.max(parent.maxWidth, parent.calculateWidth(column, this.handle));

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

  1. if (parent.columnCount == 0) {
  2. column = OS.gtk_tree_view_get_column (parent.handle, index);
  3. parent.maxWidth = Math.max(parent.maxWidth, parent.calculateWidth(column, this.handle));

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

  1. if (parent.columnCount == 0) {
  2. column = OS.gtk_tree_view_get_column (parent.handle, index);
  3. parent.maxWidth = Math.max(parent.maxWidth, parent.calculateWidth(column, this.handle));

相关文章

Table类方法