public class Shell extends Component implements HasText(Code)
A Shell is a window with a header and content area. If the
shell locations is not set either by calling
Shell.setPagePosition or
#setBounds it will be centered when opened.
Shells must have a pixel width. If a width is not set the default width will
be used. Default width is 250. If a height is not specified it will be
determined by the size of the content.
Styles:
CLOSE, RESIZE, MODAL, AUTO_HIDE
Events:
Activate : (widget)
Fires after a shell is activated (receives focus).
widget : this
Deactivate : (widget)
Fires after a shell is deactivated.
widget : this
BeforeClose : (widget)
Fires before a shell is closed. Listeners can set the doit
field to false to cancel the operation.
widget : this
Close : (widget)
Fires after a shell is closed.
widget : this
BeforeShow : (widget)
Fires before the shell is opened. Listeners can set the
doit field to false to cancel the operation.
Sets the auto hide state. Has no effect if called after the
Parameters: autoHide - true to auto hide
setBlinkModal
public void setBlinkModal(boolean blinkModal)(Code)
Specifies if the shell should blink when clicks occur outside it's
boundaries. When true, close() should not be called within
any button listeners. Default value is true.
Parameters: blinkModal - true to enable blinking
Sets the shell's header icon.
Parameters: style - the icon style
setKeepLastBounds
public void setKeepLastBounds(boolean keepLastBounds)(Code)
Specifies if the shell should be returned to the same size and location
when it was last closed. Default value is true.
Parameters: keepLastBounds - true to enable
setMinimumHeight
public void setMinimumHeight(int minimumHeight)(Code)
Specifies the minimum height. Default value is 100;
Parameters: minimumHeight - the minimum height
setMinimumSize
public void setMinimumSize(int width, int height)(Code)
Sets the shell's minimum size to the size specified by the arguments.
Parameters: width - the minimum width Parameters: height - the minimum height
setMinimumWidth
public void setMinimumWidth(int minimumWidth)(Code)
Specifies the minimum width. Default value is 200.
Parameters: minimumWidth - the minium width
Sets the shell's location based on page coordinates.
Parameters: x - the x coordinate Parameters: y - the y coordinate
setResizeEnabled
public void setResizeEnabled(boolean enabled)(Code)
Enables and disables shell resizing. Only applies to shell's with a RESIZE
style. Does nothing if called before shell is rendered.
Parameters: enabled - the resize enabled state
setShadowPosition
public void setShadowPosition(int shadowPosition)(Code)
Specifies the shadow position. Valid values are NONE, DROP, SIDES, FRAME.
Default values is SIDES.
Parameters: shadowPosition - the shadow position