Class JXCollapsiblePane.AnimationListener

  • All Implemented Interfaces:
    java.awt.event.ActionListener, java.util.EventListener
    Enclosing class:
    JXCollapsiblePane

    private final class JXCollapsiblePane.AnimationListener
    extends java.lang.Object
    implements java.awt.event.ActionListener
    This class actual provides the animation support for scrolling up/down this component. This listener is called whenever the animateTimer fires off. It fires off in response to scroll up/down requests. This listener is responsible for modifying the size of the content container and causing it to be repainted.
    • Field Summary

      Fields 
      Modifier and Type Field Description
      private float animateAlpha
      The current alpha setting used during "animation" (fade-in/fade-out)
      private java.lang.Object ANIMATION_MUTEX
      Mutex used to ensure that the startDimension/finalDimension are not changed during a repaint operation.
      private int finalDimension
      This is the final dimension that the content container is going to be when scrolling is finished.
      private int startDimension
      This is the starting dimension when animating.
    • Constructor Summary

      Constructors 
      Modifier Constructor Description
      private AnimationListener()  
    • Method Summary

      All Methods Instance Methods Concrete Methods 
      Modifier and Type Method Description
      void actionPerformed​(java.awt.event.ActionEvent e)  
      void reinit​(int startDimension, int stopDimension)
      Reinitializes the timer for scrolling up/down the component.
      (package private) void validate()  
      • Methods inherited from class java.lang.Object

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

      • ANIMATION_MUTEX

        private final java.lang.Object ANIMATION_MUTEX
        Mutex used to ensure that the startDimension/finalDimension are not changed during a repaint operation.
      • startDimension

        private int startDimension
        This is the starting dimension when animating. If > finalDimension, then the animation is going to be to scroll up the component. If it is less than finalDimension, then the animation will scroll down the component.
      • finalDimension

        private int finalDimension
        This is the final dimension that the content container is going to be when scrolling is finished.
      • animateAlpha

        private float animateAlpha
        The current alpha setting used during "animation" (fade-in/fade-out)
    • Constructor Detail

      • AnimationListener

        private AnimationListener()
    • Method Detail

      • actionPerformed

        public void actionPerformed​(java.awt.event.ActionEvent e)
        Specified by:
        actionPerformed in interface java.awt.event.ActionListener
      • validate

        void validate()
      • reinit

        public void reinit​(int startDimension,
                           int stopDimension)
        Reinitializes the timer for scrolling up/down the component. This method is properly synchronized, so you may make this call regardless of whether the timer is currently executing or not.
        Parameters:
        startDimension -
        stopDimension -