de.matthiasmann.twl.utils
Class TintAnimator.GUITimeSource

java.lang.Object
  extended by de.matthiasmann.twl.utils.TintAnimator.GUITimeSource
All Implemented Interfaces:
TintAnimator.TimeSource
Enclosing class:
TintAnimator

public static final class TintAnimator.GUITimeSource
extends java.lang.Object
implements TintAnimator.TimeSource

A time source which uses the GUI object of the specified widget or a directly specified GUI instance.

If using a Widget which is not part of a GUI tree then the time is frozen at 0, and starts ticking as soon as the widget is added to a GUI tree.


Constructor Summary
TintAnimator.GUITimeSource(GUI gui)
           
TintAnimator.GUITimeSource(Widget owner)
           
 
Method Summary
 int getTime()
          Returns the current time (since last reset) in milliseconds.
 void resetTime()
          Restarts the time from 0 for a new fade animation
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

TintAnimator.GUITimeSource

public TintAnimator.GUITimeSource(Widget owner)

TintAnimator.GUITimeSource

public TintAnimator.GUITimeSource(GUI gui)
Method Detail

getTime

public int getTime()
Description copied from interface: TintAnimator.TimeSource
Returns the current time (since last reset) in milliseconds.

Specified by:
getTime in interface TintAnimator.TimeSource
Returns:
current time in ms

resetTime

public void resetTime()
Description copied from interface: TintAnimator.TimeSource
Restarts the time from 0 for a new fade animation

Specified by:
resetTime in interface TintAnimator.TimeSource