2017-03-06 8 views
0

私は行のグリッド線の色を変更するにはどうすればよいですか?

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"); 

を試みたが、それがうまくいきませんでした。 これをどうすれば実現できますか?ありがとう!

+0

あなたの問題は何ですか、詳細な説明質問に追加 –

答えて

0

1行のグリッド線の色を変更することはできません。グリッド全体に対してのみ変更することができます。他の唯一の方法は、IOverlayPainterを使用して上書きすることです。

+0

ありがとう!私はそれを試してみます。 – Joe

関連する問題