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

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

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

Table.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) {
  getTable().setHeaderForeground(color);
}

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

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

相关文章

微信公众号

最新文章

更多

Table类方法