Modifier and Type | Method and Description |
---|---|
Property.Animator |
ease()
Convenience method to use
Easing.ease easing for all
keyframes. |
Property.Animator |
easeIn()
Convenience method to use
Easing.easeIn easing for all
keyframes. |
Property.Animator |
easeInOut()
Convenience method to use
Easing.easeInOut easing for all
keyframes. |
Property.Animator |
easeOut()
Convenience method to use
Easing.easeOut easing for all
keyframes. |
Property.Animator |
easing(Easing... easing)
Set the easing mode for each keyframe.
|
Property.Animator |
in(double... in)
Set the time in seconds for each keyframe.
|
boolean |
isAnimating()
Whether an animation is currently active.
|
Property.Animator |
linear()
Convenience method to use
Easing.linear easing for all
keyframes. |
Property.Animator |
stop()
Stop animating.
|
Property.Animator |
to(double... to)
Set the target values for animation and start animation.
|
Property.Animator |
whenDone(Consumer<Property> whenDoneConsumer)
Set a consumer to be called each time the Animator finishes animation.
|
public Property.Animator to(double... to)
to
- target valuespublic Property.Animator in(double... in)
eg. to(100, 50, 250).in(1, 0.5)
is the same as
to(100, 50, 250).in(1, 0.5, 1)
in
- times in secondspublic Property.Animator easing(Easing... easing)
easing
- easing mode to usepublic Property.Animator linear()
Easing.linear
easing for all
keyframes.public Property.Animator ease()
Easing.ease
easing for all
keyframes.public Property.Animator easeIn()
Easing.easeIn
easing for all
keyframes.public Property.Animator easeOut()
Easing.easeOut
easing for all
keyframes.public Property.Animator easeInOut()
Easing.easeInOut
easing for all
keyframes.public Property.Animator stop()
public boolean isAnimating()
public Property.Animator whenDone(Consumer<Property> whenDoneConsumer)
Unlike restarting an animation by polling isAnimating(), an animation started inside this consumer will take into account any time overrun between the target and actual finish time of the completing animation.
whenDoneConsumer
- function to call