ElegantJ Data Entry Masks Java API Specification v1.1

com.elegantj.util.timer
Class Timer

java.lang.Object
  extended bycom.elegantj.util.timer.Timer
All Implemented Interfaces:
java.io.Externalizable, java.lang.Runnable, java.io.Serializable

public class Timer
extends java.lang.Object
implements java.lang.Runnable, java.io.Externalizable

This class provides the timer. The timer fires the event timerTick whenever the tick occurs. The interval of tick can be set by setInterval. Timer can be started by method start() and stopped by stop()

See Also:
Serialized Form

Field Summary
 com.elegantj.editors.C1 c1
           
 
Constructor Summary
Timer()
          Default constructor for Timer
 
Method Summary
 void addPropertyChangeListener(java.beans.PropertyChangeListener l)
          Method which adds the property change listener l The property change listener
 void addTimerListener(TimerListener l)
          Add a timerTick event listener
 void fireTimerEvent()
          This method fires the Timer Event to all its listeners.
 void fireTimerEvent(int nEvent)
          This method fires the Timer Event to all its listeners.
 long getInterval()
          Get current timer-tick interval.
 java.lang.String getLicenseKey()
          Returns the license key of the bean
 void invertStarted()
          Inverts timer started state.
 boolean isStarted()
          Get current started state.
 void readExternal(java.io.ObjectInput in)
          Implementation of the Externalizable
 void removePropertyChangeListener(java.beans.PropertyChangeListener l)
          Method which removes the property change listener l The property change listener
 void removeTimerListener(TimerListener l)
          Remove a timerTick event listener
 void run()
          Overriden run method from Runnable
 void setInterval(long interval)
          Sets the interval for the timer
 void setLicenseKey(java.lang.String licenseKey)
          Methods which sets the license key
 void setStarted(boolean bStart)
          Sets timer started state
 void start()
          Start the timer.
 void stop()
          Stop the timer.
 void writeExternal(java.io.ObjectOutput out)
          Implementation of the Externalizable
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

c1

public transient com.elegantj.editors.C1 c1
Constructor Detail

Timer

public Timer()
Default constructor for Timer

Method Detail

setInterval

public void setInterval(long interval)
Sets the interval for the timer

Parameters:
interval - interval for the timer-tick

getInterval

public long getInterval()
Get current timer-tick interval.

Returns:
current interval.

setLicenseKey

public void setLicenseKey(java.lang.String licenseKey)
Methods which sets the license key


getLicenseKey

public java.lang.String getLicenseKey()
Returns the license key of the bean

Returns:
The license key of the bean

setStarted

public void setStarted(boolean bStart)
Sets timer started state

Parameters:
bStart - the state to start/stop.

isStarted

public boolean isStarted()
Get current started state.

Returns:
current started state.

invertStarted

public void invertStarted()
Inverts timer started state. If the timer is started then this method stops it and if is not started then starts it.


start

public void start()
Start the timer.


stop

public void stop()
Stop the timer.


run

public void run()
Overriden run method from Runnable

Specified by:
run in interface java.lang.Runnable

fireTimerEvent

public final void fireTimerEvent()
This method fires the Timer Event to all its listeners.


fireTimerEvent

public final void fireTimerEvent(int nEvent)
This method fires the Timer Event to all its listeners.


addTimerListener

public void addTimerListener(TimerListener l)
Add a timerTick event listener

Parameters:
l - The Timer Listener

removeTimerListener

public void removeTimerListener(TimerListener l)
Remove a timerTick event listener

Parameters:
l - The Timer Listener

addPropertyChangeListener

public void addPropertyChangeListener(java.beans.PropertyChangeListener l)
Method which adds the property change listener l The property change listener


removePropertyChangeListener

public void removePropertyChangeListener(java.beans.PropertyChangeListener l)
Method which removes the property change listener l The property change listener


writeExternal

public void writeExternal(java.io.ObjectOutput out)
                   throws java.io.IOException
Implementation of the Externalizable

Specified by:
writeExternal in interface java.io.Externalizable
Throws:
java.io.IOException

readExternal

public void readExternal(java.io.ObjectInput in)
                  throws java.io.IOException,
                         java.lang.ClassNotFoundException
Implementation of the Externalizable

Specified by:
readExternal in interface java.io.Externalizable
Throws:
java.io.IOException
java.lang.ClassNotFoundException

ElegantJ Data Entry Masks Java API Specification v1.1

Submit a bug or feature

Copyright(c)
Elegant Microweb Technologies Pvt. Ltd.
www.elegantmicroweb.com
www.elegantjbeans.com
All Rights Reserved.