本文整理了Java中org.eclipse.swt.widgets.Table.calculateWidth()
方法的一些代码示例,展示了Table.calculateWidth()
的具体用法。这些代码示例主要来源于Github
/Stackoverflow
/Maven
等平台,是从一些精选项目中提取出来的代码,具有较强的参考意义,能在一定程度帮忙到你。Table.calculateWidth()
方法的具体详情如下:
包路径:org.eclipse.swt.widgets.Table
类名称:Table
方法名:calculateWidth
暂无
代码示例来源:origin: org.eclipse.platform/org.eclipse.swt.gtk.linux.ppc
void setScrollWidth (int /*long*/ column, TableItem item) {
if (columnCount != 0 || currentItem == item) return;
int width = OS.gtk_tree_view_column_get_fixed_width (column);
int itemWidth = calculateWidth (column, item.handle);
if (width < itemWidth) {
OS.gtk_tree_view_column_set_fixed_width (column, itemWidth);
}
}
代码示例来源:origin: org.eclipse.platform/org.eclipse.swt.gtk.linux.s390x
void setScrollWidth (long /*int*/ column, TableItem item) {
if (columnCount != 0 || currentItem == item) return;
int width = OS.gtk_tree_view_column_get_fixed_width (column);
int itemWidth = calculateWidth (column, item.handle);
if (width < itemWidth) {
OS.gtk_tree_view_column_set_fixed_width (column, itemWidth);
}
}
代码示例来源:origin: org.eclipse.platform/org.eclipse.swt.gtk.aix.ppc
void setScrollWidth (int /*long*/ column, TableItem item) {
if (columnCount != 0 || currentItem == item) return;
int width = OS.gtk_tree_view_column_get_fixed_width (column);
int itemWidth = calculateWidth (column, item.handle);
if (width < itemWidth) {
OS.gtk_tree_view_column_set_fixed_width (column, itemWidth);
}
}
代码示例来源:origin: org.eclipse.platform/org.eclipse.swt.gtk.linux.ppc
TableItem item = parent.items [i];
if (item != null && item.cached) {
width = Math.max (width, parent.calculateWidth (handle, item.handle));
if (OS.gtk_tree_model_get_iter_first (parent.modelHandle, iter)) {
do {
width = Math.max (width, parent.calculateWidth (handle, iter));
} while (OS.gtk_tree_model_iter_next(parent.modelHandle, iter));
代码示例来源:origin: org.eclipse.platform/org.eclipse.swt.gtk.linux.s390x
TableItem item = parent.items [i];
if (item != null && item.cached) {
width = Math.max (width, parent.calculateWidth (handle, item.handle));
if (OS.gtk_tree_model_get_iter_first (parent.modelHandle, iter)) {
do {
width = Math.max (width, parent.calculateWidth (handle, iter));
} while (OS.gtk_tree_model_iter_next(parent.modelHandle, iter));
代码示例来源:origin: org.eclipse.platform/org.eclipse.swt.gtk.linux.s390x
if (parent.columnCount == 0) {
column = OS.gtk_tree_view_get_column (parent.handle, index);
parent.maxWidth = Math.max(parent.maxWidth, parent.calculateWidth(column, this.handle));
代码示例来源:origin: org.eclipse.platform/org.eclipse.swt.gtk.aix.ppc
if (parent.columnCount == 0) {
column = OS.gtk_tree_view_get_column (parent.handle, index);
parent.maxWidth = Math.max(parent.maxWidth, parent.calculateWidth(column, this.handle));
代码示例来源:origin: org.eclipse.platform/org.eclipse.swt.gtk.linux.ppc
if (parent.columnCount == 0) {
column = OS.gtk_tree_view_get_column (parent.handle, index);
parent.maxWidth = Math.max(parent.maxWidth, parent.calculateWidth(column, this.handle));
代码示例来源:origin: org.eclipse.platform/org.eclipse.swt.gtk.aix.ppc
TableItem item = parent.items [i];
if (item != null && item.cached) {
width = Math.max (width, parent.calculateWidth (handle, item.handle));
if (OS.gtk_tree_model_get_iter_first (parent.modelHandle, iter)) {
do {
width = Math.max (width, parent.calculateWidth (handle, iter));
} while (OS.gtk_tree_model_iter_next(parent.modelHandle, iter));
代码示例来源:origin: org.eclipse.swt.cocoa.macosx/x86_64
width = Math.max (width, parent.calculateWidth (parent.items, index, gc));
gc.dispose ();
setWidth (width);
代码示例来源:origin: org.eclipse.swt.cocoa.macosx/x86_64
public Point computeSize (int wHint, int hHint, boolean changed) {
checkWidget ();
int width = 0;
if (wHint == SWT.DEFAULT) {
if (columnCount != 0) {
for (int i=0; i<columnCount; i++) {
width += columns [i].getWidth ();
}
} else {
GC gc = new GC (this);
width += calculateWidth (items, 0, gc) + CELL_GAP;
gc.dispose ();
}
if ((style & SWT.CHECK) != 0) width += getCheckColumnWidth ();
} else {
width = wHint;
}
if (width <= 0) width = DEFAULT_WIDTH;
int height = 0;
if (hHint == SWT.DEFAULT) {
height = itemCount * getItemHeight () + getHeaderHeight();
} else {
height = hHint;
}
if (height <= 0) height = DEFAULT_HEIGHT;
Rectangle rect = computeTrim (0, 0, width, height);
return new Point (rect.width, rect.height);
}
代码示例来源:origin: org.eclipse.platform/org.eclipse.swt.gtk.aix.ppc
if (parent.columnCount == 0) {
column = OS.gtk_tree_view_get_column (parent.handle, index);
parent.maxWidth = Math.max(parent.maxWidth, parent.calculateWidth(column, this.handle));
代码示例来源:origin: org.eclipse.platform/org.eclipse.swt.gtk.linux.s390x
if (parent.columnCount == 0) {
column = OS.gtk_tree_view_get_column (parent.handle, index);
parent.maxWidth = Math.max(parent.maxWidth, parent.calculateWidth(column, this.handle));
代码示例来源:origin: org.eclipse.platform/org.eclipse.swt.gtk.linux.ppc
if (parent.columnCount == 0) {
column = OS.gtk_tree_view_get_column (parent.handle, index);
parent.maxWidth = Math.max(parent.maxWidth, parent.calculateWidth(column, this.handle));
内容来源于网络,如有侵权,请联系作者删除!