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.
  • Constructor Details

    • CellSelectionDragMode

      public CellSelectionDragMode()
  • Method Details

    • 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 class AutoScrollDragMode
      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 interface IDragMode
      Overrides:
      mouseUp in class AutoScrollDragMode