Package org.jdesktop.swingx
Class JXCollapsiblePane.AnimationListener
- java.lang.Object
-
- org.jdesktop.swingx.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.ActionListenerThis 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 floatanimateAlphaThe current alpha setting used during "animation" (fade-in/fade-out)private java.lang.ObjectANIMATION_MUTEXMutex used to ensure that the startDimension/finalDimension are not changed during a repaint operation.private intfinalDimensionThis is the final dimension that the content container is going to be when scrolling is finished.private intstartDimensionThis is the starting dimension when animating.
-
Constructor Summary
Constructors Modifier Constructor Description privateAnimationListener()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description voidactionPerformed(java.awt.event.ActionEvent e)voidreinit(int startDimension, int stopDimension)Reinitializes the timer for scrolling up/down the component.(package private) voidvalidate()
-
-
-
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)
-
-
Method Detail
-
actionPerformed
public void actionPerformed(java.awt.event.ActionEvent e)
- Specified by:
actionPerformedin interfacejava.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-
-
-