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

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

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

TableColumn.getImage介绍

暂无

代码示例

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

/**
 * @param c
 * @return
 */
private Image getColumnImage(Item item) {
  if (item instanceof TableColumn) {
    return ((TableColumn) item).getImage();
  } else if (item instanceof TreeColumn) {
    return ((TreeColumn) item).getImage();
  }
  return null;
}

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

/**
 * @param c
 * @return
 */
private Image getColumnImage(Item item) {
  if (item instanceof TableColumn) {
    return ((TableColumn) item).getImage();
  } else if (item instanceof TreeColumn) {
    return ((TreeColumn) item).getImage();
  }
  return null;
}

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

/**
 * @param c
 * @return
 */
private Image getColumnImage(Item item) {
  if (item instanceof TableColumn) {
    return ((TableColumn) item).getImage();
  } else if (item instanceof TreeColumn) {
    return ((TreeColumn) item).getImage();
  }
  return null;
}

代码示例来源:origin: org.eclipse.rap/org.eclipse.rap.rwt

final int getPreferredWidth () {
 // Compute width from the column itself
 int result = 0;
 Font font = parent.getHeaderFont();
 if( text.length() > 0 ) {
  if( text.indexOf( '\n' ) != -1 ) {
   result = TextSizeUtil.textExtent( font, text, 0 ).x;
  } else {
   result = TextSizeUtil.stringExtent( font, text ).x;
  }
 }
 Image image = getImage();
 if( image != null ) {
  result += image.getBounds().width + SPACING;
 }
 if( parent.getSortColumn() == this && parent.getSortDirection() != SWT.NONE ) {
  result += SORT_INDICATOR_WIDTH + SPACING;
 }
 BoxDimensions headerPadding = parent.getThemeAdapter().getHeaderPadding( parent );
 result += headerPadding.left + headerPadding.right;
 // Mimic Windows behaviour that forces first item to resolve
 if( parent.getItemCount() > 0 && parent.getCachedItems().length == 0 ) {
  parent.checkData( parent.getItem( 0 ), 0 );
 }
 // Extend computed width if there are wider items
 int columnIndex = parent.indexOf( this );
 int itemsPreferredWidth = parent.getItemsPreferredWidth( columnIndex );
 // Add 1px for the right column border
 return Math.max( result, itemsPreferredWidth ) + 1;
}

代码示例来源:origin: org.eclipse.rap/org.eclipse.rap.rwt

textHeight = Math.max( textHeight, columnTextHeight );
Image image = column.getImage();
int height = image == null ? 0 : image.getBounds().height;
if( height > imageHeight ) {

相关文章