use of org.eclipse.nebula.widgets.nattable.ui.action.IMouseAction in project nebula.widgets.nattable by eclipse.
the class RowOnlySelectionBindings method configureBodyMouseClickBindings.
@Override
protected void configureBodyMouseClickBindings(UiBindingRegistry uiBindingRegistry) {
IMouseAction action = new SelectRowAction();
uiBindingRegistry.registerFirstMouseDownBinding(MouseEventMatcher.bodyLeftClick(SWT.NONE), action);
uiBindingRegistry.registerFirstMouseDownBinding(MouseEventMatcher.bodyLeftClick(SWT.MOD2), action);
uiBindingRegistry.registerFirstMouseDownBinding(MouseEventMatcher.bodyLeftClick(SWT.MOD1), action);
uiBindingRegistry.registerFirstMouseDownBinding(MouseEventMatcher.bodyLeftClick(SWT.MOD2 | SWT.MOD1), action);
}
use of org.eclipse.nebula.widgets.nattable.ui.action.IMouseAction in project nebula.widgets.nattable by eclipse.
the class ConfigurableModeEventHandler method mouseEnter.
@Override
public synchronized void mouseEnter(MouseEvent event) {
if (event.x >= 0 && event.y >= 0) {
IMouseAction mouseEnterAction = getUiBindingRegistry().getMouseEnterAction(event);
if (mouseEnterAction != null) {
event.data = NatEventData.createInstanceFromEvent(event);
mouseEnterAction.run(this.natTable, event);
} else {
this.natTable.setCursor(null);
}
}
}
use of org.eclipse.nebula.widgets.nattable.ui.action.IMouseAction in project nebula.widgets.nattable by eclipse.
the class ConfigurableModeEventHandler method mouseExit.
@Override
public synchronized void mouseExit(MouseEvent event) {
IMouseAction mouseExitAction = getUiBindingRegistry().getMouseExitAction(event);
if (mouseExitAction != null) {
event.data = NatEventData.createInstanceFromEvent(event);
mouseExitAction.run(this.natTable, event);
} else {
this.natTable.setCursor(null);
}
}
use of org.eclipse.nebula.widgets.nattable.ui.action.IMouseAction in project nebula.widgets.nattable by eclipse.
the class ConfigurableModeEventHandler method mouseHover.
@Override
public synchronized void mouseHover(MouseEvent event) {
if (event.x >= 0 && event.y >= 0) {
IMouseAction mouseHoverAction = getUiBindingRegistry().getMouseHoverAction(event);
if (mouseHoverAction != null) {
event.data = NatEventData.createInstanceFromEvent(event);
mouseHoverAction.run(this.natTable, event);
}
}
}
use of org.eclipse.nebula.widgets.nattable.ui.action.IMouseAction in project nebula.widgets.nattable by eclipse.
the class DefaultRowGroupHeaderLayerConfiguration method configureUiBindings.
@Override
public void configureUiBindings(UiBindingRegistry uiBindingRegistry) {
final IMouseAction action = new SelectRowGroupsAction();
uiBindingRegistry.registerSingleClickBinding(MouseEventMatcher.rowGroupHeaderLeftClick(SWT.NONE), action);
uiBindingRegistry.registerSingleClickBinding(MouseEventMatcher.rowGroupHeaderLeftClick(SWT.MOD1), action);
uiBindingRegistry.registerSingleClickBinding(MouseEventMatcher.rowGroupHeaderLeftClick(SWT.MOD2), action);
uiBindingRegistry.registerDoubleClickBinding(MouseEventMatcher.rowGroupHeaderLeftClick(SWT.NONE), new RowGroupExpandCollapseAction());
}
Aggregations