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:
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_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_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 Note
This class is not intended to be subclassed.
Decorations, SWT, Shell snippets, SWT Example: ControlExample, Sample code and further information
| Modifier and Type | Field and Description |
|---|---|
| pack-priv static final int | |
| pack-priv boolean | |
| pack-priv boolean | |
| pack-priv GeometryInterface | |
| pack-priv boolean | |
| pack-priv long | |
| pack-priv boolean | |
| pack-priv boolean | |
| pack-priv boolean | |
| pack-priv Control | |
| pack-priv boolean | |
| pack-priv static final int | |
| pack-priv long | |
| pack-priv boolean | |
| pack-priv boolean | |
| pack-priv int | |
| pack-priv int | |
| pack-priv int | |
| pack-priv int | |
| pack-priv boolean | |
| pack-priv Region | |
| pack-priv boolean | |
| pack-priv static final double | |
| pack-priv long | |
| pack-priv boolean | |
| pack-priv ToolTip[] | |
| pack-priv long | |
| pack-priv long |
| Access | Constructor and Description |
|---|---|
| public | |
| public | Shell(int
the style of control to construct style)Constructs a new instance of this class given only the style value describing its behavior and appearance. |
| public | |
| public | |
| pack-priv | |
| public | |
| public |
| Modifier and Type | Method and Description |
|---|---|
| pack-priv Shell | |
| public void | addShellListener(ShellListener
the listener which should be notified listener)Adds the listener to the collection of listeners who will
be notified when operations are performed on the receiver,
by sending the listener one of the messages defined in the
|
| pack-priv void | |
| pack-priv void | |
| pack-priv void | |
| pack-priv void | |
| pack-priv void | checkAndUngrabFocus()
SWT.ON_TOP shells on Wayland requires gdk_seat_grab to grab keyboard/input focus, the grabbed focus need to be removed when Shell is disposed/hidden. |
| pack-priv void | |
| pack-priv void | |
| pack-priv static int | |
| public void | 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. |
| pack-priv void | |
| pack-priv Rectangle | computeTrimInPixels(int x, int y, int width, int height)
Overrides org. |
| pack-priv void | |
| pack-priv void | |
| public void | dispose()
Overrides org. |
| pack-priv long | filterProc(long xEvent, long gdkEvent, long data2)
Overrides org. |
| pack-priv Control | |
| pack-priv Composite | |
| pack-priv void | |
| pack-priv void | |
| pack-priv void | |
| public void | forceActive()
If the receiver is visible, moves it to the top of the drawing order 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 forces the window manager to make the shell active. |
| pack-priv void | |
| pack-priv void | |
| pack-priv static void | |
| public int | |
| pack-priv Rectangle | |
| public boolean | Returns: the fullscreen stateReturns |
| public int | |
| pack-priv Point | |
| public boolean | getMaximized()
Overrides org. true if the receiver is currently
maximized, and false otherwise.
|
| public Point | |
| pack-priv Point | |
| public Point | |
| pack-priv Point | |
| pack-priv Shell | |
| public boolean | Returns: true if the receiver is marked as modified, or false otherwiseGets the receiver's modified state. |
| public Region | Returns: the region that defines the shape of the shell, ornullOverrides org. null if the shell has the default shape.
|
| pack-priv int | |
| public Shell[] | Returns: the dialog shellsReturns an array containing all shells which are descendants of the receiver. |
| pack-priv Point | |
| pack-priv Point | getSurfaceOrigin()
Gets the position of the top left corner of the control in root window (display) coordinates.
|
| public ToolBar | Returns: a ToolBar object representing the Shell's tool bar, ornull.Returns a ToolBar object representing the tool bar that can be shown in the receiver's trim. |
| public boolean | getVisible()
Overrides org. true if the receiver is visible, and
false otherwise.
|
| pack-priv Point | getWindowOrigin()
Gets the position of the top left corner of the control in root window (display) coordinates.
|
| pack-priv long | gtk_button_press_event(long widget, long event)
Overrides org. |
| pack-priv long | |
| pack-priv long | gtk_configure_event(long widget, long event)
Overrides org. |
| pack-priv long | |
| pack-priv long | |
| pack-priv long | gtk_enter_notify_event(long widget, long event)
Overrides org. |
| pack-priv long | |
| pack-priv long | gtk_focus_in_event(long widget, long event)
Overrides org. |
| pack-priv long | gtk_focus_out_event(long widget, long event)
Overrides org. |
| pack-priv long | gtk_key_press_event(long widget, long event)
Overrides org. |
| pack-priv long | gtk_leave_notify_event(long widget, long event)
Overrides org. |
| pack-priv long | |
| pack-priv long | gtk_motion_notify_event(long widget, long event)
Overrides org. |
| pack-priv long | gtk_move_focus(long widget, long directionType)
|
| public static Shell | |
| pack-priv long | |
| pack-priv long | gtk_size_allocate(long widget, long allocation)
|
| pack-priv long | gtk_window_state_event(long widget, long event)
Overrides org. |
| pack-priv boolean | |
| pack-priv void | |
| public static Shell | Returns: a new shell object containing the specified display and handlethe display for the shell display, long the handle for the shell handle)Invokes platform specific functionality to allocate a new shell that is not embedded. |
| pack-priv boolean | Returns: true if this Shell has both SWT.RESIZE and SWT.ON_TOP set without SWT.NO_TRIM, false otherwise.Determines whether a Shell has both SWT.RESIZE and SWT.ON_TOP set without SWT.NO_TRIM. |
| public boolean | isEnabled()
Overrides org. true if the receiver is enabled and all
ancestors up to and including the receiver's nearest ancestor
shell are enabled.
|
| pack-priv boolean | Returns: true if the parent of this Shell has style SWT.ON_TOP, false otherwise.Determines whether a Shell's parent is a popup window. |
| pack-priv boolean | |
| public boolean | isVisible()
Overrides org. true if the receiver is visible and all
ancestors up to and including the receiver's nearest ancestor
shell are visible.
|
| pack-priv static Region | |
| pack-priv long | |
| public void | open()
Moves the receiver to the top of the drawing order 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), marks it visible, sets the focus and asks the window manager to make the shell active. |
| pack-priv long | |
| public boolean | print(GC
the gc where the drawing occurs gc)Overrides org. |
| pack-priv void | |
| pack-priv void | |
| pack-priv void | |
| pack-priv void | |
| pack-priv void | |
| public void | removeShellListener(ShellListener
the listener which should no longer be notified listener)Removes the listener from the collection of listeners who will be notified when operations are performed on the receiver. |
| pack-priv void | |
| public void | requestLayout()
Requests that this control and all of its ancestors be repositioned by
their layouts at the earliest opportunity.
|
| pack-priv boolean | |
| pack-priv void | |
| pack-priv void | |
| public void | setActive()
If the receiver is visible, moves it to the top of the drawing order 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 |
| pack-priv void | |
| pack-priv void | |
| public void | setAlpha(int
the alpha value alpha)Sets the receiver's alpha value which must be between 0 (transparent) and 255 (opaque). |
| pack-priv int | setBounds(int x, int y, int width, int height, boolean move, boolean resize)
Overrides org. |
| pack-priv void | |
| public void | setEnabled(boolean
the new enabled state enabled)Overrides org. true,
and disables it otherwise.
|
| public void | setFullScreen(boolean
the new fullscreen state fullScreen)Sets the full screen state of the receiver. |
| public void | setImeInputMode(int
the new IME mode mode)Sets the input method editor mode to the argument which
should be the result of bitwise OR'ing together one or more
of the following constants defined in class |
| pack-priv void | |
| public void | setMaximized(boolean
the new maximized state maximized)
Sets the maximized state of the receiver.
|
| public void | setMaximumSize(int
the new maximum width for the receiver width, int the new maximum height for the receiver height)Sets the receiver's maximum size to the size specified by the arguments. |
| public void | setMaximumSize(Point
the new maximum size for the receiver size)Sets the receiver's maximum size to the size specified by the argument. |
| pack-priv void | |
| pack-priv void | |
| public void | setMenuBar(Menu
the new menu bar menu)
Sets the receiver's menu bar to the argument, which
may be null.
|
| public void | setMinimized(boolean
the new minimized state minimized)
Sets the minimized stated of the receiver.
|
| public void | setMinimumSize(int
the new minimum width for the receiver width, int the new minimum height for the receiver height)Sets the receiver's minimum size to the size specified by the arguments. |
| public void | setMinimumSize(Point
the new minimum size for the receiver size)Sets the receiver's minimum size to the size specified by the argument. |
| pack-priv void | |
| pack-priv void | |
| public void | setModified(boolean
the new modified state for the receiver modified)Sets the receiver's modified state as specified by the argument. |
| public void | setRegion(Region
the region that defines the shape of the shell (or null) region)Overrides org. |
| pack-priv void | |
| public void | setText(String
the new text string)Overrides org. |
| public void | setVisible(boolean
the new visibility state visible)Overrides org. true,
and marks it invisible otherwise.
|
| pack-priv void | setZOrder(Control sibling, boolean above, boolean fixRelations)
Overrides org. |
| pack-priv long | shellMapProc(long handle, long arg0, long user_data)
Overrides org. |
| pack-priv void | |
| pack-priv long | sizeAllocateProc(long handle, long arg0, long user_data)
|
| pack-priv long | sizeRequestProc(long handle, long arg0, long user_data)
|
| pack-priv long | |
| pack-priv boolean | |
| pack-priv int | |
| pack-priv int | |
| private void | |
| pack-priv void | |
| pack-priv void |