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

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

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

Tree.getHeaderForeground介绍

[英]Returns the header foreground color.
[中]

代码示例

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

void setHeaderForeground () {
  if (!instance.startup) {
    tree1.setHeaderForeground (headerForegroundColor);
    tree2.setHeaderForeground (headerForegroundColor);
  }
  /* Set the header foreground color item's image to match the header foreground color. */
  Color color = headerForegroundColor;
  if (color == null) color = tree1.getHeaderForeground();
  TableItem item =  colorAndFontTable.getItem(HEADER_FOREGROUND_COLOR);
  Image oldImage1 = item.getImage();
  if (oldImage1 != null) oldImage1.dispose();
  item.setImage (colorImage(color));
}

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

@Override
public void preserveValues( Tree tree ) {
 preserveProperty( tree, PROP_ITEM_COUNT, tree.getItemCount() );
 preserveProperty( tree, PROP_ITEM_HEIGHT, tree.getItemHeight() );
 preserveProperty( tree, PROP_ITEM_METRICS, getItemMetrics( tree ) );
 preserveProperty( tree, PROP_COLUMN_COUNT, tree.getColumnCount() );
 preserveProperty( tree, PROP_COLUMN_ORDER, getColumnOrder( tree ) );
 preserveProperty( tree, PROP_FIXED_COLUMNS, getFixedColumns( tree ) );
 preserveProperty( tree, PROP_TREE_COLUMN, getTreeColumn( tree ) );
 preserveProperty( tree, PROP_HEADER_HEIGHT, tree.getHeaderHeight() );
 preserveProperty( tree, PROP_HEADER_VISIBLE, tree.getHeaderVisible() );
 preserveProperty( tree, PROP_HEADER_FOREGROUND, tree.getHeaderForeground() );
 preserveProperty( tree, PROP_HEADER_BACKGROUND, tree.getHeaderBackground() );
 preserveProperty( tree, PROP_LINES_VISIBLE, tree.getLinesVisible() );
 preserveProperty( tree, PROP_TOP_ITEM_INDEX, getTopItemIndex( tree ) );
 preserveProperty( tree, PROP_FOCUS_ITEM, getFocusItem( tree ) );
 preserveProperty( tree, PROP_SCROLL_LEFT, getScrollLeft( tree ) );
 preserveProperty( tree, PROP_SELECTION, getSelection( tree ) );
 preserveProperty( tree, PROP_SORT_DIRECTION, getSortDirection( tree ) );
 preserveProperty( tree, PROP_SORT_COLUMN, tree.getSortColumn() );
 preserveProperty( tree, PROP_ENABLE_CELL_TOOLTIP, CellToolTipUtil.isEnabledFor( tree ) );
 preserveProperty( tree, PROP_CELL_TOOLTIP_TEXT, null );
}

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

renderProperty( tree, PROP_HEADER_HEIGHT, tree.getHeaderHeight(), ZERO );
renderProperty( tree, PROP_HEADER_VISIBLE, tree.getHeaderVisible(), false );
renderProperty( tree, PROP_HEADER_FOREGROUND, tree.getHeaderForeground(), null );
renderProperty( tree, PROP_HEADER_BACKGROUND, tree.getHeaderBackground(), null );
renderProperty( tree, PROP_LINES_VISIBLE, tree.getLinesVisible(), false );

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

case HEADER_FOREGROUND_COLOR: {
  Color oldColor = headerForegroundColor;
  if (oldColor == null) oldColor = tree1.getHeaderForeground();
  colorDialog.setRGB(oldColor.getRGB());
  RGB rgb = colorDialog.open();

相关文章

Tree类方法