Package org.jdesktop.swingx
Class JXCollapsiblePane.AnimationListener
java.lang.Object
org.jdesktop.swingx.JXCollapsiblePane.AnimationListener
- All Implemented Interfaces:
ActionListener
,EventListener
- Enclosing class:
JXCollapsiblePane
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
FieldsModifier and TypeFieldDescriptionprivate 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 -
Method Summary
-
Field Details
-
ANIMATION_MUTEX
Mutex used to ensure that the startDimension/finalDimension are not changed during a repaint operation. -
startDimension
private int startDimensionThis 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 finalDimensionThis is the final dimension that the content container is going to be when scrolling is finished. -
animateAlpha
private float animateAlphaThe current alpha setting used during "animation" (fade-in/fade-out)
-
-
Constructor Details
-
AnimationListener
private AnimationListener()
-
-
Method Details
-
actionPerformed
- Specified by:
actionPerformed
in interfaceActionListener
-
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
-
-