Class Animations
java.lang.Object
megalodonte.base.Animations
Pre-built animation utilities for components. Provides common transitions
(fade, slide, scale, bounce, shake, etc.) that can be composed with
Component.Transition for screen enter/exit animations.-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionstatic javafx.animation.AnimationVertical bounce — rises and falls with easing.static javafx.animation.Animationstatic javafx.animation.AnimationPure fade without displacement.static javafx.animation.Animationstatic javafx.animation.AnimationSmooth scale up/down from center, combined with fade.static javafx.animation.Animationstatic javafx.animation.Animationstatic javafx.animation.Animationstatic javafx.animation.Animationstatic javafx.animation.AnimationfadeSlideDown(Component c, boolean entering) Slides from/to above — useful for dropdowns, menus, notifications.static javafx.animation.AnimationfadeSlideDown(Component c, boolean entering, javafx.util.Duration delay) static javafx.animation.AnimationfadeSlideUp(Component c, boolean entering) Slides from/to below — useful for toasts/popups rising from the bottom of the screen.static javafx.animation.AnimationfadeSlideUp(Component c, boolean entering, javafx.util.Duration delay) static javafx.animation.AnimationOpacity flash — quick blink.static javafx.animation.Animationstatic javafx.animation.AnimationEmphatic "pop" — overshoots slightly before settling.static javafx.animation.Animationstatic javafx.animation.AnimationScale pulse (heartbeat) — grows and returns.static javafx.animation.Animationstatic javafx.animation.Animationstatic javafx.animation.Animationstatic javafx.animation.Animationstatic javafx.animation.AnimationGentle entrance for card grids: fade + slight rise + slight scale, with EASE_OUT easing and longer duration (450ms by default) — designed to not feel like a harsh "pop".static javafx.animation.Animationstatic javafx.animation.Animationstatic javafx.animation.Animationrotate(javafx.scene.Node node, double fromAngle, double toAngle, javafx.util.Duration duration) static javafx.animation.AnimationFree rotation between two angles.static javafx.animation.Animationrotate360(javafx.scene.Node node) static javafx.animation.AnimationFull 360-degree spin.static javafx.animation.AnimationHorizontal shake — useful for validation errors, wrong passwords, alerts.static javafx.animation.Animationstatic javafx.animation.AnimationslideHorizontal(Component c, boolean entering) Longer horizontal slide without fade — useful for carousel/wizard screen transitions.static javafx.animation.AnimationslideHorizontal(Component c, boolean entering, javafx.util.Duration delay) static javafx.animation.AnimationslideInLeft(Component c, boolean entering) Slide in from the left — useful for side menus, drawers.static javafx.animation.AnimationslideInLeft(Component c, boolean entering, javafx.util.Duration delay) static javafx.animation.AnimationslideInRight(Component c, boolean entering) Slide in from the right — useful for detail panels, sidebar.static javafx.animation.AnimationslideInRight(Component c, boolean entering, javafx.util.Duration delay) static javafx.animation.AnimationWobble — lateral oscillation with fade out.static javafx.animation.Animation
-
Constructor Details
-
Animations
public Animations()
-
-
Method Details
-
rotate
public static javafx.animation.Animation rotate(javafx.scene.Node node, double fromAngle, double toAngle, javafx.util.Duration duration) -
rotate360
public static javafx.animation.Animation rotate360(javafx.scene.Node node) -
rotate
public static javafx.animation.Animation rotate(Component c, double fromAngle, double toAngle, javafx.util.Duration duration) Free rotation between two angles. Useful for refresh icons, toggles, expand/collapse arrows. -
rotate360
Full 360-degree spin. Good for "refresh"/loading icon on click. -
fadeSlide
-
fadeSlide
public static javafx.animation.Animation fadeSlide(Component c, boolean entering, javafx.util.Duration delay) -
fade
Pure fade without displacement. Good for neutral content swaps (text, icon). -
fade
public static javafx.animation.Animation fade(Component c, boolean entering, javafx.util.Duration delay) -
fadeSlideDown
Slides from/to above — useful for dropdowns, menus, notifications. -
fadeSlideDown
public static javafx.animation.Animation fadeSlideDown(Component c, boolean entering, javafx.util.Duration delay) -
fadeSlideUp
Slides from/to below — useful for toasts/popups rising from the bottom of the screen. -
fadeSlideUp
public static javafx.animation.Animation fadeSlideUp(Component c, boolean entering, javafx.util.Duration delay) -
fadeScale
Smooth scale up/down from center, combined with fade. Good for modals/cards. -
fadeScale
public static javafx.animation.Animation fadeScale(Component c, boolean entering, javafx.util.Duration duration) -
fadeScale
public static javafx.animation.Animation fadeScale(Component c, boolean entering, javafx.util.Duration duration, javafx.util.Duration delay) -
pop
Emphatic "pop" — overshoots slightly before settling. Good for drawing attention (badges, alerts). -
pop
public static javafx.animation.Animation pop(Component c, boolean entering, javafx.util.Duration delay) -
slideHorizontal
Longer horizontal slide without fade — useful for carousel/wizard screen transitions. -
slideHorizontal
public static javafx.animation.Animation slideHorizontal(Component c, boolean entering, javafx.util.Duration delay) -
shake
Horizontal shake — useful for validation errors, wrong passwords, alerts. -
shake
-
bounce
Vertical bounce — rises and falls with easing. Good for badges, notifications. -
bounce
-
pulse
Scale pulse (heartbeat) — grows and returns. Good for action buttons, like icons. -
pulse
-
pulse
-
pulse
-
pulse
public static javafx.animation.Animation pulse(Component c, int cycles, javafx.util.Duration speed, javafx.util.Duration delay) -
flash
Opacity flash — quick blink. Good for urgent alerts, new messages. -
flash
-
wobble
Wobble — lateral oscillation with fade out. Good for elements being dismissed. -
wobble
-
slideInLeft
Slide in from the left — useful for side menus, drawers. -
slideInLeft
public static javafx.animation.Animation slideInLeft(Component c, boolean entering, javafx.util.Duration delay) -
slideInRight
Slide in from the right — useful for detail panels, sidebar. -
slideInRight
public static javafx.animation.Animation slideInRight(Component c, boolean entering, javafx.util.Duration delay) -
riseIn
Gentle entrance for card grids: fade + slight rise + slight scale, with EASE_OUT easing and longer duration (450ms by default) — designed to not feel like a harsh "pop". -
riseIn
public static javafx.animation.Animation riseIn(Component c, boolean entering, javafx.util.Duration duration) -
riseIn
public static javafx.animation.Animation riseIn(Component c, boolean entering, javafx.util.Duration duration, javafx.util.Duration delay)
-