Modifier and Type | Class and Description |
---|---|
protected static class |
SWTTimerQueue.SWTTimerQueueRestart
Runnable that will message the shared instance of the Timer Queue to
restart.
|
Constructor and Description |
---|
SWTTimerQueue(org.eclipse.swt.widgets.Display display)
Creates a timer queue that will be attached the the provided display.
|
Modifier and Type | Method and Description |
---|---|
(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.
|
String |
toString()
Generates a string handy for debugging the contents of the timer queue.
|
public SWTTimerQueue(org.eclipse.swt.widgets.Display display)
display
- the display that will get updated by this queue's timers.public static SWTTimerQueue sharedInstance(org.eclipse.swt.widgets.Display display)
display
- display to associate with this Timer Queue's Activitiesvoid 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 checkedpublic void run()
Copyright © 1995-2012 Piccolo2D. All Rights Reserved.