Overview | Package | Class | Tree | Deprecated | Index | Help
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD

## oracle.ifs.utils.common
Class Timer

    java.lang.Object
      oracle.ifs.utils.common.Timer

    public class Timer

extends java.lang.Object

A Timer invokes the actionPerformed method of a registered ActionListener at a specified periodic interval. Note: the actionPerformed method is invoked with a null ActionEvent.

Constructor Summary
`Timer(java.lang.String name, long delay, java.awt.event.ActionListener listener)` Creates a new Timer.

Method Summary
`void` | `addActionListener(java.awt.event.ActionListener listener)` Adds an ActionListener to invoke at timer expirations.
`long` | `clearReset()` Gets the time of the last reset, then clears the indication of the reset.
`java.util.Date` | `getLastActivation()` Returns the time of the last timer expiration.
`java.util.Date` | `getNextActivation()` Returns the time of the next timer expiration.
`void` | `removeActionListener(java.awt.event.ActionListener listener)` Removes the given ActionListener so that it will no longer be invoked.
`void` | `reset()` Resets this Timer.
`void` | `start()` Starts this Timer immediately.
`void` | `start(long initialDelay)` Starts this Timer with an initial delay.
`void` | `stop()` Stops this Timer.

Methods inherited from class java.lang.Object
`clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

Constructor Detail

### Timer

    public Timer(java.lang.String name,
                 long delay,
                 java.awt.event.ActionListener listener)

  Creates a new Timer.

  Parameters:
    `name` - the name for this Timer's daemon thread.
    `delay` - the delay between successive timer expirations, in ms.
    `listener` - the ActionListener to invoke at timer expirations.

Method Detail

### addActionListener

    public void addActionListener(java.awt.event.ActionListener listener)

  Description copied from class: `Timer`
  Adds an ActionListener to invoke at timer expirations.

  Parameters:
    `listener` - the ActionListener to add.

### removeActionListener

    public void removeActionListener(java.awt.event.ActionListener listener)

  Description copied from class: `Timer`
  Removes the given ActionListener so that it will no longer be invoked.

  Parameters:
    `listener` - the ActionListener to remove.

### start

    public void start()

  Description copied from class: `Timer`
  Starts this Timer immediately.

### start

    public void start(long initialDelay)

  Description copied from class: `Timer`
  Starts this Timer with an initial delay.

  Parameters:
    `initialDelay` - the delay before first timer expiration, in ms.

### stop

    public void stop()

  Description copied from class: `Timer`
  Stops this Timer.

### reset

    public void reset()

  Description copied from class: `Timer`
  Resets this Timer.

### clearReset

    public long clearReset()

  Description copied from class: `Timer`
  Gets the time of the last reset, then clears the indication of the reset.

  Returns:
    the time the last reset was issued, or 0L if the timer was not reset.

### getLastActivation

    public java.util.Date getLastActivation()

  Description copied from class: `Timer`
  Returns the time of the last timer expiration.

  Returns:
    the last activation time.

### getNextActivation

    public java.util.Date getNextActivation()

  Description copied from class: `Timer`
  Returns the time of the next timer expiration.

  Returns:
    the next activation time.

Overview | Package | Class | Tree | Deprecated | Index | Help
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD