Hello everyone!
We've encountered a pretty boring problem and for some days now we haven't been able to solve it. To give a bit of background, we have a Nebula NatTable with 5 columns, where the last one should be a a column containing simple check boxes. We have followed this tutorial: https://www.vogella.com/tutorials/NatTableEditing/article.html. However, the problem we have is with actual clicking on the cell. If you just click on it, it doesn't change the state. However, if the cell is selected and you then push the space bar, the tick does (dis)appear and the underlying command is triggered. Here's the configuration we have so far:
`public class CheckBoxConfigurationNebula extends AbstractRegistryConfiguration {
@Override
public void configureRegistry(final IConfigRegistry configRegistry) {
configRegistry.registerConfigAttribute(
EditConfigAttributes.CELL_EDITABLE_RULE,
IEditableRule.ALWAYS_EDITABLE
);
registerCheckBoxEditor(configRegistry);
}
private static void registerCheckBoxEditor(final IConfigRegistry configRegistry) {
configRegistry.registerConfigAttribute(EditConfigAttributes.CELL_EDITOR, new CheckBoxCellEditor(),
DisplayMode.EDIT, NatTableWidgetFactory.VISIBILITY_CELL);
// Visualized as a check box button
configRegistry.registerConfigAttribute(CellConfigAttributes.CELL_PAINTER,
new CheckBoxPainter(),
DisplayMode.NORMAL, NatTableWidgetFactory.VISIBILITY_CELL);
// Needs a Boolean conversion to work correctly
configRegistry.registerConfigAttribute(CellConfigAttributes.DISPLAY_CONVERTER,
new DefaultBooleanDisplayConverter(), DisplayMode.NORMAL, NatTableWidgetFactory.VISIBILITY_CELL);
}
}`
Do you have an idea what could be the problem?
Hello everyone!
We've encountered a pretty boring problem and for some days now we haven't been able to solve it. To give a bit of background, we have a Nebula NatTable with 5 columns, where the last one should be a a column containing simple check boxes. We have followed this tutorial: https://www.vogella.com/tutorials/NatTableEditing/article.html. However, the problem we have is with actual clicking on the cell. If you just click on it, it doesn't change the state. However, if the cell is selected and you then push the space bar, the tick does (dis)appear and the underlying command is triggered. Here's the configuration we have so far:
`public class CheckBoxConfigurationNebula extends AbstractRegistryConfiguration {
}`
Do you have an idea what could be the problem?