java.lang.Object
io.github.palexdev.materialfx.utils.AnimationUtils.TimelineBuilder
- Enclosing class:
- AnimationUtils
Builder class to easily create a
Timeline with fluent api.-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionAdds the specified KeyFrames to the timeline.build()Callshide(Duration, Node)by converting the given millis value withDuration.millis(double).Callshide(Duration, Window)by converting the given millis value withDuration.millis(double).hide(AnimationsData data) Builds the KeyFrames to hide the specified node in the AnimationsData bean, by fading it out.Builds the KeyFrames to hide the given node by fading it out.Builds a KeyFrame to hide the given Window by fading it out.setCycleCount(int cycleCount) Sets the timeline cycle count.setDelay(double millis) Sets the timeline delay.Sets the timeline delay.setOnFinished(EventHandler<ActionEvent> onFinished) Sets the action to perform when the timeline ends.setRate(double rate) Sets the timeline rate/speed.Callsshow(Duration, Node)by converting the given millis value withDuration.millis(double).Callsshow(Duration, Window)by converting the given millis value withDuration.millis(double).show(AnimationsData data) Creates and adds a fade in animation for each givenAnimationsData.Builds the KeyFrames to show the given node by fading it in.Builds a KeyFrame to show the given Window by fading it in.
-
Constructor Details
-
TimelineBuilder
public TimelineBuilder()
-
-
Method Details
-
build
- Returns:
- a new TimelineBuilder instance. Equivalent to calling the constructor, it's just a way to omit the new keyword
-
add
Adds the specified KeyFrames to the timeline. -
hide
Builds a KeyFrame to hide the given Window by fading it out.- Parameters:
duration- the fade animation speed
-
hide
Callshide(Duration, Window)by converting the given millis value withDuration.millis(double). -
hide
Builds the KeyFrames to hide the given node by fading it out.- Parameters:
duration- the fade animation speed
-
hide
Callshide(Duration, Node)by converting the given millis value withDuration.millis(double). -
hide
Builds the KeyFrames to hide the specified node in the AnimationsData bean, by fading it out. -
show
Builds a KeyFrame to show the given Window by fading it in.- Parameters:
duration- the fade animation speed
-
show
Callsshow(Duration, Window)by converting the given millis value withDuration.millis(double). -
show
Builds the KeyFrames to show the given node by fading it in.- Parameters:
duration- the fade animation speed
-
show
Callsshow(Duration, Node)by converting the given millis value withDuration.millis(double). -
show
Creates and adds a fade in animation for each givenAnimationsData. -
setCycleCount
Sets the timeline cycle count. -
setDelay
Sets the timeline delay. -
setDelay
Sets the timeline delay. -
setRate
Sets the timeline rate/speed. -
setOnFinished
Sets the action to perform when the timeline ends. -
getAnimation
- Returns:
- the instance of the Timeline
-