Class AutoScrollDragMode

    • Field Detail

      • horizontalBorderOffset

        protected int horizontalBorderOffset
      • verticalBorderOffset

        protected int verticalBorderOffset
        Since:
        2.0
    • Constructor Detail

      • AutoScrollDragMode

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

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