java.lang.Object
javafx.animation.AnimationTimer
The class 
AnimationTimer allows to create a timer, that is called in
 each frame while it is active.
 
 An extending class has to override the method handle(long) which
 will be called in every frame.
 
 The methods start() and stop() allow to start
 and stop the timer.
 
The animation timer runs on the JavaFX Application Thread.
- Since:
- JavaFX 2.0
- 
Constructor SummaryConstructors
- 
Method Summary
- 
Constructor Details- 
AnimationTimerpublic AnimationTimer()Creates a new timer.
 
- 
- 
Method Details- 
handlepublic abstract void handle(long now) This method needs to be overridden by extending classes. It is going to be called in every frame while theAnimationTimeris active.- Parameters:
- now- The timestamp of the current frame given in nanoseconds. This value will be the same for all- AnimationTimerscalled during one frame.
 
- 
startpublic void start()Starts theAnimationTimer. Once it is started, thehandle(long)method of thisAnimationTimerwill be called in every frame.The AnimationTimercan be stopped by callingstop().This method must be called on the JavaFX Application thread. - Throws:
- IllegalStateException- if this method is called on a thread other than the JavaFX Application Thread.
 
- 
stoppublic void stop()Stops theAnimationTimer. It can be activated again by callingstart().This method must be called on the JavaFX Application thread. - Throws:
- IllegalStateException- if this method is called on a thread other than the JavaFX Application Thread.
 
 
-