javax.swing.plaf.basic
Class BasicProgressBarUI.Animator

java.lang.Object
  extended byjavax.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.


Field Summary
private  int interval
           
private  long lastCall
           
private  int MINIMUM_DELAY
           
private  long previousDelay
           
private  Timer timer
           
 
Constructor Summary
private BasicProgressBarUI.Animator()
           
 
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
 

Field Detail

timer

private Timer timer

previousDelay

private long previousDelay

interval

private int interval

lastCall

private long lastCall

MINIMUM_DELAY

private int MINIMUM_DELAY
Constructor Detail

BasicProgressBarUI.Animator

private BasicProgressBarUI.Animator()
Method Detail

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