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

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

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

Tree.setHeaderForeground介绍

[英]Sets the header foreground color to the color specified by the argument, or to the default system color if the argument is null.
[中]

代码示例

代码示例来源:origin: org.eclipse.platform/org.eclipse.e4.ui.css.swt

@Override
public void setHeaderColor(Color color) {
  getTree().setHeaderForeground(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));
}

相关文章

Tree类方法