Zimlet JavaScript API Reference - DwtShell

Class DwtShell


Extends DwtComposite.

This class represents a shell, the first widget that must be instantiated in a Dwt based application. By default the shell covers the whole browser window, though it may also be instantiated within an HTML element.

DwtShell should NOT be subclassed.



Defined in: DwtShell.js.

Class Summary
Constructor Attributes Constructor Name and Description
 
DwtShell(params)
Creates a shell.
Method Summary
Method Attributes Method Name and Description
 
addBlurListener(listener)
Adds a blur listener.
 
addFocusListener(listener)
Adds a focus listener.
 
Adds a global selection listener.
<static>  
DwtShell.getShell(win)
Gets the shell managing the browser window (if any).
 
Gets the tool tip.
 
Relayout user skin elements.
 
Removes a global selection listener.
 
setBusy(busy, id, showBusyDialog, busyDialogDelay, cancelBusyCallback)
Sets the busy overlay.
 
Sets the text for the shell busy dialog
 
Sets the shell busy dialog title.
Methods borrowed from class DwtComposite:
addChild, cleanupSeparators, clear, dispose, getChild, getChildren, getNumChildren, getTabGroupMember, removeChild, removeChildren
Methods borrowed from class DwtControl:
addClassName, addControlListener, addDisposeListener, addListener, appendElement, blur, clearContent, clearHandler, condClassName, delClassName, focus, getBounds, getClassName, getContent, getCursor, getData, getDragBox, getDragSource, getDropTarget, getEnabled, getFocusElement, getH, getHtmlElement, getHTMLElId, getInsetBounds, getInsets, getLocation, getMargins, getOpacity, getOuterSize, getPosition, getScrollContainer, getScrollStyle, getSize, getTooltipBase, getToolTipContent, getVisibility, getVisible, getW, getX, getXW, getY, getYH, getZIndex, hasFocus, isAlertShown, isDisposed, isInitialized, isListenerRegistered, notifyListeners, preventContextMenu, preventSelection, removeAllListeners, removeControlListener, removeDisposeListener, removeListener, reparent, reparentHtmlElement, replaceElement, setBounds, setClassName, setContent, setCursor, setData, setDisplay, setDisplayState, setDragBox, setDragSource, setDropTarget, setEnabled, setEventPropagation, setFocusElement, setHandler, setHtmlElementId, setLocation, setOpacity, setPosition, setScrollStyle, setSize, setToolTipContent, setVisibility, setVisible, setZIndex, showAlert, zShow
Class Detail
DwtShell(params)
Creates a shell.
Author: Ross Dargahi.
Parameters:
{hash} params
a hash of parameters
{string} params.className
the CSS class name
{boolean} params.docBodyScrollable
if true, then the document body is set to be scrollable
{Element} params.userShell
an HTML element that will be reparented into an absolutely postioned container in this shell. This is useful in the situation where you have an HTML template and want to use this in context of Dwt.
{Boolean} params.useCurtain
if true, a curtain overlay is created to be used between hidden and viewable elements using z-index (see Dwt) for various layering constants)
Method Detail
addBlurListener(listener)
Adds a blur listener.
Parameters:
{AjxListener} listener
the listener

addFocusListener(listener)
Adds a focus listener.
Parameters:
{AjxListener} listener
the listener

addGlobalSelectionListener(listener)
Adds a global selection listener.
Parameters:
{AjxListener} listener
the listener

<static> {DwtShell} DwtShell.getShell(win)
Gets the shell managing the browser window (if any).
Parameters:
{Window} win
the global context
Returns:
{DwtShell} the shell or null

{string} getToolTip()
Gets the tool tip.
Returns:
{string} the tool tip

relayout()
Relayout user skin elements. Called whenever hiding or showing a part of the user skin, or when resizing the window. The layout works on elements of class "skin_layout_filler" -- which must also be of either class "skin_layout_row" or "skin_layout_cell". It finds the size of our parent, subtract the sizes all sibling rows or cells (excluding other fillers) and divide the remaining size between this filler and any sibling fillers.

removeGlobalSelectionListener(listener)
Removes a global selection listener.
Parameters:
{AjxListener} listener
the listener

setBusy(busy, id, showBusyDialog, busyDialogDelay, cancelBusyCallback)
Sets the busy overlay. The busy overlay disables input to the application and makes the cursor a wait cursor. Optionally a work in progress (WIP) dialog may be requested. Since multiple calls to this method may be interleaved, it accepts a unique ID to keep them separate. We also maintain a count of outstanding calls to setBusy(true). When that count changes between 0 and 1, the busy overlay is applied or removed.
Parameters:
{boolean} busy
if true, set the busy overlay, otherwise hide the busy overlay
{number} id
a unique ID for this instance
{boolean} showBusyDialog
if true, show the WIP dialog
{number} busyDialogDelay
the number of ms to delay before popping up the WIP dialog
{AjxCallback} cancelBusyCallback
the callback to run when OK button is pressed in WIP dialog

setBusyDialogText(text)
Sets the text for the shell busy dialog
Parameters:
{string} text
the text to set (may be HTML)

setBusyDialogTitle(title)
Sets the shell busy dialog title.
Parameters:
{string} title
the title text

Documentation generated by JsDoc Toolkit 2.3.0 on Tue Jun 28 2016 21:01:29 GMT-0400 (EDT)