use of net.sourceforge.nattable.ui.action.IDragMode in project translationstudio8 by heartsome.
the class RowOnlySelectionBindings method configureBodyMouseDragMode.
@Override
protected void configureBodyMouseDragMode(UiBindingRegistry uiBindingRegistry) {
IDragMode dragMode = new RowSelectionDragMode();
uiBindingRegistry.registerFirstMouseDragMode(MouseEventMatcher.bodyLeftClick(SWT.NONE), dragMode);
uiBindingRegistry.registerFirstMouseDragMode(MouseEventMatcher.bodyLeftClick(SWT.SHIFT), dragMode);
uiBindingRegistry.registerFirstMouseDragMode(MouseEventMatcher.bodyLeftClick(SWT.CONTROL), dragMode);
uiBindingRegistry.registerFirstMouseDragMode(MouseEventMatcher.bodyLeftClick(SWT.SHIFT | SWT.CONTROL), dragMode);
}
use of net.sourceforge.nattable.ui.action.IDragMode in project translationstudio8 by heartsome.
the class ConfigurableModeEventHandler method mouseDown.
@Override
public void mouseDown(MouseEvent event) {
IMouseAction mouseDownAction = uiBindingRegistry.getMouseDownAction(event);
if (mouseDownAction != null) {
event.data = NatEventData.createInstanceFromEvent(event);
mouseDownAction.run(natTable, event);
}
IMouseAction singleClickAction = uiBindingRegistry.getSingleClickAction(event);
IMouseAction doubleClickAction = uiBindingRegistry.getDoubleClickAction(event);
IDragMode dragMode = uiBindingRegistry.getDragMode(event);
if (singleClickAction != null || doubleClickAction != null || dragMode != null) {
switchMode(new MouseModeEventHandler(getModeSupport(), natTable, event, singleClickAction, doubleClickAction, dragMode));
}
}
Aggregations