Window Class

Simple window control that can be used to create dialogs, alert, messages, etc. Window consists of a header, body, footer, and mask. All elements are optional.

Constructors

Window( parent, config )
Used to instantiate this class
parentDOM element in which to render this component
configConfiguration settings (optional). See config options for more information.

Config Options

resizable
closable
shrinkToFit
style
Style for individual elements within the component. Note that you can provide CSS class names instead of individual style definitions.
renderers

Events

onHeaderClick( )
Override to capture this header click events.
onResize( )
Override to capture resize events.
onOpen( )
Called whenever the window is opened or made visible.
onClose( )
Called whenever the window is closed or hidden from view.

Public Methods

destroy( )
Used to destroy the window and remove it from the DOM
getTitle( )
Returns the content of the window's header/title area
setTitle( obj )
Used to update the content of the window's header/title area
getBody( )
Returns the window's body (main content panel) as a DOM element
setContent( obj )
getFooter( )
setFooter( obj )
open( animation )
showAt( x, y )
Used to make the window visible at a given location on the screen.
close( silent )
isOpen( )
Returns true if the window is open.
getWidth( )
Returns the current width of the window in pixels (number)
setWidth( width )
Used to set the width of the window
widthAccepts numbers or strings with valid CSS values ("1px, "1%")
getHeight( )
Returns the current height of the window in pixels (number)
setHeight( height )
Used to set the height of the window
heightAccepts numbers or strings with valid CSS values ("1px, "1%")
update( )
Used to update the size of the window. Called internally whenever the window is resized to insure that the window contents fit inside the window. If you are updating DOM elements within the window dynamically, you may need to call this method.
center( )
Moves the window to the center of the screen.