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

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

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

Table.computeTrim介绍

暂无

代码示例

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

@Override
public Rectangle computeTrim (int x, int y, int width, int height) {
  checkWidget();
  return table.computeTrim(x, y, width, height);
}

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

@Override
public Rectangle computeTrim (int x, int y, int width, int height) {
  checkWidget();
  return table.computeTrim(x, y, width, height);
}

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

@Override
public Rectangle computeTrim (int x, int y, int width, int height) {
  checkWidget();
  return table.computeTrim(x, y, width, height);
}

代码示例来源:origin: org.eclipse.scout.sdk.deps/org.eclipse.swt.win32.win32.x86

@Override
public Rectangle computeTrim (int x, int y, int width, int height) {
  checkWidget();
  return table.computeTrim(x, y, width, height);
}

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

public Rectangle computeTrim (int x, int y, int width, int height) {
  checkWidget();
  return table.computeTrim(x, y, width, height);
}

代码示例来源:origin: org.eclipse.platform/org.eclipse.jface.text

/**
 * Returns the minimal required height for the popup, may return 0 if the popup has not been
 * created yet.
 *
 * @return the minimal height
 * @since 3.3
 */
int getMinimalHeight() {
  int height= 0;
  if (Helper.okToUse(fContextSelectorTable)) {
    int items= fContextSelectorTable.getItemHeight() * 10;
    Rectangle trim= fContextSelectorTable.computeTrim(0, 0, SWT.DEFAULT, items);
    height= trim.height;
  }
  return height;
}

代码示例来源:origin: org.eclipse.scout.sdk.deps/org.eclipse.jface.text

/**
 * Returns the minimal required height for the popup, may return 0 if the popup has not been
 * created yet.
 *
 * @return the minimal height
 * @since 3.3
 */
int getMinimalHeight() {
  int height= 0;
  if (Helper.okToUse(fContextSelectorTable)) {
    int items= fContextSelectorTable.getItemHeight() * 10;
    Rectangle trim= fContextSelectorTable.computeTrim(0, 0, SWT.DEFAULT, items);
    height= trim.height;
  }
  return height;
}

代码示例来源:origin: org.eclipse.platform/org.eclipse.jface.text

/**
 * Returns the minimal required height for the proposal, may return 0 if the popup has not been
 * created yet.
 *
 * @return the minimal height
 * @since 3.3
 */
int getMinimalHeight() {
  int height= 0;
  if (Helper.okToUse(fProposalTable)) {
    int items= fProposalTable.getItemHeight() * 10;
    Rectangle trim= fProposalTable.computeTrim(0, 0, SWT.DEFAULT, items);
    height= trim.height;
  }
  if (Helper.okToUse(fMessageText))
    height+= fMessageText.getSize().y + 1;
  return height;
}

代码示例来源:origin: org.eclipse.platform/org.eclipse.ui.workbench

private String getSeparatorLabel(String separatorLabel) {
  Rectangle rect = list.getTable().getBounds();
  int borderWidth = list.getTable().computeTrim(0, 0, 0, 0).width;
  int imageWidth = WorkbenchImages.getImage(
      IWorkbenchGraphicConstants.IMG_OBJ_SEPARATOR).getBounds().width;
  int width = rect.width - borderWidth - imageWidth;
  GC gc = new GC(list.getTable());
  gc.setFont(list.getTable().getFont());
  int fSeparatorWidth = gc.getAdvanceWidth('-');
  int fMessageLength = gc.textExtent(separatorLabel).x;
  gc.dispose();
  StringBuilder dashes = new StringBuilder();
  int chars = (((width - fMessageLength) / fSeparatorWidth) / 2) - 2;
  for (int i = 0; i < chars; i++) {
    dashes.append('-');
  }
  StringBuilder result = new StringBuilder();
  result.append(dashes);
  result.append(" " + separatorLabel + " "); //$NON-NLS-1$//$NON-NLS-2$
  result.append(dashes);
  return result.toString().trim();
}

代码示例来源:origin: org.eclipse.scout.sdk.deps/org.eclipse.jface.text

/**
 * Returns the minimal required height for the proposal, may return 0 if the popup has not been
 * created yet.
 *
 * @return the minimal height
 * @since 3.3
 */
int getMinimalHeight() {
  int height= 0;
  if (Helper.okToUse(fProposalTable)) {
    int items= fProposalTable.getItemHeight() * 10;
    Rectangle trim= fProposalTable.computeTrim(0, 0, SWT.DEFAULT, items);
    height= trim.height;
  }
  if (Helper.okToUse(fMessageText))
    height+= fMessageText.getSize().y + 1;
  return height;
}

代码示例来源: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.springframework.extensions.surf/spring-surf-commons-ui

Point size = table.computeSize(SWT.DEFAULT, SWT.DEFAULT);
ScrollBar vBar = table.getVerticalBar();
int width = area.width - table.computeTrim(0,0,0,0).width - vBar.getSize().x;
if (size.y > area.height + table.getHeaderHeight()) 
if (oldSize.x <= area.width) 
  table.setSize(area.width, table.computeTrim(0,0,0,0).height);
  table.setSize(area.width, table.computeTrim(0,0,0,0).height);

代码示例来源:origin: org.eclipse.jdt/org.eclipse.jdt.ui

fTableWidthDelta= fTable.computeTrim(0, 0, 0, 0).width - fScrollbarWidth;
fSeparatorIcon= JavaPluginImages.DESC_OBJS_TYPE_SEPARATOR.createImage(fTable.getDisplay());

代码示例来源:origin: org.eclipse/org.eclipse.jdt.ui

fTableWidthDelta= fTable.computeTrim(0, 0, 0, 0).width - fScrollbarWidth;
fSeparatorIcon= JavaPluginImages.DESC_OBJS_TYPE_SEPARATOR.createImage(fTable.getDisplay());

代码示例来源:origin: org.eclipse.scout.sdk.deps/org.eclipse.jdt.ui

fTableWidthDelta= fTable.computeTrim(0, 0, 0, 0).width - fScrollbarWidth;
fSeparatorIcon= JavaPluginImages.DESC_OBJS_TYPE_SEPARATOR.createImage(fTable.getDisplay());

代码示例来源:origin: org.eclipse/org.eclipse.ajdt.ui

fTableWidthDelta= fTable.computeTrim(0, 0, 0, 0).width - fScrollbarWidth;
fSeparatorIcon= JavaPluginImages.DESC_OBJS_TYPE_SEPARATOR.createImage(fTable.getDisplay());

代码示例来源:origin: org.eclipse.platform/org.eclipse.jface.text

Rectangle trim= fProposalTable.computeTrim(0, 0, width, height);
data.heightHint= trim.height;
data.widthHint= trim.width;

代码示例来源:origin: org.eclipse.scout.sdk.deps/org.eclipse.jface.text

Rectangle trim= fProposalTable.computeTrim(0, 0, width, height);
data.heightHint= trim.height;
data.widthHint= trim.width;

相关文章

微信公众号

最新文章

更多

Table类方法