Class symantec.itools.util.Timer
All Packages  Class Hierarchy  This Package  Previous  Next  Index
  Class symantec.itools.util.Timer
Object
   |
   +----symantec.itools.util.Timer
  -  public class Timer
  
-  extends Object
  
-  implements Runnable, Serializable
   
Sets a timer to wait before an action event is posted to a component.
 The caller can specify the target component, the event to send to the
 component, and the time delay.
 The timer is implemented as a thread.  The one of the start(...) methods should
 be called to start the thread.
  -  Version:
  
 -  1.0, Nov 26, 1996
  
 -  Author:
  
 -  Symantec
 
  
  -  
	actionCommand
   -   The value of the Action Command property.
  
 -  
	actionListener
   -   Listener(s) that get notified when an ActionEvent is generated.
  
 -  
	delay
   -   The value of the Delay property.
  
 -  
	eventType
   -   Reserved.
  
 -  
	execute
   -   True while timer thread is running.
  
 -  
	isDesignTime
   -   True if we're in the Java development environment.
  
 -  
	live
   -   True if the timer is enabled and running.
  
 -  
	repeat
   -   The value of the Repeat property.
  
 -  
	repeating
   -   Internal use.
  
 -  
	target
   -   Reserved.
  
 -  
	thread
   -   The timer's thread.
 
  
  -  
	symantec.itools.util.Timer()
   -   Creates a timer with the default delay.
  
 -  
	symantec.itools.util.Timer(int)
   -   Creates a timer with specified delay.
  
 -  
	symantec.itools.util.Timer(boolean)
   -   Creates a timer with specified repeat setting and the default delay.
  
 -  
	symantec.itools.util.Timer(int, boolean)
   -   Creates a timer with specified delay and repeat setting.
  
 -  
	symantec.itools.util.Timer(Component)
   -   
  
 -  
	symantec.itools.util.Timer(Component, int)
   -   
  
 -  
	symantec.itools.util.Timer(Component, int, boolean)
   -   
  
 -  
	symantec.itools.util.Timer(Component, int, boolean, int)
   -   
 
  
  -  
	addActionListener(ActionListener)
   -   Adds the specified action listener to receive action events
 from this button.
  
 -  
	addPropertyChangeListener(PropertyChangeListener)
   -   Adds a listener for all property change events.
  
 -  
	addVetoableChangeListener(VetoableChangeListener)
   -   Adds a listener for all vetoable property change events.
  
 -  
	getActionCommand()
   -   Returns the command name of the action event fired by this button.
  
 -  
	getDelay()
   -   Obtains the delay time setting for this timer.
  
 -  
	getEnabled()
   -   
  
 -  
	getRepeat()
   -   
  
 -  
	isEnabled()
   -   Is the timer currently enabled
 
  
 -  
	isRepeat()
   -   Obtains the repeat setting of the timer.
  
 -  
	pause()
   -   Pauses the timer.
  
 -  
	removeActionListener(ActionListener)
   -   Removes the specified action listener so it no longer receives
 action events from this button.
  
 -  
	removePropertyChangeListener(PropertyChangeListener)
   -   Removes a listener for all property change events.
  
 -  
	removeVetoableChangeListener(VetoableChangeListener)
   -   Removes a listener for all vetoable property change events.
  
 -  
	restart()
   -   Restarts the timer immediately with the current delay value.
  
 -  
	resume()
   -   Resumes the timer.
  
 -  
	run()
   -   The thread body.
  
 -  
	setActionCommand(String)
   -   Sets the command name of the action event fired by this button.
  
 -  
	setDelay(int)
   -   Sets the delay time for this timer.
  
 -  
	setRepeat(boolean)
   -   Changes the repeat setting of the timer.
  
 -  
	sourceActionEvent()
   -   Fires an action event to the listeners.
  
 -  
	start()
   -   Starts the timer with existing settings.
  
 -  
	start(int)
   -   Starts the timer using the specified delay.
  
 -  
	start(boolean)
   -   Starts the timer using the specified repeat setting.
  
 -  
	start(int, boolean)
   -   Starts the timer using the specified delay and repeat settings.
  
 -  
	stop()
   -   Stops the timer.
 
  
actionCommand
protected java.lang.String actionCommand
  -  The value of the Action Command property.
 
actionListener
protected java.awt.event.ActionListener actionListener
  -  Listener(s) that get notified when an ActionEvent is generated.
 
delay
protected int delay
  -  The value of the Delay property.
 
eventType
protected int eventType
  -  Reserved.
 
execute
protected boolean execute
  -  True while timer thread is running.
 
isDesignTime
protected boolean isDesignTime
  -  True if we're in the Java development environment.
 
live
protected boolean live
  -  True if the timer is enabled and running.
 
repeat
protected boolean repeat
  -  The value of the Repeat property.
 
repeating
protected boolean repeating
  -  Internal use. True if Repeat property true, and Timer is in its repeat timing loop.
 
target
protected java.awt.Component target
  -  Reserved.
 
thread
protected transient java.lang.Thread thread
  -  The timer's thread.
 
  
Timer
public Timer()
  -  Creates a timer with the default delay.
 After 1000 miliseconds this timer will fire an ActionEvent.
 It will not repeat.
  
 
 
Timer
public Timer(int d)
  -  Creates a timer with specified delay.
 After the specified delay this timer will fire an ActionEvent.
 It will not repeat.
  
 
 
    -  Parameters:
    
 -  d - the delay in milliseconds
  
 
 
 
Timer
public Timer(boolean r)
  -  Creates a timer with specified repeat setting and the default delay.
 After 1000 miliseconds this timer will fire an ActionEvent.
 It may repeat, depending on r.
  
 
 
    -  Parameters:
    
 -  r - if true, reset and repeat after generating the event
  
 
 
 
Timer
public Timer(int d,
             boolean r)
  -  Creates a timer with specified delay and repeat setting.
 After the specified delay this timer will fire an ActionEvent.
 It may repeat, depending on r.
  
 
 
    -  Parameters:
    
 -  d - the delay in milliseconds
    
-  r - if true, reset and repeat after generating the event
  
  
 
 
Timer
public Timer(Component t)
-  Note: Timer() is deprecated.
  
-  
  
 
 
    -  See Also:
    
 -  Timer(int, boolean)
  
 
 
  
Timer
public Timer(Component t,
             int d)
-  Note: Timer() is deprecated.
  
-  
  
 
 
    -  See Also:
    
 -  Timer(int, boolean)
  
 
 
  
Timer
public Timer(Component t,
             int d,
             boolean r)
-  Note: Timer() is deprecated.
  
-  
  
 
 
    -  See Also:
    
 -  Timer(int, boolean)
  
 
 
  
Timer
public Timer(Component t,
             int d,
             boolean r,
             int e)
-  Note: Timer() is deprecated.
  
-  
  
 
 
    -  See Also:
    
 -  Timer(int, boolean)
  
 
 
  
  
addActionListener
public void addActionListener(ActionListener l)
  -  Adds the specified action listener to receive action events
 from this button.
  
 
 
    -  Parameters:
    
 -  l - the action listener
  
 
 
 
addPropertyChangeListener
public void addPropertyChangeListener(PropertyChangeListener listener)
  -  Adds a listener for all property change events.
  
 
 
    -  Parameters:
    
 -  listener - the listener to add
    
 -  See Also:
    
 -  removePropertyChangeListener
  
 
 
 
addVetoableChangeListener
public void addVetoableChangeListener(VetoableChangeListener listener)
  -  Adds a listener for all vetoable property change events.
  
 
 
    -  Parameters:
    
 -  listener - the listener to add
    
 -  See Also:
    
 -  removeVetoableChangeListener
  
 
 
 
getActionCommand
public java.lang.String getActionCommand()
  -  Returns the command name of the action event fired by this button.
  
 
 
    -  See Also:
    
 -  setActionCommand
  
 
 
 
getDelay
public int getDelay()
  -  Obtains the delay time setting for this timer.
  
 
 
    -  Returns:
    
 -  the current delay setting for this timer, in milliseconds
    
 -  See Also:
    
 -  setDelay(int)
  
 
 
 
getEnabled
public boolean getEnabled()
-  Note: getEnabled() is deprecated.
Needed for compatability with backrunner.
  
-  
  
 
  
getRepeat
public boolean getRepeat()
-  Note: getRepeat() is deprecated.
  
-  
  
 
 
    -  See Also:
    
 -  isRepeat()
  
 
 
  
isEnabled
public boolean isEnabled()
  -  Is the timer currently enabled
  
 
 
    -  Returns:
    
 -  true if the timer is running.
  
 
 
 
isRepeat
public boolean isRepeat()
  -  Obtains the repeat setting of the timer.
  
 
 
    -  Returns:
    
 -  true if this timer is set to repeat, false if this timer does not repeat
    
 -  See Also:
    
 -  setRepeat
  
 
 
 
pause
public synchronized void pause()
  -  Pauses the timer.
 Differs from stop in that the timer
 is continued from whatever state it was in before
 pausing.
 
 start() and stop() overrule this function.
  
 
 
    -  See Also:
    
 -  resume, start, stop
  
 
 
 
removeActionListener
public void removeActionListener(ActionListener l)
  -  Removes the specified action listener so it no longer receives
 action events from this button.
  
 
 
    -  Parameters:
    
 -  l - the action listener
  
 
 
 
removePropertyChangeListener
public void removePropertyChangeListener(PropertyChangeListener listener)
  -  Removes a listener for all property change events.
  
 
 
    -  Parameters:
    
 -  listener - the listener to remove
    
 -  See Also:
    
 -  addPropertyChangeListener
  
 
 
 
removeVetoableChangeListener
public void removeVetoableChangeListener(VetoableChangeListener listener)
  -  Removes a listener for all vetoable property change events.
  
 
 
    -  Parameters:
    
 -  listener - the listener to remove
    
 -  See Also:
    
 -  addVetoableChangeListener
  
 
 
 
restart
public synchronized void restart()
  -  Restarts the timer immediately with the current delay value.
 This will start a stopped timer.
  
 
 
    -  See Also:
    
 -  start(), stop()
  
 
 
 
resume
public synchronized void resume()
  -  Resumes the timer.
 Differs from start in that the timer
 is continued from whatever state it was in before
 pausing.
 
 start() and stop() overrule this function
  
 
 
    -  See Also:
    
 -  pause, start, stop
  
 
 
 
run
public void run()
  -  The thread body.  This method is called by the Java virtual machine in response to a
 start call by the user.
  
 
 
    -  See Also:
    
 -  start(), start(int), start(boolean), start(int, boolean), stop
  
 
 
 
setActionCommand
public void setActionCommand(String command) throws PropertyVetoException
  -  Sets the command name of the action event fired by this button.
  
 
 
    -  Parameters:
    
 -  command - Tthe name of the action event command fired by this button
    
 -  Throws: PropertyVetoException
    
 -   if the specified property value is unacceptable
    
 -  See Also:
    
 -  getActionCommand
  
 
 
 
setDelay
public void setDelay(int d) throws PropertyVetoException
  -  Sets the delay time for this timer.
  
 
 
    -  Parameters:
    
 -  d - the delay in milliseconds.  This delay will be used starting
          after the current delay elapses
    
 -  Throws: PropertyVetoException
    
 -   if the specified property value is unacceptable
    
 -  See Also:
    
 -  getDelay()
  
 
 
 
setRepeat
public void setRepeat(boolean f) throws PropertyVetoException
  -  Changes the repeat setting of the timer.
 If the repeat setting is false a single event will be generated.  When
 set to true the timer produces a series of events.
  
 
 
    -  Parameters:
    
 -  f - reset and repeat after generating the event
    
 -  Throws: PropertyVetoException
    
 -   if the specified property value is unacceptable
    
 -  See Also:
    
 -  isRepeat
  
 
 
 
sourceActionEvent
public void sourceActionEvent()
  -  Fires an action event to the listeners.
  
 
 
    -  See Also:
    
 -  setActionCommand
  
 
 
 
start
public synchronized void start()
  -  Starts the timer with existing settings.
  
 
 
    -  See Also:
    
 -  start(int), start(boolean), start(int, boolean), stop, run
  
 
 
 
start
public synchronized void start(int d) throws PropertyVetoException
  -  Starts the timer using the specified delay.
  
 
 
    -  Parameters:
    
 -  d - the delay in milliseconds
    
 -  Throws: PropertyVetoException
    
 -   if the specified property value is unacceptable
    
 -  See Also:
    
 -  start(), start(boolean), start(int, boolean), stop, run
  
 
 
 
start
public synchronized void start(boolean r) throws PropertyVetoException
  -  Starts the timer using the specified repeat setting.
  
 
 
    -  Parameters:
    
 -  r - reset and repeat after generating the event
    
 -  Throws: PropertyVetoException
    
 -   if the specified property value is unacceptable
    
 -  See Also:
    
 -  start(), start(int), start(int, boolean), stop, run
  
 
 
 
start
public synchronized void start(int d,
                               boolean r) throws PropertyVetoException
  -  Starts the timer using the specified delay and repeat settings.
  
 
 
    -  Parameters:
    
 -  d - the delay in milliseconds
    
-  r - reset and repeat after generating the event
    
  -  Throws: PropertyVetoException
    
 -   if the specified property value is unacceptable
    
 -  See Also:
    
 -  start(), start(int), start(boolean), stop, run
  
 
 
 
stop
public synchronized void stop()
  -  Stops the timer.  After return the timer will generate no more events.
  
 
 
    -  See Also:
    
 -  start
  
 
 
 
All Packages  Class Hierarchy  This Package  Previous  Next  Index