Search in sources :

Example 1 with FillHandleCursorAction

use of org.eclipse.nebula.widgets.nattable.fillhandle.action.FillHandleCursorAction in project nebula.widgets.nattable by eclipse.

the class FillHandleConfiguration method configureUiBindings.

@Override
public void configureUiBindings(UiBindingRegistry uiBindingRegistry) {
    FillHandleEventMatcher matcher = new FillHandleEventMatcher(this.painter);
    // Mouse move
    // Show fill handle cursor
    uiBindingRegistry.registerFirstMouseMoveBinding(matcher, new FillHandleCursorAction());
    uiBindingRegistry.registerMouseMoveBinding(new MouseEventMatcher(), new ClearCursorAction());
    // Mouse drag
    // trigger the handle drag operations
    uiBindingRegistry.registerFirstMouseDragMode(matcher, new FillHandleDragMode(this.selectionLayer, this.clipboard));
    // Mouse click
    // ensure no selection is triggered on mouse down on the handle
    uiBindingRegistry.registerFirstMouseDownBinding(matcher, new NoOpMouseAction());
}
Also used : FillHandleDragMode(org.eclipse.nebula.widgets.nattable.fillhandle.action.FillHandleDragMode) MouseEventMatcher(org.eclipse.nebula.widgets.nattable.ui.matcher.MouseEventMatcher) FillHandleCursorAction(org.eclipse.nebula.widgets.nattable.fillhandle.action.FillHandleCursorAction) ClearCursorAction(org.eclipse.nebula.widgets.nattable.ui.action.ClearCursorAction) NoOpMouseAction(org.eclipse.nebula.widgets.nattable.ui.action.NoOpMouseAction) FillHandleEventMatcher(org.eclipse.nebula.widgets.nattable.fillhandle.event.FillHandleEventMatcher)

Aggregations

FillHandleCursorAction (org.eclipse.nebula.widgets.nattable.fillhandle.action.FillHandleCursorAction)1 FillHandleDragMode (org.eclipse.nebula.widgets.nattable.fillhandle.action.FillHandleDragMode)1 FillHandleEventMatcher (org.eclipse.nebula.widgets.nattable.fillhandle.event.FillHandleEventMatcher)1 ClearCursorAction (org.eclipse.nebula.widgets.nattable.ui.action.ClearCursorAction)1 NoOpMouseAction (org.eclipse.nebula.widgets.nattable.ui.action.NoOpMouseAction)1 MouseEventMatcher (org.eclipse.nebula.widgets.nattable.ui.matcher.MouseEventMatcher)1