Class FlatAnimatedLafChange


  • public class FlatAnimatedLafChange
    extends java.lang.Object
    Animated look and feel changing.

    Invoke showSnapshot() before setting look and feel and hideSnapshotWithAnimation() after updating UI. E.g.

     FlatAnimatedLafChange.showSnapshot();
     UIManager.setLookAndFeel( lafClassName );
     FlatLaf.updateUI();
     FlatAnimatedLafChange.hideSnapshotWithAnimation();
     
    • Field Summary

      Fields 
      Modifier and Type Field Description
      static int duration
      The duration of the animation in milliseconds.
      static int resolution
      The resolution of the animation in milliseconds.
    • Method Summary

      All Methods Static Methods Concrete Methods 
      Modifier and Type Method Description
      static void hideSnapshotWithAnimation()
      Starts an animation that shows the snapshot (created by showSnapshot() with an decreasing alpha.
      static void showSnapshot()
      Create a snapshot of the old UI and shows it on top of the UI.
      static void stop()
      Stops a running animation (if any) and hides the snapshot.
      • Methods inherited from class java.lang.Object

        clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
    • Field Detail

      • duration

        public static int duration
        The duration of the animation in milliseconds. Default is 160 ms.
      • resolution

        public static int resolution
        The resolution of the animation in milliseconds. Default is 40 ms.
    • Constructor Detail

      • FlatAnimatedLafChange

        public FlatAnimatedLafChange()
    • Method Detail

      • showSnapshot

        public static void showSnapshot()
        Create a snapshot of the old UI and shows it on top of the UI. Invoke before setting new look and feel.
      • hideSnapshotWithAnimation

        public static void hideSnapshotWithAnimation()
        Starts an animation that shows the snapshot (created by showSnapshot() with an decreasing alpha. At the end, the snapshot is removed and the new UI is shown. Invoke after updating UI.
      • stop

        public static void stop()
        Stops a running animation (if any) and hides the snapshot.