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

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

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

Table.setHeaderBackground介绍

[英]Sets the header background 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 setHeaderBackgroundColor(Color color) {
  3. getTable().setHeaderBackground(color);
  4. }

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

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

相关文章

Table类方法