Example usage for Java javax.swing Timer fields, constructors, methods, implement or subclass
The text is from its open source code.
Timer(int delay, ActionListener listener) Creates a Timer and initializes both the initial delay and between-event delay to delay milliseconds. |
void | addActionListener(ActionListener listener) Adds an action listener to the Timer . |
Class> | getClass() Returns the runtime class of this Object . |
int | getDelay() Returns the delay, in milliseconds, between firings of action events. |
boolean | isRepeats() Returns true (the default) if the Timer will send an action event to its listeners multiple times. |
boolean | isRunning() Returns true if the Timer is running. |
void | restart() Restarts the Timer , canceling any pending firings and causing it to fire with its initial delay. |
void | setCoalesce(boolean flag) Sets whether the Timer coalesces multiple pending ActionEvent firings. |
void | setDelay(int delay) Sets the Timer 's between-event delay, the number of milliseconds between successive action events. |
void | setInitialDelay(int initialDelay) Sets the Timer 's initial delay, the time in milliseconds to wait after the timer is started before firing the first event. |
void | setLogTimers(boolean flag) Enables or disables the timer log. |
void | setRepeats(boolean flag) If flag is false , instructs the Timer to send only one action event to its listeners. |
void | start() Starts the Timer , causing it to start sending action events to its listeners. |
void | stop() Stops the Timer , causing it to stop sending action events to its listeners. |