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
Hi,
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;

@Override
public void configureRegistry(IConfigRegistry configRegistry) {

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

configRegistry.registerConfigAttribute(CellConfigAttributes.CELL_PAINTER,
new LineBorderDecorator(checkBoxCellPainter, new BorderStyle(2, ColorConstants.lightBlue, BorderStyle.LineStyleEnum.SOLID )),
DisplayMode.NORMAL, DecisionTableSWTFormViewer.CHECK_BOX_COMMENT_LABEL);
super.configureRegistry(configR[/ALIGN]egistry);

}

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: 1431
Registered: July 2012
Senior Member
Don't see something special. Are you sure that the configuration is added before calling natTable.configure()?
Previous Topic:Filter from database
Next Topic:NPEs on empty table (BodyCellEditorMouseEventMatcher)
Goto Forum:
  


Current Time: Thu Dec 18 00:59:23 GMT 2014

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

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