Class Animations

java.lang.Object
megalodonte.base.Animations

public class Animations extends Object
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
    Constructor
    Description
     
  • Method Summary

    Modifier and Type
    Method
    Description
    static javafx.animation.Animation
    Vertical bounce — rises and falls with easing.
    static javafx.animation.Animation
    bounce(Component c, javafx.util.Duration delay)
     
    static javafx.animation.Animation
    fade(Component c, boolean entering)
    Pure fade without displacement.
    static javafx.animation.Animation
    fade(Component c, boolean entering, javafx.util.Duration delay)
     
    static javafx.animation.Animation
    fadeScale(Component c, boolean entering)
    Smooth scale up/down from center, combined with fade.
    static javafx.animation.Animation
    fadeScale(Component c, boolean entering, javafx.util.Duration duration)
     
    static javafx.animation.Animation
    fadeScale(Component c, boolean entering, javafx.util.Duration duration, javafx.util.Duration delay)
     
    static javafx.animation.Animation
    fadeSlide(Component c, boolean entering)
     
    static javafx.animation.Animation
    fadeSlide(Component c, boolean entering, javafx.util.Duration delay)
     
    static javafx.animation.Animation
    fadeSlideDown(Component c, boolean entering)
    Slides from/to above — useful for dropdowns, menus, notifications.
    static javafx.animation.Animation
    fadeSlideDown(Component c, boolean entering, javafx.util.Duration delay)
     
    static javafx.animation.Animation
    fadeSlideUp(Component c, boolean entering)
    Slides from/to below — useful for toasts/popups rising from the bottom of the screen.
    static javafx.animation.Animation
    fadeSlideUp(Component c, boolean entering, javafx.util.Duration delay)
     
    static javafx.animation.Animation
    Opacity flash — quick blink.
    static javafx.animation.Animation
    flash(Component c, javafx.util.Duration delay)
     
    static javafx.animation.Animation
    pop(Component c, boolean entering)
    Emphatic "pop" — overshoots slightly before settling.
    static javafx.animation.Animation
    pop(Component c, boolean entering, javafx.util.Duration delay)
     
    static javafx.animation.Animation
    Scale pulse (heartbeat) — grows and returns.
    static javafx.animation.Animation
    pulse(Component c, int cycles)
     
    static javafx.animation.Animation
    pulse(Component c, int cycles, javafx.util.Duration delay)
     
    static javafx.animation.Animation
    pulse(Component c, int cycles, javafx.util.Duration speed, javafx.util.Duration delay)
     
    static javafx.animation.Animation
    pulse(Component c, javafx.util.Duration delay)
     
    static javafx.animation.Animation
    riseIn(Component c, boolean entering)
    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".
    static javafx.animation.Animation
    riseIn(Component c, boolean entering, javafx.util.Duration duration)
     
    static javafx.animation.Animation
    riseIn(Component c, boolean entering, javafx.util.Duration duration, javafx.util.Duration delay)
     
    static javafx.animation.Animation
    rotate(javafx.scene.Node node, double fromAngle, double toAngle, javafx.util.Duration duration)
     
    static javafx.animation.Animation
    rotate(Component c, double fromAngle, double toAngle, javafx.util.Duration duration)
    Free rotation between two angles.
    static javafx.animation.Animation
    rotate360(javafx.scene.Node node)
     
    static javafx.animation.Animation
    Full 360-degree spin.
    static javafx.animation.Animation
    Horizontal shake — useful for validation errors, wrong passwords, alerts.
    static javafx.animation.Animation
    shake(Component c, javafx.util.Duration delay)
     
    static javafx.animation.Animation
    slideHorizontal(Component c, boolean entering)
    Longer horizontal slide without fade — useful for carousel/wizard screen transitions.
    static javafx.animation.Animation
    slideHorizontal(Component c, boolean entering, javafx.util.Duration delay)
     
    static javafx.animation.Animation
    slideInLeft(Component c, boolean entering)
    Slide in from the left — useful for side menus, drawers.
    static javafx.animation.Animation
    slideInLeft(Component c, boolean entering, javafx.util.Duration delay)
     
    static javafx.animation.Animation
    slideInRight(Component c, boolean entering)
    Slide in from the right — useful for detail panels, sidebar.
    static javafx.animation.Animation
    slideInRight(Component c, boolean entering, javafx.util.Duration delay)
     
    static javafx.animation.Animation
    Wobble — lateral oscillation with fade out.
    static javafx.animation.Animation
    wobble(Component c, javafx.util.Duration delay)
     

    Methods inherited from class Object

    clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
  • 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

      public static javafx.animation.Animation rotate360(Component c)
      Full 360-degree spin. Good for "refresh"/loading icon on click.
    • fadeSlide

      public static javafx.animation.Animation fadeSlide(Component c, boolean entering)
    • fadeSlide

      public static javafx.animation.Animation fadeSlide(Component c, boolean entering, javafx.util.Duration delay)
    • fade

      public static javafx.animation.Animation fade(Component c, boolean entering)
      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

      public static javafx.animation.Animation fadeSlideDown(Component c, boolean entering)
      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

      public static javafx.animation.Animation fadeSlideUp(Component c, boolean entering)
      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

      public static javafx.animation.Animation fadeScale(Component c, boolean entering)
      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

      public static javafx.animation.Animation pop(Component c, boolean entering)
      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

      public static javafx.animation.Animation slideHorizontal(Component c, boolean entering)
      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

      public static javafx.animation.Animation shake(Component c)
      Horizontal shake — useful for validation errors, wrong passwords, alerts.
    • shake

      public static javafx.animation.Animation shake(Component c, javafx.util.Duration delay)
    • bounce

      public static javafx.animation.Animation bounce(Component c)
      Vertical bounce — rises and falls with easing. Good for badges, notifications.
    • bounce

      public static javafx.animation.Animation bounce(Component c, javafx.util.Duration delay)
    • pulse

      public static javafx.animation.Animation pulse(Component c)
      Scale pulse (heartbeat) — grows and returns. Good for action buttons, like icons.
    • pulse

      public static javafx.animation.Animation pulse(Component c, int cycles)
    • pulse

      public static javafx.animation.Animation pulse(Component c, javafx.util.Duration delay)
    • pulse

      public static javafx.animation.Animation pulse(Component c, int cycles, javafx.util.Duration delay)
    • pulse

      public static javafx.animation.Animation pulse(Component c, int cycles, javafx.util.Duration speed, javafx.util.Duration delay)
    • flash

      public static javafx.animation.Animation flash(Component c)
      Opacity flash — quick blink. Good for urgent alerts, new messages.
    • flash

      public static javafx.animation.Animation flash(Component c, javafx.util.Duration delay)
    • wobble

      public static javafx.animation.Animation wobble(Component c)
      Wobble — lateral oscillation with fade out. Good for elements being dismissed.
    • wobble

      public static javafx.animation.Animation wobble(Component c, javafx.util.Duration delay)
    • slideInLeft

      public static javafx.animation.Animation slideInLeft(Component c, boolean entering)
      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

      public static javafx.animation.Animation slideInRight(Component c, boolean entering)
      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

      public static javafx.animation.Animation riseIn(Component c, boolean entering)
      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)