- java.lang.Object
-
- javafx.animation.AnimationTimer
-
- eu.ess.xaos.ui.plot.ChartLayoutAnimator
-
- All Implemented Interfaces:
EventListener
,EventHandler<ActionEvent>
public class ChartLayoutAnimator extends AnimationTimer implements EventHandler<ActionEvent>
A one-to-one replacement of the no more availablecom.sun.javafx.charts.ChartLayoutAnimator
class.It runs any number of animations of
KeyFrame
s callingParent.requestLayout()
on the given parent node for every frame while one of those animations is running.- Author:
- claudio.rosati@esss.se
-
-
Constructor Summary
Constructors Constructor Description ChartLayoutAnimator(Parent nodeToLayout)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description Object
animate(Animation animation)
Play the givenAnimation
.Object
animate(KeyFrame... keyFrames)
Play an animation containing the givenKeyFrame
s.void
handle(long l)
void
handle(ActionEvent actionEvent)
void
stop(Object animationID)
Stop the animation with the given ID.-
Methods inherited from class javafx.animation.AnimationTimer
start, stop
-
-
-
-
Constructor Detail
-
ChartLayoutAnimator
public ChartLayoutAnimator(Parent nodeToLayout)
-
-
Method Detail
-
animate
public Object animate(KeyFrame... keyFrames)
Play an animation containing the givenKeyFrame
s.- Parameters:
keyFrames
- TheKeyFrame
s to animate.- Returns:
- An id reference to the animation that can be used to stop the animation if needed.
-
animate
public Object animate(Animation animation)
Play the givenAnimation
.- Parameters:
animation
- The animation to play.- Returns:
- An id reference to the animation that can be used to stop the animation if needed.
-
handle
public void handle(long l)
- Specified by:
handle
in classAnimationTimer
-
handle
public void handle(ActionEvent actionEvent)
- Specified by:
handle
in interfaceEventHandler<ActionEvent>
-
stop
public void stop(Object animationID)
Stop the animation with the given ID.- Parameters:
animationID
- The identifier of the animation to stop.
-
-