本文整理了Java中org.eclipse.swt.widgets.Tree.computeTrim()
方法的一些代码示例,展示了Tree.computeTrim()
的具体用法。这些代码示例主要来源于Github
/Stackoverflow
/Maven
等平台,是从一些精选项目中提取出来的代码,具有较强的参考意义,能在一定程度帮忙到你。Tree.computeTrim()
方法的具体详情如下:
包路径:org.eclipse.swt.widgets.Tree
类名称:Tree
方法名:computeTrim
暂无
代码示例来源:origin: org.eclipse.swt.cocoa.macosx/x86_64
public Point computeSize (int wHint, int hHint, boolean changed) {
checkWidget ();
int width = 0, height = 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, true) + CELL_GAP;
gc.dispose ();
}
if ((style & SWT.CHECK) != 0) width += getCheckColumnWidth ();
} else {
width = wHint;
}
if (hHint == SWT.DEFAULT) {
height = (int)/*64*/((NSOutlineView) view).numberOfRows () * getItemHeight () + getHeaderHeight ();
} else {
height = hHint;
}
if (width <= 0) width = DEFAULT_WIDTH;
if (height <= 0) height = DEFAULT_HEIGHT;
Rectangle rect = computeTrim (0, 0, width, height);
return new Point (rect.width, rect.height);
}
代码示例来源:origin: org.eclipse.equinox.p2.ui.sdk/scheduler
Point size = tree.computeSize(SWT.DEFAULT, SWT.DEFAULT);
ScrollBar vBar = tree.getVerticalBar();
int width = area.width - tree.computeTrim(0, 0, 0, 0).width - vBar.getSize().x;
if (size.y > area.height + tree.getHeaderHeight()) {
内容来源于网络,如有侵权,请联系作者删除!