use of org.eclipse.nebula.widgets.nattable.group.action.UngroupColumnsAction in project nebula.widgets.nattable by eclipse.
the class DefaultColumnGroupHeaderLayerConfiguration method configureUiBindings.
@Override
public void configureUiBindings(UiBindingRegistry uiBindingRegistry) {
// Column Group Header is a part of the Group Header.
// Register the 'column group header matcher' first so that it gets
// picked up before the more general 'column header matcher'.
uiBindingRegistry.registerMouseDragMode(MouseEventMatcher.columnGroupHeaderLeftClick(SWT.NONE), new AggregateDragMode(new CellDragMode(), new ColumnGroupHeaderReorderDragMode(this.columnGroupModel)));
uiBindingRegistry.registerMouseDragMode(MouseEventMatcher.columnHeaderLeftClick(SWT.NONE), new AggregateDragMode(new CellDragMode(), new ColumnHeaderReorderDragMode(this.columnGroupModel)));
// added NoOpMouseAction on single click because of Bug 428901
if (!this.enableColumnGroupSelectionHandling) {
uiBindingRegistry.registerFirstSingleClickBinding(MouseEventMatcher.columnGroupHeaderLeftClick(SWT.NONE), new NoOpMouseAction());
uiBindingRegistry.registerFirstSingleClickBinding(MouseEventMatcher.columnGroupHeaderLeftClick(SWT.MOD1), new NoOpMouseAction());
uiBindingRegistry.registerFirstSingleClickBinding(MouseEventMatcher.columnGroupHeaderLeftClick(SWT.MOD2), new NoOpMouseAction());
uiBindingRegistry.registerFirstSingleClickBinding(MouseEventMatcher.columnGroupHeaderLeftClick(SWT.MOD1 | SWT.MOD2), new NoOpMouseAction());
} else {
uiBindingRegistry.registerFirstSingleClickBinding(MouseEventMatcher.columnGroupHeaderLeftClick(SWT.NONE), new ViewportSelectColumnGroupAction(false, false));
uiBindingRegistry.registerFirstSingleClickBinding(MouseEventMatcher.columnGroupHeaderLeftClick(SWT.MOD1), new ViewportSelectColumnGroupAction(false, true));
uiBindingRegistry.registerFirstSingleClickBinding(MouseEventMatcher.columnGroupHeaderLeftClick(SWT.MOD2), new ViewportSelectColumnGroupAction(true, false));
uiBindingRegistry.registerFirstSingleClickBinding(MouseEventMatcher.columnGroupHeaderLeftClick(SWT.MOD1 | SWT.MOD2), new ViewportSelectColumnGroupAction(true, true));
}
uiBindingRegistry.registerDoubleClickBinding(MouseEventMatcher.columnGroupHeaderLeftClick(SWT.NONE), new ColumnGroupExpandCollapseAction());
uiBindingRegistry.registerKeyBinding(new KeyEventMatcher(SWT.MOD1, 'g'), new CreateColumnGroupAction());
uiBindingRegistry.registerKeyBinding(new KeyEventMatcher(SWT.MOD1, 'u'), new UngroupColumnsAction());
}
use of org.eclipse.nebula.widgets.nattable.group.action.UngroupColumnsAction in project nebula.widgets.nattable by eclipse.
the class ColumnGroupConfiguration method configureUiBindings.
@Override
public void configureUiBindings(UiBindingRegistry uiBindingRegistry) {
// Column Group Header is a part of the Group Header.
// Register the 'column group header matcher' first so that it gets
// picked up before the more general 'column header matcher'.
uiBindingRegistry.registerMouseDragMode(MouseEventMatcher.columnGroupHeaderLeftClick(SWT.NONE), new AggregateDragMode(new CellDragMode(), new ColumnGroupHeaderReorderDragMode(this.columnGroupModel)));
uiBindingRegistry.registerMouseDragMode(MouseEventMatcher.columnHeaderLeftClick(SWT.NONE), new ColumnHeaderReorderDragMode(this.columnGroupModel));
uiBindingRegistry.registerFirstSingleClickBinding(MouseEventMatcher.columnGroupHeaderLeftClick(SWT.NONE), new ColumnGroupExpandCollapseAction());
uiBindingRegistry.registerKeyBinding(new KeyEventMatcher(SWT.MOD1, 'g'), new CreateColumnGroupAction());
uiBindingRegistry.registerKeyBinding(new KeyEventMatcher(SWT.MOD1, 'u'), new UngroupColumnsAction());
}
Aggregations