Skip to main content



      Home
Home » Eclipse Projects » NatTable » Cell Painter
Cell Painter [message #1057712] Wed, 08 May 2013 03:52 Go to next message
Eclipse UserFriend
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 11:22 Go to previous message
Eclipse UserFriend
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: Fri Jul 04 17:36:49 EDT 2025

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

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

Back to the top