Eclipse rcp 如何更改行的网格线颜色?

Eclipse rcp 如何更改行的网格线颜色?,eclipse-rcp,nattable,Eclipse Rcp,Nattable,我试过了 IConfigLabelAccumulator cellLabelAccumulator = new IConfigLabelAccumulator() { @Override public void accumulateConfigLabels(LabelStack configLabels, int columnPosition, int rowPosition) { int rowIndex = bodyDataLayer.getRowIndexB

我试过了

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");
但是没有成功。
我怎样才能做到这一点?谢谢

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

您的问题是什么,请在问题中添加更多描述谢谢!我试试看。