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

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

本文整理了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

  1. @Override
  2. public void setHeaderColor(Color color) {
  3. getTable().setHeaderForeground(color);
  4. }

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

  1. void setHeaderForeground () {
  2. if (!instance.startup) {
  3. table1.setHeaderForeground (headerForegroundColor);
  4. }
  5. /* Set the header foreground color item's image to match the header foreground color. */
  6. Color color = headerForegroundColor;
  7. if (color == null) color = table1.getHeaderForeground();
  8. TableItem item = colorAndFontTable.getItem(HEADER_FOREGROUND_COLOR);
  9. Image oldImage = item.getImage();
  10. if (oldImage != null) oldImage.dispose();
  11. item.setImage (colorImage(color));
  12. }

相关文章

Table类方法