javax.swing.plaf.basic
Class BasicProgressBarUI.Animator
java.lang.Object
javax.swing.plaf.basic.BasicProgressBarUI.Animator
- All Implemented Interfaces:
- ActionListener, EventListener
- Enclosing class:
- BasicProgressBarUI
- private class BasicProgressBarUI.Animator
- extends Object
- implements ActionListener
Implements an animation thread that invokes repaint
at a fixed rate. If ADJUSTTIMER is true, this thread
will continuously adjust the repaint interval to
try to make the actual time between repaints match
the requested rate.
Method Summary |
void |
actionPerformed(ActionEvent e)
Reacts to the timer's action events. |
private void |
start(int interval)
Creates a timer if one doesn't already exist,
then starts the timer thread. |
private void |
stop()
Stops the timer thread. |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
timer
private Timer timer
previousDelay
private long previousDelay
interval
private int interval
lastCall
private long lastCall
MINIMUM_DELAY
private int MINIMUM_DELAY
BasicProgressBarUI.Animator
private BasicProgressBarUI.Animator()
start
private void start(int interval)
- Creates a timer if one doesn't already exist,
then starts the timer thread.
stop
private void stop()
- Stops the timer thread.
actionPerformed
public void actionPerformed(ActionEvent e)
- Reacts to the timer's action events.
- Specified by:
actionPerformed
in interface ActionListener