- Returns the currently active Shell, or null if in Java

Encoder Data Matrix in Java - Returns the currently active Shell, or null if
- Returns the currently active Shell, or null if
Printing Data Matrix In Java
Using Barcode printer for Java Control to generate, create ECC200 image in Java applications.
no shell belonging to the currently running application is active
Painting Barcode In Java
Using Barcode generator for Java Control to generate, create bar code image in Java applications.
getBounds()
Barcode Decoder In Java
Using Barcode decoder for Java Control to read, scan read, scan image in Java applications.
- Returns a rectangle describing the receiver's size
ECC200 Generator In Visual C#.NET
Using Barcode creation for VS .NET Control to generate, create Data Matrix image in Visual Studio .NET applications.
and location
Data Matrix Generation In .NET Framework
Using Barcode encoder for ASP.NET Control to generate, create Data Matrix image in ASP.NET applications.
SWT Widgets
Encoding Data Matrix In .NET
Using Barcode printer for .NET framework Control to generate, create Data Matrix ECC200 image in VS .NET applications.
getClientArea()
Data Matrix Drawer In VB.NET
Using Barcode creator for .NET framework Control to generate, create Data Matrix 2d barcode image in Visual Studio .NET applications.
- Returns a rectangle which describes the area
Print Barcode In Java
Using Barcode creation for Java Control to generate, create barcode image in Java applications.
of the receiver which is capable of displaying data
EAN / UCC - 13 Generator In Java
Using Barcode printer for Java Control to generate, create GTIN - 128 image in Java applications.
getCursorControl()
Printing Barcode In Java
Using Barcode creator for Java Control to generate, create bar code image in Java applications.
- Returns the control which the on-screen
Make Code128 In Java
Using Barcode creation for Java Control to generate, create Code 128B image in Java applications.
pointer is currently over top of, or null if it is not currently over one of the controls built by the currently running application
Printing Bar Code In Java
Using Barcode maker for Java Control to generate, create barcode image in Java applications.
getCursorLocation()
Generating UPC - E1 In Java
Using Barcode creation for Java Control to generate, create UPC-E Supplement 2 image in Java applications.
- Returns the location of the on-screen
Barcode Decoder In .NET Framework
Using Barcode decoder for .NET framework Control to read, scan read, scan image in .NET framework applications.
pointer relative to the top left corner of the screen
UPC Symbol Recognizer In VS .NET
Using Barcode recognizer for .NET framework Control to read, scan read, scan image in VS .NET applications.
getData(String)
Encode Bar Code In VS .NET
Using Barcode generator for ASP.NET Control to generate, create bar code image in ASP.NET applications.
- Returns the application defined property of
Data Matrix ECC200 Generation In Visual Basic .NET
Using Barcode printer for .NET framework Control to generate, create ECC200 image in .NET framework applications.
the receiver with the specified name, or null if it has not been set
Encoding Barcode In Visual Basic .NET
Using Barcode encoder for Visual Studio .NET Control to generate, create bar code image in VS .NET applications.
getDoubleClickTime()
Print Universal Product Code Version A In VS .NET
Using Barcode generation for ASP.NET Control to generate, create UPC-A Supplement 5 image in ASP.NET applications.
- Returns the longest duration, in milli-
Read UPC - 13 In VS .NET
Using Barcode scanner for VS .NET Control to read, scan read, scan image in VS .NET applications.
seconds, between two mouse button clicks that will be considered a double click by the underlying operating system
getFocusControl()
- Returns the control which currently has
keyboard focus, or null if keyboard events are not cur-
TT 4 The Simple Widget Toolkit
rently going to any of the controls built by the currently running application
getShells()
- Returns an array containing all shells which have
not been disposed and have the receiver as their display
getSystemColor(int)
- Returns the matching standard color for
the given constant, which should be one of the color constants specified in class SWT
getSystemFont()
- Returns a reasonable font for applications to
use
readAndDispatch()
- Reads an event from the operating sys-
tem'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
setCursorLocation(Point)
- Sets the location of the on-screen
pointer relative to the top left corner of the screen
setData(String, Object)
- Sets the application defined property
SWT Widgets
of the receiver with the specified name to the given argument
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
update()
- Forces all outstanding paint requests for the display
to be processed before this method returns
Shell
Each window has a shell, representing the window frame with which the user interacts The shell handles the familiar moving and sizing behavior common to all windows and acts as the parent for widgets displayed within its bounds (see Section 11110 finding a shell) Useful APIs include:
addShellListener(ShellListener)
- Adds the listener to the col-
lection of listeners who will be notified when operations are performed on the receiver, by sending the listener one
TT 4 The Simple Widget Toolkit
of the messages defined in the ShellListener interface
close()
- Requests that the window manager close the receiver
in the same way it would be closed when the user clicks on the "close box" or performs some other platform specific key or mouse combination that indicates the window should be removed
dispose()
- Disposes of the operating system resources associ-
ated with the receiver and all its descendents
getDisplay()
- Returns the display that the receiver was created
getShell()
- Returns the receiver's shell - Returns an array containing all shells which are
getShells()
descendents of the receiver
isEnabled()
- Returns true if the receiver is enabled and all of
the receiver's ancestors are enabled, and false otherwise
open()
- Moves the receiver to the top of the drawing order for
the display on which it was created (so that all other shells
SWT Widgets
on that display, which are not the receiver's children will be drawn behind it), marks it visible, and sets focus to its default button (if it has one) and asks the window manager to make the shell active
setActive()
- Moves the receiver to the top of the drawing or-
der for the display on which it was created (so that all other shells on that display, which are not the receiver's children will be drawn behind it) and asks the window manager to make the shell active
setEnabled(boolean enabled)
- Enables the receiver if the argu-
ment is true, and disables it otherwise
setVisible(boolean visible)
- Marks the receiver as visible if
the argument is true, and marks it invisible otherwise
TT 4 The Simple Widget Toolkit
426 Useful Widgets There are dozens of widgets defined within the SWT class hierarchy In this section, we will discuss the ones that are most commonly used in plug-in development such as labels, buttons, text fields, lists, tables, trees, containers and tab folders For each widget, we will provide a list of useful APIs and creation styles
4261 Label
Labels are static controls that display either strings or images as their contents They do not generate any special events and do not support any user interaction Useful APIs include:
setAlignment(int)
- Controls how text and images will be dis-
played in the receiver Valid arguments include SWTLEFT,
SWTRIGHT
and SWTCENTER - Sets the receiver's image to the argument,
setImage(Image)
which may be null indicating that no image should be dis-
SWT Widgets
played
setText(String)
- Sets the receiver's text
Useful creation styles include:
SWTSHADOW_IN
- Creates an inset shadow around the widget - Creates an outset shadow around the widget - Creates a widget with no shadow
SWTSHADOW_OUT
SWTSHADOW_NONE
SWTWRAP
- Causes the text of the widget to wrap onto multiple
lines, if necessary
SWTSEPARATOR
- Creates a single vertical or horizontal line - Creates a horizontal line
SWTHORIZONTAL
SWTVERTICAL
- Creates a vertical line
SWTLEFT
- Left-justifies the widget within its bounding box - Right-justifies the widget within its bounding box - Centers the widget within its bounding box
SWTRIGHT
SWTCENTER
TT 4 The Simple Widget Toolkit
Button
Buttons provide a mechanism to initiate an action when clicked They generate a Selection event when pressed and released Buttons can display either strings or images as their contents Depending upon their style settings, buttons can represent a number of common user interface element types such as push buttons, check boxes, radio buttons, toggle buttons and arrow buttons Useful APIs include:
addSelectionListener(SelectionListener)