【问题标题】:How can I change the gridline color for the row?如何更改行的网格线颜色?
【发布时间】:2017-03-07 03:22:46
【问题描述】:

我试过了

IConfigLabelAccumulator cellLabelAccumulator = new IConfigLabelAccumulator() {
    @Override
    public void accumulateConfigLabels(LabelStack configLabels, int columnPosition, int rowPosition) {
        int rowIndex = bodyDataLayer.getRowIndexByPosition(rowPosition);
        if ( rowIndex == 2) {
            configLabels.addLabel("FOO");
        }
    }
};
bodyDataLayer.setConfigLabelAccumulator(cellLabelAccumulator);
natTable.getConfigRegistry().registerConfigAttribute(CellConfigAttributes.GRID_LINE_COLOR, GUIHelper.COLOR_GREEN, DisplayMode.NORMAL, "FOO");

但它没有成功。 我怎样才能做到这一点?谢谢!

【问题讨论】:

  • 你的问题是什么,更多描述添加到问题中

标签: eclipse-rcp nattable


【解决方案1】:

无法更改单行的网格线颜色。您只能为整个网格更改它。唯一的另一种方法是通过 IOverlayPainter 进行重绘。

【讨论】:

  • 谢谢!我试试看。
猜你喜欢
  • 2018-10-01
  • 2015-03-22
  • 2018-02-20
  • 1970-01-01
  • 1970-01-01
  • 1970-01-01
  • 1970-01-01
  • 1970-01-01
  • 1970-01-01
相关资源
最近更新 更多