Class AutoScrollDragMode.AutoScrollRunnable
java.lang.Object
org.eclipse.nebula.widgets.nattable.viewport.action.AutoScrollDragMode.AutoScrollRunnable
- All Implemented Interfaces:
Runnable
- Enclosing class:
- AutoScrollDragMode
Runnable that continuously scrolls the viewport.
-
Constructor Summary
ConstructorsConstructorDescriptionAutoScrollRunnable(NatTable natTable, int x, int y, SelectionLayer.MoveDirectionEnum horizontal, SelectionLayer.MoveDirectionEnum vertical) -
Method Summary
Modifier and TypeMethodDescriptionvoidcalculateRepeatDelay(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.voidcancel()Cancels the repeated execution.voidrun()voidschedule()Schedule this runnable to start with a delay of 500 ms.
-
Constructor Details
-
AutoScrollRunnable
public AutoScrollRunnable(NatTable natTable, int x, int y, SelectionLayer.MoveDirectionEnum horizontal, SelectionLayer.MoveDirectionEnum vertical)
-
-
Method Details
-
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. -
run
public void run()
-