org.eclipse.nebula.animation
Class ScrollingSmoother

java.lang.Object
  extended by org.eclipse.nebula.animation.ScrollingSmoother

public class ScrollingSmoother
extends Object

Allows to replace the default scrolling behavior by an animation effect.

Compatible with :

Author:
Nicolas Richeton

Constructor Summary
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.
 
Method Summary
 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.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

ScrollingSmoother

public ScrollingSmoother(org.eclipse.swt.widgets.Scrollable c2,
                         IMovement movement)
Create a Scrolling Smoother instance over a scrollable widget. This effect can then be activated using smoothControl(boolean).

Parameters:
c2 -
movement -
See Also:
smoothControl(boolean)

ScrollingSmoother

public ScrollingSmoother(org.eclipse.swt.widgets.Scrollable c2,
                         IMovement movement,
                         int duration)
Create a Scrolling Smoother instance over a scrollable widget. This effect can then be activated using smoothControl(boolean).

Parameters:
c2 -
movement -
duration -
See Also:
smoothControl(boolean)
Method Detail

getDuration

public int getDuration()
Get current effect duration (ms).

Returns:

setDuration

public void setDuration(int duration)
Set effect duration (ms).

Parameters:
duration -

setFPS

public void setFPS(int fps)
Set the FPS (frame per second) to use with the animator.

Parameters:
fps -

getScrollbar

protected org.eclipse.swt.widgets.ScrollBar getScrollbar(org.eclipse.swt.widgets.Event event)

smoothControl

public void smoothControl(boolean enable)
Enable or disable scrolling effect.

Parameters:
enable - true or false.


Copyright © 2011. All Rights Reserved.