|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectedu.umd.cs.piccolox.swt.SWTTimerQueue
public class SWTTimerQueue
The SWTTimerQueue is a queue of timers. It has been implemented as a linked list of SWTTimer objects.
Nested Class Summary | |
---|---|
protected static class |
SWTTimerQueue.SWTTimerQueueRestart
Runnable that will message the shared instance of the Timer Queue to restart. |
Constructor Summary | |
---|---|
SWTTimerQueue(org.eclipse.swt.widgets.Display display)
Creates a timer queue that will be attached the the provided display. |
Method Summary | |
---|---|
(package private) void |
addTimer(SWTTimer timer,
long expirationTime)
Adds the provided timer to the queue of scheduled timers. |
(package private) boolean |
containsTimer(SWTTimer timer)
Returns true if this timer queue contains the given timer. |
(package private) void |
removeTimer(SWTTimer timer)
Removes the provided timer from the Timer Queue. |
void |
run()
Dispatches work to timers until the queue is told to stop running. |
static SWTTimerQueue |
sharedInstance(org.eclipse.swt.widgets.Display display)
Returns the singleton instance of the SWTTimerQueue. |
(package private) void |
start()
Starts the timer queue. |
(package private) void |
stop()
Stops the TimerQueue Thread. |
java.lang.String |
toString()
Generates a string handy for debugging the contents of the timer queue. |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
Constructor Detail |
---|
public SWTTimerQueue(org.eclipse.swt.widgets.Display display)
display
- the display that will get updated by this queue's timers.Method Detail |
---|
public static SWTTimerQueue sharedInstance(org.eclipse.swt.widgets.Display display)
display
- display to associate with this Timer Queue's Activities
void start()
void stop()
void addTimer(SWTTimer timer, long expirationTime)
timer
- timer to addexpirationTime
- time at which the timer is to be stopped and
removed from the queue. Given in unix time.void removeTimer(SWTTimer timer)
timer
- timer to remove from the queueboolean containsTimer(SWTTimer timer)
timer
- timer being checked
public void run()
run
in interface java.lang.Runnable
public java.lang.String toString()
toString
in class java.lang.Object
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |