Class JXCollapsiblePane.AnimationListener

java.lang.Object
org.jdesktop.swingx.JXCollapsiblePane.AnimationListener
All Implemented Interfaces:
ActionListener, EventListener
Enclosing class:
JXCollapsiblePane

private final class JXCollapsiblePane.AnimationListener extends Object implements 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
    The current alpha setting used during "animation" (fade-in/fade-out)
    private final Object
    Mutex used to ensure that the startDimension/finalDimension are not changed during a repaint operation.
    private int
    This is the final dimension that the content container is going to be when scrolling is finished.
    private int
    This is the starting dimension when animating.
  • Constructor Summary

    Constructors
    Modifier
    Constructor
    Description
    private
     
  • Method Summary

    Modifier and Type
    Method
    Description
    void
     
    void
    reinit(int startDimension, int stopDimension)
    Reinitializes the timer for scrolling up/down the component.
    (package private) void
     

    Methods inherited from class java.lang.Object

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

    • ANIMATION_MUTEX

      private final 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 Details

    • AnimationListener

      private AnimationListener()
  • Method Details

    • actionPerformed

      public void actionPerformed(ActionEvent e)
      Specified by:
      actionPerformed in interface 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 -