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

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

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

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()) {

相关文章

Tree类方法