use of org.eclipse.nebula.widgets.nattable.tree.action.TreeExpandCollapseAction 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)));
}
use of org.eclipse.nebula.widgets.nattable.tree.action.TreeExpandCollapseAction in project nebula.widgets.nattable by eclipse.
the class DefaultTreeLayerConfiguration 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());
}
Aggregations