|
|||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||||
java.lang.Object
|
+--org.eclipse.swt.graphics.Device
|
+--org.eclipse.swt.widgets.Display
| Constructor Summary | |
Display()
|
|
| Method Summary | |
void |
addListener(int eventType,
Listener listener)
Add a new listener to the list of registered listeners of the Display object which listens to the specified event type. |
void |
dispose()
Disposes operating system resources associated with the receiver. |
Rectangle |
getBounds()
Returns a rectangle describing the receiver's size and location. |
Rectangle |
getClientArea()
Returns the dimension of the Displays client area. |
static Display |
getDefault()
Returns the default Display. |
Color |
getSystemColor(int id)
Returns a matching color for the given system color. |
boolean |
readAndDispatch()
Reads an event from the operating system's event queue, dispatches it appropriately, and returns true if there is potentially more work to do, or false if the caller can sleep until another event is placed on the event queue. |
boolean |
sleep()
Causes the user interface thread to sleep (that is, to be put in a state where it does not consume CPU cycles) until an event is received or it is otherwise awakened. |
void |
timerExec(int millis,
Runnable runnable)
Causes the run() method of the specified Runnable to be
invoked by the user interface (UI) thread after the specified number
of milliseconds have elapsed.
|
| Methods inherited from class org.eclipse.swt.graphics.Device |
isDisposed |
| Methods inherited from class java.lang.Object |
equals, getClass, hashCode, toString |
| Constructor Detail |
public Display()
| Method Detail |
public void addListener(int eventType,
Listener listener)
eventType - the type of the event to be listened forlistener - the Listener to be invoked when the event occurspublic void dispose()
dispose in class Devicepublic Rectangle getBounds()
SWTException - public Rectangle getClientArea()
public static Display getDefault()
public Color getSystemColor(int id)
SWT.
Any value other than one of the SWT color constants will
result in the color black.
id - the color constant
SWTpublic boolean readAndDispatch()
public boolean sleep()
public void timerExec(int millis,
Runnable runnable)
run() method of the specified Runnable to be
invoked by the user interface (UI) thread after the specified number
of milliseconds have elapsed.
If milliseconds is less than zero, the Runnable is not executed.
millis - the delay before the Runnable is startedrunnable - object to be invoked
IllegalArgumentException - SWTException -
|
|||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||||