Java org.eclipse.swt.widgets Display fields, constructors, methods, implement or subclass

Example usage for Java org.eclipse.swt.widgets Display fields, constructors, methods, implement or subclass

Introduction

In this page you can find the methods, fields and constructors for org.eclipse.swt.widgets Display.

The text is from its open source code.

Constructor

Display()
Constructs a new instance of this class.

Method

voidaddFilter(int eventType, Listener listener)
Adds the listener to the collection of listeners who will be notified when an event of the given type occurs anywhere in a widget.
voidaddListener(int eventType, Listener listener)
Adds the listener to the collection of listeners who will be notified when an event of the given type occurs.
voidasyncExec(Runnable runnable)
Causes the run() method of the runnable to be invoked by the user-interface thread at the next reasonable opportunity.
voiddispose()
voiddisposeExec(Runnable runnable)
Causes the run() method of the runnable to be invoked by the user-interface thread just before the receiver is disposed.
ShellgetActiveShell()
Returns the currently active Shell, or null if no shell belonging to the currently running application is active.
RectanglegetBounds()
Returns a rectangle describing the receiver's size and location.
RectanglegetClientArea()
DisplaygetCurrent()
Returns the display which the currently running thread is the user-interface thread for, or null if the currently running thread is not a user-interface thread for any display.
PointgetCursorLocation()
Returns the location of the on-screen pointer relative to the top left corner of the screen.
ObjectgetData(String key)
Returns the application defined property of the receiver with the specified name, or null if it has not been set.
DisplaygetDefault()
Returns the default display.
PointgetDPI()
ControlgetFocusControl()
Returns the control which currently has keyboard focus, or null if keyboard events are not currently going to any of the controls built by the currently running application.
MenugetMenuBar()
Returns the single instance of the application menu bar or null when there is no application menu bar for the platform.
Monitor[]getMonitors()
Returns an array of monitors attached to the device.
MonitorgetPrimaryMonitor()
Returns the primary monitor for that device.
Shell[]getShells()
Returns a (possibly empty) array containing all shells which have not been disposed and have the receiver as their display.
ColorgetSystemColor(int id)
CursorgetSystemCursor(int id)
Returns the matching standard platform cursor for the given constant, which should be one of the cursor constants specified in class SWT.
ImagegetSystemImage(int id)
Returns the matching standard platform image for the given constant, which should be one of the icon constants specified in class SWT.
MenugetSystemMenu()
Returns the single instance of the system-provided menu for the application.
TraygetSystemTray()
Returns the single instance of the system tray or null when there is no system tray available for the platform.
booleanisDisposed()
Pointmap(Control from, Control to, Point point)
Maps a point from one coordinate system to another.
Rectanglemap(Control from, Control to, Rectangle rectangle)
Maps a point from one coordinate system to another.
Pointmap(Control from, Control to, int x, int y)
Maps a point from one coordinate system to another.
booleanreadAndDispatch()
Reads an event from the 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.
voidsetAppName(String name)
Sets the application name to the argument.
voidsetData(String key, Object value)
Sets the application defined property of the receiver with the specified name to the given argument.
booleansleep()
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.
voidsyncExec(Runnable runnable)
Causes the run() method of the runnable to be invoked by the user-interface thread at the next reasonable opportunity.
voidtimerExec(int milliseconds, Runnable runnable)
Causes the run() method of the runnable to be invoked by the user-interface thread after the specified number of milliseconds have elapsed.
voidupdate()
Forces all outstanding paint requests for the display to be processed before this method returns.
voidwake()
Notifies the client to send a request in order to wake up a sleeping UI thread and to perform pending UI updates.