org.openbp.cockpit.modeler.util
Class Animator

java.lang.Object
  extended by java.lang.Thread
      extended by org.openbp.cockpit.modeler.util.Animator
All Implemented Interfaces:
java.lang.Runnable

public class Animator
extends java.lang.Thread

The animator performs an animation on an object (the Animatable) and fires an event when finished. It can be used e. g. to implment the debugger flow animation.

Author:
Stephan Moritz

Nested Class Summary
 
Nested classes/interfaces inherited from class java.lang.Thread
java.lang.Thread.State, java.lang.Thread.UncaughtExceptionHandler
 
Field Summary
 
Fields inherited from class java.lang.Thread
MAX_PRIORITY, MIN_PRIORITY, NORM_PRIORITY
 
Constructor Summary
Animator(Animatable animatable, CH.ifa.draw.framework.DrawingView view, int delay, JaspiraEvent endEvent)
          Default constructor.
 
Method Summary
 void run()
           
 void startAnimation()
          Starts the animation.
 void stopAnimation()
          Stops the animation and fires the event.
 
Methods inherited from class java.lang.Thread
activeCount, checkAccess, countStackFrames, currentThread, destroy, dumpStack, enumerate, getAllStackTraces, getContextClassLoader, getDefaultUncaughtExceptionHandler, getId, getName, getPriority, getStackTrace, getState, getThreadGroup, getUncaughtExceptionHandler, holdsLock, interrupt, interrupted, isAlive, isDaemon, isInterrupted, join, join, join, resume, setContextClassLoader, setDaemon, setDefaultUncaughtExceptionHandler, setName, setPriority, setUncaughtExceptionHandler, sleep, sleep, start, stop, stop, suspend, toString, yield
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Constructor Detail

Animator

public Animator(Animatable animatable,
                CH.ifa.draw.framework.DrawingView view,
                int delay,
                JaspiraEvent endEvent)
Default constructor.

Parameters:
view - View the contains the animatable
animatable - The animatable object
delay - Animation delay in ms
endEvent - Event to be fired when the animation has finished or null
Method Detail

startAnimation

public void startAnimation()
Starts the animation.


stopAnimation

public void stopAnimation()
Stops the animation and fires the event.


run

public void run()
Specified by:
run in interface java.lang.Runnable
Overrides:
run in class java.lang.Thread


Copyright © 2011. All Rights Reserved.