|
JIDE 3.5.15 | ||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object com.jidesoft.swing.Animator
public class Animator
An ActionListener
with a timer. It is used to simplify the animation of all kind of sliding windows.
Constructor Summary | |
---|---|
Animator(Component source)
Creates an animator for source with initDelay 50 ms, each step delays 10 ms and total 10 steps. |
|
Animator(Component source,
int initDelay,
int delay,
int totalSteps)
Creates an animator for source. |
Method Summary | |
---|---|
void |
actionPerformed(ActionEvent e)
|
void |
addAnimatorListener(AnimatorListener l)
Adds an AnimatorListener to this Animator. |
protected Timer |
createTimer(int delay,
ActionListener listener)
Creates the timer. |
void |
dispose()
|
AnimatorListener[] |
getAnimatorListeners()
Returns an array of all the AnimatorListener s added to this Animator with addAnimatorListener(). |
void |
interrupt()
Interrupts the animator. |
boolean |
isRunning()
If the animator is running, returns true. |
void |
removeAnimatorListener(AnimatorListener l)
Removes an AnimatorListener from this Animator. |
void |
setDelay(int delay)
|
void |
start()
Starts the animator. |
void |
stop()
Stop the animator and reset the counter. |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public Animator(Component source)
source
- the source for this animator.public Animator(Component source, int initDelay, int delay, int totalSteps)
source
- the source for this animator.initDelay
- the initial delay before timer starts.delay
- the delay of the timertotalSteps
- the number of steps. If -1, it means this animator will never stop until stop()
is
called.Method Detail |
---|
protected Timer createTimer(int delay, ActionListener listener)
delay
- the delay between each step, in ms.listener
- the action listener associated with the timer.
public void addAnimatorListener(AnimatorListener l)
AnimatorListener
to this Animator.
l
- the AnimatorListener
to be addedpublic void removeAnimatorListener(AnimatorListener l)
AnimatorListener
from this Animator.
l
- the listener to be removedpublic AnimatorListener[] getAnimatorListeners()
AnimatorListener
s added to this Animator with addAnimatorListener().
AnimatorListener
s added or an empty array if no listeners have been addedpublic void actionPerformed(ActionEvent e)
actionPerformed
in interface ActionListener
public void start()
public void stop()
public void interrupt()
public boolean isRunning()
public void setDelay(int delay)
public void dispose()
|
JIDE 3.5.15 | ||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |