Class Animator
java.lang.Object
java.lang.Thread
common.animation.Animator
- All Implemented Interfaces:
Runnable
-
Nested Class Summary
Nested classes/interfaces inherited from class Thread
Thread.Builder, Thread.State, Thread.UncaughtExceptionHandler -
Field Summary
FieldsModifier and TypeFieldDescriptionprotected AnimationTheAnimationimplementing class that has to be updated to show the animation.Fields inherited from class Thread
MAX_PRIORITY, MIN_PRIORITY, NORM_PRIORITY -
Constructor Summary
Constructors -
Method Summary
Methods inherited from class Thread
activeCount, checkAccess, clone, currentThread, dumpStack, enumerate, getAllStackTraces, getContextClassLoader, getDefaultUncaughtExceptionHandler, getId, getName, getPriority, getStackTrace, getState, getThreadGroup, getUncaughtExceptionHandler, holdsLock, interrupt, interrupted, isAlive, isDaemon, isInterrupted, isVirtual, join, join, join, join, ofPlatform, ofVirtual, onSpinWait, setContextClassLoader, setDaemon, setDefaultUncaughtExceptionHandler, setName, setPriority, setUncaughtExceptionHandler, sleep, sleep, sleep, startVirtualThread, stop, threadId, toString, yield
-
Field Details
-
animation
-
-
Constructor Details
-
Animator
Creates a new instance of Animator. Frame rate is set by default at 30 frames per seconds.- Parameters:
a- : Animation to be updated by this animator.
-
Animator
Creates a new instance of Animator with explicit definition of framerate.- Parameters:
fps- : framerate for this animation.a- : Animation to be updated by this animator.
-
-
Method Details
-
start
-
run
-
terminate
public void terminate()Terminates current animation
-