Class CellSelectionDragMode
- java.lang.Object
-
- org.eclipse.nebula.widgets.nattable.viewport.action.AutoScrollDragMode
-
- org.eclipse.nebula.widgets.nattable.selection.action.CellSelectionDragMode
-
- All Implemented Interfaces:
IDragMode
- Direct Known Subclasses:
RowSelectionDragMode
public class CellSelectionDragMode extends AutoScrollDragMode
Fires commands to select a range of cells when the mouse is dragged in the viewport.
-
-
Nested Class Summary
-
Nested classes/interfaces inherited from class org.eclipse.nebula.widgets.nattable.viewport.action.AutoScrollDragMode
AutoScrollDragMode.AutoScrollRunnable
-
-
Field Summary
-
Fields inherited from class org.eclipse.nebula.widgets.nattable.viewport.action.AutoScrollDragMode
horizontalBorderOffset, verticalBorderOffset
-
-
Constructor Summary
Constructors Constructor Description CellSelectionDragMode()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description void
fireSelectionCommand(NatTable natTable, int columnPosition, int rowPosition, boolean shiftMask, boolean controlMask)
Execute a command to trigger selection.void
mouseDown(NatTable natTable, org.eclipse.swt.events.MouseEvent event)
void
mouseUp(NatTable natTable, org.eclipse.swt.events.MouseEvent event)
protected void
performDragAction(NatTable natTable, int x, int y, SelectionLayer.MoveDirectionEnum horizontal, SelectionLayer.MoveDirectionEnum vertical)
-
Methods inherited from class org.eclipse.nebula.widgets.nattable.viewport.action.AutoScrollDragMode
mouseMove
-
-
-
-
Method Detail
-
mouseDown
public void mouseDown(NatTable natTable, org.eclipse.swt.events.MouseEvent event)
-
performDragAction
protected void performDragAction(NatTable natTable, int x, int y, SelectionLayer.MoveDirectionEnum horizontal, SelectionLayer.MoveDirectionEnum vertical)
- Overrides:
performDragAction
in classAutoScrollDragMode
- Parameters:
natTable
- The NatTable instance the drag operation is currently performed on.x
- The x coordinate of the mouse pointer on mouse move. Corrected to be inside the NatTable client area.y
- The y coordinate of the mouse pointer on mouse move. Corrected to be inside the NatTable client area.horizontal
- The horizontal direction where the auto-scroll should be performed to.vertical
- The vertical direction where the auto-scroll should be performed to.
-
fireSelectionCommand
public void fireSelectionCommand(NatTable natTable, int columnPosition, int rowPosition, boolean shiftMask, boolean controlMask)
Execute a command to trigger selection.- Parameters:
natTable
- The NatTable to execute the command on.columnPosition
- The column position of the cell to select.rowPosition
- The row position of the cell to select.shiftMask
- Flag to configure whether the SHIFT mask is activated or not.controlMask
- Flag to configure whether the CTRL mask is activated or not.
-
mouseUp
public void mouseUp(NatTable natTable, org.eclipse.swt.events.MouseEvent event)
- Specified by:
mouseUp
in interfaceIDragMode
- Overrides:
mouseUp
in classAutoScrollDragMode
-
-