java.lang.Object
atlantafx.base.util.Animations
A utility class that provides factory methods to create a predefined
animations for various effects, such as fade, slide, rotate, scale etc.
-
Field Summary
FieldsModifier and TypeFieldDescriptionstatic final javafx.animation.Interpolator
The default interpolator value that is used across all animations. -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionstatic javafx.animation.Timeline
fadeIn
(javafx.scene.Node node, javafx.util.Duration duration) Gradually increases the opacity of the node from 0 to 1, making it appear on the scene with a fading-in effect.static javafx.animation.Timeline
fadeInDown
(javafx.scene.Node node, javafx.util.Duration duration) Combines thefadeIn(Node, Duration)
effect with the node’s downward movement, creating an animated entrance of the node from the top.static javafx.animation.Timeline
fadeInLeft
(javafx.scene.Node node, javafx.util.Duration duration) Combines thefadeIn(Node, Duration)
effect with the node’s leftward movement, creating an animated entrance of the node from the left.static javafx.animation.Timeline
fadeInRight
(javafx.scene.Node node, javafx.util.Duration duration) Combines thefadeIn(Node, Duration)
effect with the node’s rightward movement, creating an animated entrance of the node from the right.static javafx.animation.Timeline
fadeInUp
(javafx.scene.Node node, javafx.util.Duration duration) Combines thefadeIn(Node, Duration)
effect with the node’s upward movement, creating an animated entrance of the node from the bottom.static javafx.animation.Timeline
fadeOut
(javafx.scene.Node node, javafx.util.Duration duration) Gradually decreases the opacity of the node from 1 to 0, making it disappear from the scene with a fading-out effect.static javafx.animation.Timeline
fadeOutDown
(javafx.scene.Node node, javafx.util.Duration duration) Combines thefadeOut(Node, Duration)
effect with the node’s downward movement, creating an animated exit of the node to the bottom.static javafx.animation.Timeline
fadeOutLeft
(javafx.scene.Node node, javafx.util.Duration duration) Combines thefadeOut(Node, Duration)
effect with the node’s leftward movement, creating an animated exit of the node to the left.static javafx.animation.Timeline
fadeOutRight
(javafx.scene.Node node, javafx.util.Duration duration) Combines thefadeOut(Node, Duration)
effect with the node’s rightward movement, creating an animated exit of the node to the right.static javafx.animation.Timeline
fadeOutUp
(javafx.scene.Node node, javafx.util.Duration duration) Combines thefadeOut(Node, Duration)
effect with the node’s upward movement, creating an animated exit of the node to the top.static javafx.animation.Timeline
flash
(javafx.scene.Node node) Changes the node opacity to full transparency and then back to its original opacity in quick succession, creating a flashing effect.static javafx.animation.Timeline
pulse
(javafx.scene.Node node) Seepulse(Node, double)
.static javafx.animation.Timeline
pulse
(javafx.scene.Node node, double scale) Repeatedly increases and decreases the scale of the node, giving it a pulsating effect that draws attention to it.static javafx.animation.Timeline
rollIn
(javafx.scene.Node node, javafx.util.Duration duration) Applies an animated effect to the node causing it to roll into the scene from the left side at an angle.static javafx.animation.Timeline
rollOut
(javafx.scene.Node node, javafx.util.Duration duration) Applies an animated effect to the node causing it to roll out from the scene to the right side at an angle.static javafx.animation.Timeline
rotateIn
(javafx.scene.Node node, javafx.util.Duration duration) Rotates the node and gradually increases its opacity, giving it an animated entrance effect.static javafx.animation.Timeline
rotateInDownLeft
(javafx.scene.Node node, javafx.util.Duration duration) Combines therotateIn(Node, Duration)
effect with the node’s downward movement from the left, creating an animated entrance of the node from the top left corner.static javafx.animation.Timeline
rotateInDownRight
(javafx.scene.Node node, javafx.util.Duration duration) Combines therotateIn(Node, Duration)
effect with the node’s downward movement from the right, creating an animated entrance of the node from the top right corner.static javafx.animation.Timeline
rotateInUpLeft
(javafx.scene.Node node, javafx.util.Duration duration) Combines therotateIn(Node, Duration)
effect with the node’s upward movement from the left, creating an animated entrance of the node from the bottom left corner.static javafx.animation.Timeline
rotateInUpRight
(javafx.scene.Node node, javafx.util.Duration duration) Combines therotateIn(Node, Duration)
effect with the node’s upward movement from the right, creating an animated entrance of the node from the bottom right corner.static javafx.animation.Timeline
rotateOut
(javafx.scene.Node node, javafx.util.Duration duration) Rotates the node and gradually decreases its opacity, giving it an animated exit effect.static javafx.animation.Timeline
rotateOutDownLeft
(javafx.scene.Node node, javafx.util.Duration duration) Combines therotateOut(Node, Duration)
effect with the node’s downward movement to the left, creating an animated exit of the node towards the bottom left corner.static javafx.animation.Timeline
rotateOutDownRight
(javafx.scene.Node node, javafx.util.Duration duration) Combines therotateOut(Node, Duration)
effect with the node’s downward movement to the right, creating an animated exit of the node towards the bottom right corner.static javafx.animation.Timeline
rotateOutUpLeft
(javafx.scene.Node node, javafx.util.Duration duration) Combines therotateOut(Node, Duration)
effect with the node’s upward movement to the left, creating an animated exit of the node towards the top left corner.static javafx.animation.Timeline
rotateOutUpRight
(javafx.scene.Node node, javafx.util.Duration duration) Combines therotateOut(Node, Duration)
effect with the node’s upward movement to the right, creating an animated exit of the node towards the top right corner.static javafx.animation.Timeline
shakeX
(javafx.scene.Node node) SeeshakeX(Node, double)
.static javafx.animation.Timeline
shakeX
(javafx.scene.Node node, double offset) Rapidly moves the node from side-to-side horizontally, creating a shaking or vibrating effect.static javafx.animation.Timeline
shakeY
(javafx.scene.Node node) static javafx.animation.Timeline
shakeY
(javafx.scene.Node node, double offset) Rapidly moves the node up and down vertically, creating a shaking or bouncing effect.static javafx.animation.Timeline
slideInDown
(javafx.scene.Node node, javafx.util.Duration duration) Applies an animated effect to the node, causing it to slide into view from the top side.static javafx.animation.Timeline
slideInLeft
(javafx.scene.Node node, javafx.util.Duration duration) Applies an animated effect to the node, causing it to slide into view from the left side.static javafx.animation.Timeline
slideInRight
(javafx.scene.Node node, javafx.util.Duration duration) Applies an animated effect to the node, causing it to slide into view from the right side.static javafx.animation.Timeline
slideInUp
(javafx.scene.Node node, javafx.util.Duration duration) Applies an animated effect to the node, causing it to slide into view from the bottom side.static javafx.animation.Timeline
slideOutDown
(javafx.scene.Node node, javafx.util.Duration duration) Applies an animated effect to the node, causing it to slide out of view through the bottom side.static javafx.animation.Timeline
slideOutLeft
(javafx.scene.Node node, javafx.util.Duration duration) Applies an animated effect to the node, causing it to slide out of view through the left side.static javafx.animation.Timeline
slideOutRight
(javafx.scene.Node node, javafx.util.Duration duration) Applies an animated effect to the node, causing it to slide out of view through the right side.static javafx.animation.Timeline
slideOutUp
(javafx.scene.Node node, javafx.util.Duration duration) Applies an animated effect to the node, causing it to slide out of view through the top side.static javafx.animation.Timeline
wobble
(javafx.scene.Node node) Causes the node to rapidly wobble back and forth, creating a visually engaging effect.static javafx.animation.Timeline
zoomIn
(javafx.scene.Node node, javafx.util.Duration duration) static javafx.animation.Timeline
zoomIn
(javafx.scene.Node node, javafx.util.Duration duration, double startValue) Increases the scale of the node, starting from a smaller size and gradually zooming it to the regular size, emphasizing the node’s entrance.static javafx.animation.Timeline
zoomOut
(javafx.scene.Node node, javafx.util.Duration duration) static javafx.animation.Timeline
zoomOut
(javafx.scene.Node node, javafx.util.Duration duration, double endValue) Reduces the scale of the node, creating a shrinking effect that starts from its original size and gradually zooms out to a smaller size, emphasizing the node’s exit.
-
Field Details
-
EASE
public static final javafx.animation.Interpolator EASEThe default interpolator value that is used across all animations.
-
-
Constructor Details
-
Animations
public Animations()
-
-
Method Details
-
flash
public static javafx.animation.Timeline flash(javafx.scene.Node node) Changes the node opacity to full transparency and then back to its original opacity in quick succession, creating a flashing effect.- Parameters:
node
- The node to be animated.
-
pulse
public static javafx.animation.Timeline pulse(javafx.scene.Node node) Seepulse(Node, double)
. -
pulse
public static javafx.animation.Timeline pulse(javafx.scene.Node node, double scale) Repeatedly increases and decreases the scale of the node, giving it a pulsating effect that draws attention to it.- Parameters:
node
- The node to be animated.scale
- The scale factor.
-
shakeX
public static javafx.animation.Timeline shakeX(javafx.scene.Node node) SeeshakeX(Node, double)
. -
shakeX
public static javafx.animation.Timeline shakeX(javafx.scene.Node node, double offset) Rapidly moves the node from side-to-side horizontally, creating a shaking or vibrating effect.- Parameters:
node
- The node to be animated.offset
- The shake offset.
-
shakeY
public static javafx.animation.Timeline shakeY(javafx.scene.Node node) -
shakeY
public static javafx.animation.Timeline shakeY(javafx.scene.Node node, double offset) Rapidly moves the node up and down vertically, creating a shaking or bouncing effect.- Parameters:
node
- The node to be animated.offset
- The shake offset.
-
wobble
public static javafx.animation.Timeline wobble(javafx.scene.Node node) Causes the node to rapidly wobble back and forth, creating a visually engaging effect.- Parameters:
node
- The node to be animated.
-
fadeIn
public static javafx.animation.Timeline fadeIn(javafx.scene.Node node, javafx.util.Duration duration) Gradually increases the opacity of the node from 0 to 1, making it appear on the scene with a fading-in effect.- Parameters:
node
- The node to be animated.duration
- The animation duration.
-
fadeOut
public static javafx.animation.Timeline fadeOut(javafx.scene.Node node, javafx.util.Duration duration) Gradually decreases the opacity of the node from 1 to 0, making it disappear from the scene with a fading-out effect.- Parameters:
node
- The node to be animated.duration
- The animation duration.
-
fadeInDown
public static javafx.animation.Timeline fadeInDown(javafx.scene.Node node, javafx.util.Duration duration) Combines thefadeIn(Node, Duration)
effect with the node’s downward movement, creating an animated entrance of the node from the top.- Parameters:
node
- The node to be animated.duration
- The animation duration.
-
fadeOutDown
public static javafx.animation.Timeline fadeOutDown(javafx.scene.Node node, javafx.util.Duration duration) Combines thefadeOut(Node, Duration)
effect with the node’s downward movement, creating an animated exit of the node to the bottom.- Parameters:
node
- The node to be animated.duration
- The animation duration.
-
fadeInLeft
public static javafx.animation.Timeline fadeInLeft(javafx.scene.Node node, javafx.util.Duration duration) Combines thefadeIn(Node, Duration)
effect with the node’s leftward movement, creating an animated entrance of the node from the left.- Parameters:
node
- The node to be animated.duration
- The animation duration.
-
fadeOutLeft
public static javafx.animation.Timeline fadeOutLeft(javafx.scene.Node node, javafx.util.Duration duration) Combines thefadeOut(Node, Duration)
effect with the node’s leftward movement, creating an animated exit of the node to the left.- Parameters:
node
- The node to be animated.duration
- The animation duration.
-
fadeInRight
public static javafx.animation.Timeline fadeInRight(javafx.scene.Node node, javafx.util.Duration duration) Combines thefadeIn(Node, Duration)
effect with the node’s rightward movement, creating an animated entrance of the node from the right.- Parameters:
node
- The node to be animated.duration
- The animation duration.
-
fadeOutRight
public static javafx.animation.Timeline fadeOutRight(javafx.scene.Node node, javafx.util.Duration duration) Combines thefadeOut(Node, Duration)
effect with the node’s rightward movement, creating an animated exit of the node to the right.- Parameters:
node
- The node to be animated.duration
- The animation duration.
-
fadeInUp
public static javafx.animation.Timeline fadeInUp(javafx.scene.Node node, javafx.util.Duration duration) Combines thefadeIn(Node, Duration)
effect with the node’s upward movement, creating an animated entrance of the node from the bottom.- Parameters:
node
- The node to be animated.duration
- The animation duration.
-
fadeOutUp
public static javafx.animation.Timeline fadeOutUp(javafx.scene.Node node, javafx.util.Duration duration) Combines thefadeOut(Node, Duration)
effect with the node’s upward movement, creating an animated exit of the node to the top.- Parameters:
node
- The node to be animated.duration
- The animation duration.
-
rollIn
public static javafx.animation.Timeline rollIn(javafx.scene.Node node, javafx.util.Duration duration) Applies an animated effect to the node causing it to roll into the scene from the left side at an angle.- Parameters:
node
- The node to be animated.duration
- The animation duration.
-
rollOut
public static javafx.animation.Timeline rollOut(javafx.scene.Node node, javafx.util.Duration duration) Applies an animated effect to the node causing it to roll out from the scene to the right side at an angle.- Parameters:
node
- The node to be animated.duration
- The animation duration.
-
rotateIn
public static javafx.animation.Timeline rotateIn(javafx.scene.Node node, javafx.util.Duration duration) Rotates the node and gradually increases its opacity, giving it an animated entrance effect.- Parameters:
node
- The node to be animated.duration
- The animation duration.
-
rotateOut
public static javafx.animation.Timeline rotateOut(javafx.scene.Node node, javafx.util.Duration duration) Rotates the node and gradually decreases its opacity, giving it an animated exit effect.- Parameters:
node
- The node to be animated.duration
- The animation duration.
-
rotateInDownLeft
public static javafx.animation.Timeline rotateInDownLeft(javafx.scene.Node node, javafx.util.Duration duration) Combines therotateIn(Node, Duration)
effect with the node’s downward movement from the left, creating an animated entrance of the node from the top left corner.- Parameters:
node
- The node to be animated.duration
- The animation duration.
-
rotateOutDownLeft
public static javafx.animation.Timeline rotateOutDownLeft(javafx.scene.Node node, javafx.util.Duration duration) Combines therotateOut(Node, Duration)
effect with the node’s downward movement to the left, creating an animated exit of the node towards the bottom left corner.- Parameters:
node
- The node to be animated.duration
- The animation duration.
-
rotateInDownRight
public static javafx.animation.Timeline rotateInDownRight(javafx.scene.Node node, javafx.util.Duration duration) Combines therotateIn(Node, Duration)
effect with the node’s downward movement from the right, creating an animated entrance of the node from the top right corner.- Parameters:
node
- The node to be animated.duration
- The animation duration.
-
rotateOutDownRight
public static javafx.animation.Timeline rotateOutDownRight(javafx.scene.Node node, javafx.util.Duration duration) Combines therotateOut(Node, Duration)
effect with the node’s downward movement to the right, creating an animated exit of the node towards the bottom right corner.- Parameters:
node
- The node to be animated.duration
- The animation duration.
-
rotateInUpLeft
public static javafx.animation.Timeline rotateInUpLeft(javafx.scene.Node node, javafx.util.Duration duration) Combines therotateIn(Node, Duration)
effect with the node’s upward movement from the left, creating an animated entrance of the node from the bottom left corner.- Parameters:
node
- The node to be animated.duration
- The animation duration.
-
rotateOutUpLeft
public static javafx.animation.Timeline rotateOutUpLeft(javafx.scene.Node node, javafx.util.Duration duration) Combines therotateOut(Node, Duration)
effect with the node’s upward movement to the left, creating an animated exit of the node towards the top left corner.- Parameters:
node
- The node to be animated.duration
- The animation duration.
-
rotateInUpRight
public static javafx.animation.Timeline rotateInUpRight(javafx.scene.Node node, javafx.util.Duration duration) Combines therotateIn(Node, Duration)
effect with the node’s upward movement from the right, creating an animated entrance of the node from the bottom right corner.- Parameters:
node
- The node to be animated.duration
- The animation duration.
-
rotateOutUpRight
public static javafx.animation.Timeline rotateOutUpRight(javafx.scene.Node node, javafx.util.Duration duration) Combines therotateOut(Node, Duration)
effect with the node’s upward movement to the right, creating an animated exit of the node towards the top right corner.- Parameters:
node
- The node to be animated.duration
- The animation duration.
-
slideInDown
public static javafx.animation.Timeline slideInDown(javafx.scene.Node node, javafx.util.Duration duration) Applies an animated effect to the node, causing it to slide into view from the top side.- Parameters:
node
- The node to be animated.duration
- The animation duration.
-
slideOutDown
public static javafx.animation.Timeline slideOutDown(javafx.scene.Node node, javafx.util.Duration duration) Applies an animated effect to the node, causing it to slide out of view through the bottom side.- Parameters:
node
- The node to be animated.duration
- The animation duration.
-
slideInLeft
public static javafx.animation.Timeline slideInLeft(javafx.scene.Node node, javafx.util.Duration duration) Applies an animated effect to the node, causing it to slide into view from the left side.- Parameters:
node
- The node to be animated.duration
- The animation duration.
-
slideOutLeft
public static javafx.animation.Timeline slideOutLeft(javafx.scene.Node node, javafx.util.Duration duration) Applies an animated effect to the node, causing it to slide out of view through the left side.- Parameters:
node
- The node to be animated.duration
- The animation duration.
-
slideInRight
public static javafx.animation.Timeline slideInRight(javafx.scene.Node node, javafx.util.Duration duration) Applies an animated effect to the node, causing it to slide into view from the right side.- Parameters:
node
- The node to be animated.duration
- The animation duration.
-
slideOutRight
public static javafx.animation.Timeline slideOutRight(javafx.scene.Node node, javafx.util.Duration duration) Applies an animated effect to the node, causing it to slide out of view through the right side.- Parameters:
node
- The node to be animated.duration
- The animation duration.
-
slideInUp
public static javafx.animation.Timeline slideInUp(javafx.scene.Node node, javafx.util.Duration duration) Applies an animated effect to the node, causing it to slide into view from the bottom side.- Parameters:
node
- The node to be animated.duration
- The animation duration.
-
slideOutUp
public static javafx.animation.Timeline slideOutUp(javafx.scene.Node node, javafx.util.Duration duration) Applies an animated effect to the node, causing it to slide out of view through the top side.- Parameters:
node
- The node to be animated.duration
- The animation duration.
-
zoomIn
public static javafx.animation.Timeline zoomIn(javafx.scene.Node node, javafx.util.Duration duration) -
zoomIn
public static javafx.animation.Timeline zoomIn(javafx.scene.Node node, javafx.util.Duration duration, double startValue) Increases the scale of the node, starting from a smaller size and gradually zooming it to the regular size, emphasizing the node’s entrance.- Parameters:
node
- The node to be animated.duration
- The animation duration.startValue
- The initial zoom value.
-
zoomOut
public static javafx.animation.Timeline zoomOut(javafx.scene.Node node, javafx.util.Duration duration) -
zoomOut
public static javafx.animation.Timeline zoomOut(javafx.scene.Node node, javafx.util.Duration duration, double endValue) Reduces the scale of the node, creating a shrinking effect that starts from its original size and gradually zooms out to a smaller size, emphasizing the node’s exit.- Parameters:
node
- The node to be animated.duration
- The animation duration.endValue
- The target zoom value.
-