Search in sources :

Example 1 with ClearCursorAction

use of org.eclipse.nebula.widgets.nattable.ui.action.ClearCursorAction 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)

Example 2 with ClearCursorAction

use of org.eclipse.nebula.widgets.nattable.ui.action.ClearCursorAction in project nebula.widgets.nattable by eclipse.

the class DefaultColumnResizeBindings method configureUiBindings.

@Override
public void configureUiBindings(UiBindingRegistry uiBindingRegistry) {
    // Mouse move - Show resize cursor
    uiBindingRegistry.registerFirstMouseMoveBinding(new ColumnResizeEventMatcher(SWT.NONE, GridRegion.COLUMN_HEADER, 0), new ColumnResizeCursorAction());
    uiBindingRegistry.registerMouseMoveBinding(new MouseEventMatcher(), new ClearCursorAction());
    // Column resize
    uiBindingRegistry.registerFirstMouseDragMode(new ColumnResizeEventMatcher(SWT.NONE, GridRegion.COLUMN_HEADER, 1), new ColumnResizeDragMode());
    uiBindingRegistry.registerDoubleClickBinding(new ColumnResizeEventMatcher(SWT.NONE, GridRegion.COLUMN_HEADER, 1), new AutoResizeColumnAction());
    uiBindingRegistry.registerSingleClickBinding(new ColumnResizeEventMatcher(SWT.NONE, GridRegion.COLUMN_HEADER, 1), new NoOpMouseAction());
}
Also used : ColumnResizeCursorAction(org.eclipse.nebula.widgets.nattable.resize.action.ColumnResizeCursorAction) MouseEventMatcher(org.eclipse.nebula.widgets.nattable.ui.matcher.MouseEventMatcher) AutoResizeColumnAction(org.eclipse.nebula.widgets.nattable.resize.action.AutoResizeColumnAction) ClearCursorAction(org.eclipse.nebula.widgets.nattable.ui.action.ClearCursorAction) NoOpMouseAction(org.eclipse.nebula.widgets.nattable.ui.action.NoOpMouseAction) ColumnResizeEventMatcher(org.eclipse.nebula.widgets.nattable.resize.event.ColumnResizeEventMatcher) ColumnResizeDragMode(org.eclipse.nebula.widgets.nattable.resize.mode.ColumnResizeDragMode)

Example 3 with ClearCursorAction

use of org.eclipse.nebula.widgets.nattable.ui.action.ClearCursorAction in project nebula.widgets.nattable by eclipse.

the class DefaultRowResizeBindings method configureUiBindings.

@Override
public void configureUiBindings(UiBindingRegistry uiBindingRegistry) {
    // Mouse move - Show resize cursor
    uiBindingRegistry.registerFirstMouseMoveBinding(new RowResizeEventMatcher(SWT.NONE, 0), new RowResizeCursorAction());
    uiBindingRegistry.registerMouseMoveBinding(new MouseEventMatcher(), new ClearCursorAction());
    // Row resize
    uiBindingRegistry.registerFirstMouseDragMode(new RowResizeEventMatcher(SWT.NONE, 1), new RowResizeDragMode());
    uiBindingRegistry.registerDoubleClickBinding(new RowResizeEventMatcher(SWT.NONE, 1), new AutoResizeRowAction());
    uiBindingRegistry.registerSingleClickBinding(new RowResizeEventMatcher(SWT.NONE, 1), new NoOpMouseAction());
}
Also used : RowResizeCursorAction(org.eclipse.nebula.widgets.nattable.resize.action.RowResizeCursorAction) MouseEventMatcher(org.eclipse.nebula.widgets.nattable.ui.matcher.MouseEventMatcher) RowResizeEventMatcher(org.eclipse.nebula.widgets.nattable.resize.event.RowResizeEventMatcher) AutoResizeRowAction(org.eclipse.nebula.widgets.nattable.resize.action.AutoResizeRowAction) ClearCursorAction(org.eclipse.nebula.widgets.nattable.ui.action.ClearCursorAction) RowResizeDragMode(org.eclipse.nebula.widgets.nattable.resize.mode.RowResizeDragMode) NoOpMouseAction(org.eclipse.nebula.widgets.nattable.ui.action.NoOpMouseAction)

Aggregations

ClearCursorAction (org.eclipse.nebula.widgets.nattable.ui.action.ClearCursorAction)3 NoOpMouseAction (org.eclipse.nebula.widgets.nattable.ui.action.NoOpMouseAction)3 MouseEventMatcher (org.eclipse.nebula.widgets.nattable.ui.matcher.MouseEventMatcher)3 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 AutoResizeColumnAction (org.eclipse.nebula.widgets.nattable.resize.action.AutoResizeColumnAction)1 AutoResizeRowAction (org.eclipse.nebula.widgets.nattable.resize.action.AutoResizeRowAction)1 ColumnResizeCursorAction (org.eclipse.nebula.widgets.nattable.resize.action.ColumnResizeCursorAction)1 RowResizeCursorAction (org.eclipse.nebula.widgets.nattable.resize.action.RowResizeCursorAction)1 ColumnResizeEventMatcher (org.eclipse.nebula.widgets.nattable.resize.event.ColumnResizeEventMatcher)1 RowResizeEventMatcher (org.eclipse.nebula.widgets.nattable.resize.event.RowResizeEventMatcher)1 ColumnResizeDragMode (org.eclipse.nebula.widgets.nattable.resize.mode.ColumnResizeDragMode)1 RowResizeDragMode (org.eclipse.nebula.widgets.nattable.resize.mode.RowResizeDragMode)1