Skip to main content

Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Eclipse Projects » NatTable » Cell Painter
Cell Painter [message #1057712] Wed, 08 May 2013 07:52 Go to next message
Saket M is currently offline Saket MFriend
Messages: 3
Registered: April 2013
Junior Member
I want to add styling to my commented cells. The labels are added correctly but check box and combo box cells arent displaying the style. The same style is working for text boxes. Here is the styling code that I use

private ICellPainter checkBoxCellPainter;

public void configureRegistry(IConfigRegistry configRegistry) {

checkBoxCellPainter = new CheckBoxPainter();
registerCheckBoxEditor(configRegistry, checkBoxCellPainter, new CheckBoxCellEditor());

new LineBorderDecorator(checkBoxCellPainter, new BorderStyle(2, ColorConstants.lightBlue, BorderStyle.LineStyleEnum.SOLID )),
DisplayMode.NORMAL, DecisionTableSWTFormViewer.CHECK_BOX_COMMENT_LABEL);


private void registerCheckBoxEditor(IConfigRegistry configRegistry, ICellPainter checkBoxCellPainter, ICellEditor checkBoxCellEditor) {
configRegistry.registerConfigAttribute(CellConfigAttributes.CELL_PAINTER, checkBoxCellPainter, DisplayMode.NORMAL, DecisionTableSWTFormViewer.CHECK_BOX_CONFIG_LABEL);
configRegistry.registerConfigAttribute(CellConfigAttributes.DISPLAY_CONVERTER, new StringToBooleanDisplayConverter(), DisplayMode.NORMAL, DecisionTableSWTFormViewer.CHECK_BOX_CONFIG_LABEL);
configRegistry.registerConfigAttribute(EditConfigAttributes.CELL_EDITOR, checkBoxCellEditor, DisplayMode.NORMAL, DecisionTableSWTFormViewer.CHECK_BOX_EDITOR_CONFIG_LABEL);

Am I doing soemthing wrong?
Re: Cell Painter [message #1057757 is a reply to message #1057712] Wed, 08 May 2013 15:22 Go to previous message
Dirk Fauth is currently offline Dirk FauthFriend
Messages: 2814
Registered: July 2012
Senior Member
Don't see something special. Are you sure that the configuration is added before calling natTable.configure()?
Previous Topic:Simple Cell Editing
Next Topic:Filter from database
Goto Forum:

Current Time: Tue Aug 03 05:38:07 GMT 2021

Powered by FUDForum. Page generated in 0.02087 seconds
.:: Contact :: Home ::.

Powered by: FUDforum 3.0.2.
Copyright ©2001-2010 FUDforum Bulletin Board Software

Back to the top