public class ScrollingSmoother
extends java.lang.Object
Allows to replace the default scrolling behavior by an animation effect.
Compatible with :
Modifier and Type | Field and Description |
---|---|
(package private) AnimationRunner |
animationRunner |
(package private) org.eclipse.swt.widgets.Listener |
cancelEffectIfUserSelection |
(package private) org.eclipse.swt.widgets.Scrollable |
component |
(package private) int |
duration |
(package private) org.eclipse.swt.widgets.ScrollBar |
horizontalScrollBar |
(package private) org.eclipse.swt.widgets.Listener |
mouseWheelListener |
(package private) IMovement |
movement |
(package private) org.eclipse.swt.widgets.ScrollBar |
verticalScrollBar |
Constructor and Description |
---|
ScrollingSmoother(org.eclipse.swt.widgets.Scrollable c2,
IMovement movement)
Create a Scrolling Smoother instance over a scrollable widget.
|
ScrollingSmoother(org.eclipse.swt.widgets.Scrollable c2,
IMovement movement,
int duration)
Create a Scrolling Smoother instance over a scrollable widget.
|
Modifier and Type | Method and Description |
---|---|
int |
getDuration()
Get current effect duration (ms).
|
protected org.eclipse.swt.widgets.ScrollBar |
getScrollbar(org.eclipse.swt.widgets.Event event) |
void |
setDuration(int duration)
Set effect duration (ms).
|
void |
setFPS(int fps)
Set the FPS (frame per second) to use with the animator.
|
void |
smoothControl(boolean enable)
Enable or disable scrolling effect.
|
org.eclipse.swt.widgets.Scrollable component
org.eclipse.swt.widgets.ScrollBar verticalScrollBar
org.eclipse.swt.widgets.ScrollBar horizontalScrollBar
IMovement movement
int duration
AnimationRunner animationRunner
org.eclipse.swt.widgets.Listener mouseWheelListener
org.eclipse.swt.widgets.Listener cancelEffectIfUserSelection
public ScrollingSmoother(org.eclipse.swt.widgets.Scrollable c2, IMovement movement)
smoothControl(boolean)
.c2
- movement
- smoothControl(boolean)
public ScrollingSmoother(org.eclipse.swt.widgets.Scrollable c2, IMovement movement, int duration)
smoothControl(boolean)
.c2
- movement
- duration
- smoothControl(boolean)
public int getDuration()
public void setDuration(int duration)
duration
- public void setFPS(int fps)
fps
- protected org.eclipse.swt.widgets.ScrollBar getScrollbar(org.eclipse.swt.widgets.Event event)
public void smoothControl(boolean enable)
enable
- true or false.