|
|
Re: Can I add an icon in RowHeader in NatTable ? [message #1728024 is a reply to message #1727595] |
Wed, 30 March 2016 06:43   |
Eclipse User |
|
|
|
I had found I can add icon in ThemeConfiguration (extends DefaultNatTableThemeConfiguration), like this
// row header styling
this.rHeaderFont = selectedRowFont;
this.rHeaderCellPainter = new CellPainterDecorator(new TextPainter(),
CellEdgeEnum.RIGHT,
new ImagePainter(SWTUtils.getImage(Constants.ICON_ADD)));
this.rHeaderSelectionCellPainter = new CellPainterDecorator(new TextPainter(),
CellEdgeEnum.RIGHT,
new ImagePainter(SWTUtils.getImage(Constants.ICON_ADD)));
this.rHeaderFullSelectionCellPainter = new CellPainterDecorator(new TextPainter(),
CellEdgeEnum.RIGHT,
new ImagePainter(SWTUtils.getImage(Constants.ICON_ADD)));
then all rows header has same icon, while, my questions is can I add different icon in assigned rows and how ?
Thanks,
Luke Chen
|
|
|
|
|
|
Re: Can I add an icon in RowHeader in NatTable ? [message #1728493 is a reply to message #1728157] |
Mon, 04 April 2016 20:45  |
Eclipse User |
|
|
|
I am sorry for reply you now because of Traditional Chinese Holidays.
You are right, I fixed it according to your suggestions and thanks you very much. I used IConfigLabelAccumulator to change config label at any time refresh data. I bind a config label to a cell painter to redraw an icon.
You are so nice.
|
|
|
Powered by
FUDForum. Page generated in 0.04453 seconds