Copyright 2012-04-26 Werner Randelshofer

org.monte.media
Class DefaultAnimator

java.lang.Object
  extended by org.monte.media.DefaultAnimator
All Implemented Interfaces:
java.lang.Runnable, Animator

public class DefaultAnimator
extends java.lang.Object
implements Animator

DefaultAnimator.

Author:
Werner Randelshofer  @version 1.0.1 2008-08-19 finish method of interpolators was not always called.
1.0 Apr 28, 2008 Created.

Field Summary
protected  javax.swing.event.ChangeEvent changeEvent
           
protected  javax.swing.event.EventListenerList listenerList
           
 
Constructor Summary
DefaultAnimator()
          Creates a new instance.
 
Method Summary
 void addChangeListener(javax.swing.event.ChangeListener listener)
           
 void animateStep()
           
 void dispatch(Interpolator interpolator)
          Dispatches an interpolator for the animation thread.
protected  void fireStateChanged()
          Notify all listeners that have registered interest for notification on this event type.
 boolean isActive()
           
 boolean isSynchronous()
           
 void removeChangeListener(javax.swing.event.ChangeListener listener)
           
 void run()
           
 void setLock(java.lang.Object lock)
          Set the lock object, on which the animator synchronizes while animating the interpolators.
 void start()
           
 void stop()
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

listenerList

protected javax.swing.event.EventListenerList listenerList

changeEvent

protected javax.swing.event.ChangeEvent changeEvent
Constructor Detail

DefaultAnimator

public DefaultAnimator()
Creates a new instance.

Method Detail

setLock

public void setLock(java.lang.Object lock)
Set the lock object, on which the animator synchronizes while animating the interpolators.

Specified by:
setLock in interface Animator

isActive

public boolean isActive()
Specified by:
isActive in interface Animator

start

public void start()
Specified by:
start in interface Animator

stop

public void stop()
Specified by:
stop in interface Animator

dispatch

public void dispatch(Interpolator interpolator)
Dispatches an interpolator for the animation thread. This will launch the animation thread if it is not already active.

Specified by:
dispatch in interface Animator

animateStep

public void animateStep()
Specified by:
animateStep in interface Animator

run

public void run()
Specified by:
run in interface java.lang.Runnable
Specified by:
run in interface Animator

addChangeListener

public void addChangeListener(javax.swing.event.ChangeListener listener)
Specified by:
addChangeListener in interface Animator

removeChangeListener

public void removeChangeListener(javax.swing.event.ChangeListener listener)
Specified by:
removeChangeListener in interface Animator

fireStateChanged

protected void fireStateChanged()
Notify all listeners that have registered interest for notification on this event type.


isSynchronous

public boolean isSynchronous()
Specified by:
isSynchronous in interface Animator

Copyright 2012-04-26 Werner Randelshofer