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
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: 2902
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: Thu Apr 25 19:31:55 GMT 2024

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

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

Back to the top