|
|
Re: Customize/Configure ColumnChooser [message #1817978 is a reply to message #1817932] |
Tue, 03 December 2019 19:19 |
Ludwig Moser Messages: 476 Registered: July 2009 |
Senior Member |
|
|
ok, i tried to copy the whole package of org.eclipse.nebula.widgets.nattable.columnChooser
and created package org.eclipse.nebula.widgets.nattable.columnChooser.bio
i prefixed all classes with Bio and Override all methods which need modifications - this is the most offensive solution i can see.
then unregistered the old
natTable.unregisterCommandHandler(DisplayColumnChooserCommand.class);
register my own handler
natTable.registerCommandHandler(new BioDisplayColumnChooserCommandHandler(
getBodyLayerStack().getSelectionLayer(),//SelectionLayer selectionLayer
getBodyLayerStack().getColumnHideShowLayer(),//ColumnHideShowLayer columnHideShowLayer
columnHeaderLayerStack.getColumnHeaderLayer(),// ColumnHeaderLayer columnHeaderLayer
getBodyLayerStack().groupByDataLayer, // DataLayer columnHeaderDataLayer
columnHeaderLayerStack.columnGroupHeaderLayer,// ColumnGroupHeaderLayer cgHeader
columnGroupModel,//ColumnGroupModel columnGroupModel
true,
true
));
after this my Bio*Handler gets created, but still the OLD dialog opens...
|
|
|
Re: Customize/Configure ColumnChooser [message #1818007 is a reply to message #1817978] |
Wed, 04 December 2019 07:19 |
Dirk Fauth Messages: 2903 Registered: July 2012 |
Senior Member |
|
|
1. It seems you hit a bug with sorting and column groups in the tree for available columns in the ColumnChooser. Although you did not mention this explicitly, it seems this is the issue you are talking about. I have created the following ticket for this: https://bugs.eclipse.org/bugs/show_bug.cgi?id=553731
2. The dialog size can be adjusted via IDialogSettings like this:
// Register column chooser
DisplayColumnChooserCommandHandler columnChooserCommandHandler =
new DisplayColumnChooserCommandHandler(
bodyLayer.getSelectionLayer(),
bodyLayer.getColumnHideShowLayer(),
columnHeaderLayer,
columnHeaderDataLayer,
columnGroupHeaderLayer,
this.columnGroupModel,
true);
IDialogSettings settings = new DialogSettings("columnChooser");
settings.put("DIALOG_WIDTH", 800);
settings.put("DIALOG_HEIGHT", 600);
columnChooserCommandHandler.setDialogSettings(settings);
bodyLayer.registerCommandHandler(columnChooserCommandHandler);
3. The DisplayColumnChooserCommandHandler is not registered by default anywhere in NatTable. It needs to be done programmatically on demand. That means, if still the default dialog opens in your case, you have somewhere registered the DisplayColumnChooserCommandHandler in your code which overrides your modified version. That said, please check your configuration/code.
|
|
|
Powered by
FUDForum. Page generated in 0.02981 seconds