use of org.eclipse.nebula.widgets.nattable.hierarchical.action.HierarchicalTreeColumnReorderDragMode in project nebula.widgets.nattable by eclipse.
the class DefaultHierarchicalTreeLayerConfiguration method configureUiBindings.
@Override
public void configureUiBindings(UiBindingRegistry uiBindingRegistry) {
TreeExpandCollapseAction treeExpandCollapseAction = new TreeExpandCollapseAction();
CellPainterMouseEventMatcher treeImagePainterMouseEventMatcher = new CellPainterMouseEventMatcher(GridRegion.BODY, MouseEventMatcher.LEFT_BUTTON, TreeImagePainter.class);
uiBindingRegistry.registerFirstSingleClickBinding(treeImagePainterMouseEventMatcher, treeExpandCollapseAction);
// Obscure any mouse down bindings for this image painter
uiBindingRegistry.registerFirstMouseDownBinding(treeImagePainterMouseEventMatcher, new NoOpMouseAction());
// configure a specialized ColumnReorderDragMode
uiBindingRegistry.registerMouseDragMode(MouseEventMatcher.columnHeaderLeftClick(SWT.NONE), new AggregateDragMode(new CellDragMode(), new HierarchicalTreeColumnReorderDragMode(this.treeLayer)));
}
Aggregations