Class AutoScrollDragMode.AutoScrollRunnable
- java.lang.Object
-
- org.eclipse.nebula.widgets.nattable.viewport.action.AutoScrollDragMode.AutoScrollRunnable
-
- All Implemented Interfaces:
Runnable
- Enclosing class:
- AutoScrollDragMode
protected class AutoScrollDragMode.AutoScrollRunnable extends Object implements Runnable
Runnable that continuously scrolls the viewport.
-
-
Constructor Summary
Constructors Constructor Description AutoScrollRunnable(NatTable natTable, int x, int y, SelectionLayer.MoveDirectionEnum horizontal, SelectionLayer.MoveDirectionEnum vertical)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description void
calculateRepeatDelay(int horizontalDiff, int verticalDiff)
Calculates the delay of the repeated auto-scroll execution based on the difference between the NatTable borders and the mouse cursor and the move direction that is currently active.void
cancel()
Cancels the repeated execution.void
run()
void
schedule()
Schedule this runnable to start with a delay of 500 ms.
-
-
-
Constructor Detail
-
AutoScrollRunnable
public AutoScrollRunnable(NatTable natTable, int x, int y, SelectionLayer.MoveDirectionEnum horizontal, SelectionLayer.MoveDirectionEnum vertical)
-
-
Method Detail
-
schedule
public void schedule()
Schedule this runnable to start with a delay of 500 ms.
-
calculateRepeatDelay
public void calculateRepeatDelay(int horizontalDiff, int verticalDiff)
Calculates the delay of the repeated auto-scroll execution based on the difference between the NatTable borders and the mouse cursor and the move direction that is currently active.- Parameters:
horizontalDiff
- The horizontal difference between the NatTable border and the mouse cursor.verticalDiff
- The vertical difference between the NatTable border and the mouse cursor.
-
cancel
public void cancel()
Cancels the repeated execution.
-
-