|
Xj3D 2.0 VRML/X3D Code API | |||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectjava.util.TimerTask
org.xj3d.ui.swt.widgets.Alarm
public class Alarm
An alarm or timer function. This is a simple extension of a TimerTask that generates an event as a result of the Timer expiring. The class was created to separate TimerTask functionality from objects servicing swt ui objects.
| Field Summary | |
|---|---|
protected AlarmListener[] |
alarmListenerArray
The working array of listeners |
protected static AlarmListener[] |
NULL_AL_ARRAY
Initial null array of AlarmListener's |
protected AlarmEvent |
theEvent
The one and only event object |
| Constructor Summary | |
|---|---|
Alarm()
Default Constructor |
|
Alarm(AlarmListener listener)
Constructor |
|
| Method Summary | |
|---|---|
void |
addAlarmListener(AlarmListener listener)
Add a listener for AlarmEvents |
protected void |
fireAlarmEvent(AlarmEvent ae)
Send a AlarmEvent to all registered listeners |
void |
removeAlarmListener(AlarmListener listener)
Remove a listener for AlarmEvents |
void |
run()
The Timer has expired, notify the listeners |
| Methods inherited from class java.util.TimerTask |
|---|
cancel, scheduledExecutionTime |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Field Detail |
|---|
protected static final AlarmListener[] NULL_AL_ARRAY
protected AlarmListener[] alarmListenerArray
protected AlarmEvent theEvent
| Constructor Detail |
|---|
public Alarm()
public Alarm(AlarmListener listener)
listener - - the initial listener| Method Detail |
|---|
public void run()
run in interface java.lang.Runnablerun in class java.util.TimerTaskpublic void addAlarmListener(AlarmListener listener)
AlarmEvents
listener - the listenerpublic void removeAlarmListener(AlarmListener listener)
AlarmEvents
listener - the listenerprotected void fireAlarmEvent(AlarmEvent ae)
AlarmEvent to all registered listeners
ae - the AlarmEvent to send
|
Xj3D 2.0 VRML/X3D Code API | |||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||