Class AutoScrollDragMode

java.lang.Object
org.eclipse.nebula.widgets.nattable.viewport.action.AutoScrollDragMode
All Implemented Interfaces:
IDragMode
Direct Known Subclasses:
CellSelectionDragMode, ColumnReorderDragMode, FillHandleDragMode, RowReorderDragMode

public abstract class AutoScrollDragMode extends Object implements IDragMode
Abstract IDragMode implementation to support auto-scrolling on dragging.
Since:
1.5
  • Field Details

    • horizontalBorderOffset

      protected int horizontalBorderOffset
    • verticalBorderOffset

      protected int verticalBorderOffset
      Since:
      2.0
  • Constructor Details

    • AutoScrollDragMode

      public AutoScrollDragMode(boolean horizontal, boolean vertical)
      Parameters:
      horizontal - true to support horizontal auto-scrolling.
      vertical - true to support vertical auto-scrolling.
  • Method Details

    • mouseMove

      public void mouseMove(NatTable natTable, org.eclipse.swt.events.MouseEvent event)
      Specified by:
      mouseMove in interface IDragMode
    • mouseUp

      public void mouseUp(NatTable natTable, org.eclipse.swt.events.MouseEvent event)
      Specified by:
      mouseUp in interface IDragMode
    • performDragAction

      protected void performDragAction(NatTable natTable, int x, int y, SelectionLayer.MoveDirectionEnum horizontal, SelectionLayer.MoveDirectionEnum vertical)
      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.