Instances of this class represent the "windows"
which the desktop or "window manager" is managing.
Instances that do not have a parent (that is, they
are built using the constructor, which takes a
Display as the argument) are described
as top level shells. Instances that do have
a parent are described as secondary or
dialog shells.
Instances are always displayed in one of the maximized,
minimized or normal states:
When an instance is marked as maximized, the
window manager will typically resize it to fill the
entire visible area of the display, and the instance
is usually put in a state where it can not be resized
(even if it has style RESIZE) until it is
no longer maximized.
When an instance is in the normal state (neither
maximized or minimized), its appearance is controlled by
the style constants which were specified when it was created
and the restrictions of the window manager (see below).
When an instance has been marked as minimized,
its contents (client area) will usually not be visible,
and depending on the window manager, it may be
"iconified" (that is, replaced on the desktop by a small
simplified representation of itself), relocated to a
distinguished area of the screen, or hidden. Combinations
of these changes are also possible.
The modality of an instance may be specified using
style bits. The modality style bits are used to determine
whether input is blocked for other shells on the display.
The PRIMARY_MODAL style allows an instance to block
input to its parent. The APPLICATION_MODAL style
allows an instance to block input to every other shell in the
display. The SYSTEM_MODAL style allows an instance
to block input to all shells, including shells belonging to
different applications.
Note: The styles supported by this class are treated
as HINTs, since the window manager for the
desktop on which the instance is visible has ultimate
control over the appearance and behavior of decorations
and modality. For example, some window managers only
support resizable windows and will always assume the
RESIZE style, even if it is not set. In addition, if a
modality style is not supported, it is "upgraded" to a
more restrictive modality style that is supported. For
example, if PRIMARY_MODAL is not supported,
it would be upgraded to APPLICATION_MODAL.
A modality style may also be "downgraded" to a less
restrictive style. For example, most operating systems
no longer support SYSTEM_MODAL because
it can freeze up the desktop, so this is typically
downgraded to APPLICATION_MODAL.
Class SWT provides two "convenience constants"
for the most commonly required style combinations:
SHELL_TRIM
the result of combining the constants which are required
to produce a typical application top level shell: (that
is, CLOSE | TITLE | MIN | MAX | RESIZE)
DIALOG_TRIM
the result of combining the constants which are required
to produce a typical application dialog shell: (that
is, TITLE | CLOSE | BORDER)
Note: Only one of the styles APPLICATION_MODAL, MODELESS,
PRIMARY_MODAL and SYSTEM_MODAL may be specified.
IMPORTANT: This class is not intended to be subclassed.
Displayas the argument) are described as top level shells. Instances that do have a parent are described as secondary or dialog shells.Instances are always displayed in one of the maximized, minimized or normal states:
RESIZE) until it is no longer maximized.The modality of an instance may be specified using style bits. The modality style bits are used to determine whether input is blocked for other shells on the display. The
PRIMARY_MODALstyle allows an instance to block input to its parent. TheAPPLICATION_MODALstyle allows an instance to block input to every other shell in the display. TheSYSTEM_MODALstyle allows an instance to block input to all shells, including shells belonging to different applications.Note: The styles supported by this class are treated as HINTs, since the window manager for the desktop on which the instance is visible has ultimate control over the appearance and behavior of decorations and modality. For example, some window managers only support resizable windows and will always assume the RESIZE style, even if it is not set. In addition, if a modality style is not supported, it is "upgraded" to a more restrictive modality style that is supported. For example, if
PRIMARY_MODALis not supported, it would be upgraded toAPPLICATION_MODAL. A modality style may also be "downgraded" to a less restrictive style. For example, most operating systems no longer supportSYSTEM_MODALbecause it can freeze up the desktop, so this is typically downgraded toAPPLICATION_MODAL.- Styles:
- BORDER, CLOSE, MIN, MAX, NO_TRIM, RESIZE, TITLE, ON_TOP, TOOL
- APPLICATION_MODAL, MODELESS, PRIMARY_MODAL, SYSTEM_MODAL
- Events:
- Activate, Close, Deactivate, Deiconify, Iconify
ClassSWTprovides two "convenience constants" for the most commonly required style combinations:SHELL_TRIMCLOSE | TITLE | MIN | MAX | RESIZE)DIALOG_TRIMTITLE | CLOSE | BORDER)Note: Only one of the styles APPLICATION_MODAL, MODELESS, PRIMARY_MODAL and SYSTEM_MODAL may be specified.
IMPORTANT: This class is not intended to be subclassed.