Zimlet JavaScript API Reference - DwtBaseDialog

Class DwtBaseDialog


Extends DwtComposite.

This is a base class for dialogs. Given content, this class will take care of showing and hiding the dialog, as well as dragging it.

Dialogs always hang off the main shell since their stacking order is managed through z-index.

Defined in: DwtBaseDialog.js.

Class Summary
Constructor Attributes Constructor Name and Description
 
DwtBaseDialog(params)
Field Summary
Field Attributes Field Name and Description
<static>  
DwtBaseDialog.MODAL
Defines a "modal" dialog.
<static>  
DwtBaseDialog.MODELESS
Defines a "modeless" dialog.
Method Summary
Method Attributes Method Name and Description
 
addEnterListener(listener)
Adds an enter listener.
 
Adds a popdown listener.
 
addPopupListener(listener)
Adds a popup listener.
 
cleanup(bPoppedUp)
Cleans up the dialog so it can be used again later.
<static>  
DwtBaseDialog.getActiveDialog()
Gets the active dialog.
 
Checks if the dialog is popped-up.
 
Pops-down and hides the dialog.
 
popup(loc)
Pops-up the dialog, makes the dialog visible in places.
 
Removes a popdown listener.
 
Removes a popup listener.
 
Resets the dialog back to its original state.
 
setContent(text)
Sets the dialog content (below the title, above the buttons).
 
setTitle(title)
Sets the title.
 
setView(newView)
Sets the content of the dialog to a new view.
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, 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
DwtBaseDialog(params)

Author: Ross Dargahi, Conrad Damon.
Parameters:
{hash} params
a hash of parameters
{DwtComposite} params.parent
the parent widget (the shell)
{string} params.className
the CSS class
{string} params.title
the title
{number} params.zIndex Optional, Default: Dwt.Z_DIALOG
the z-index to set for this dialog when it is visible
{DwtBaseDialog.MODAL|DwtBaseDialog.MODELESS} params.mode Optional, Default: DwtBaseDialog.MODAL
the modality of the dialog
{DwtPoint} params.loc
the location at which to popup the dialog. Defaults to being centered within its parent
{boolean} params.disposeOnPopDown
destroy the content of dialog on popdown, Defaults to false
{DwtControl} params.view
the the control whose element is to be re-parented
{string} params.dragHandleId
the the ID of element used as drag handle
Field Detail
<static> DwtBaseDialog.MODAL
Defines a "modal" dialog.

<static> DwtBaseDialog.MODELESS
Defines a "modeless" dialog.
Method Detail
addEnterListener(listener)
Adds an enter listener.
Parameters:
{AjxListener} listener
the listener to add

addPopdownListener(listener)
Adds a popdown listener.
Parameters:
{AjxListener} listener
the listener to add

addPopupListener(listener)
Adds a popup listener.
Parameters:
{AjxListener} listener
the listener to add

cleanup(bPoppedUp)
Cleans up the dialog so it can be used again later.
Parameters:
{boolean} bPoppedUp
if true, the dialog is popped-up; false otherwise

<static> {DwtBaseDialog} DwtBaseDialog.getActiveDialog()
Gets the active dialog.
Returns:
{DwtBaseDialog} the active dialog

{boolean} isPoppedUp()
Checks if the dialog is popped-up.
Returns:
{boolean} true if the dialog is popped-up; false otherwise

popdown()
Pops-down and hides the dialog.

popup(loc)
Pops-up the dialog, makes the dialog visible in places. Everything under the dialog will become veiled if we are modal. Note: popping up a dialog will block keyboard actions from being delivered to the global key action handler (if one is registered).
Parameters:
{DwtPoint} loc
the desired location

removePopdownListener(listener)
Removes a popdown listener.
Parameters:
{AjxListener} listener
the listener to remove

removePopupListener(listener)
Removes a popup listener.
Parameters:
{AjxListener} listener
the listener to remove

reset()
Resets the dialog back to its original state. Subclasses should override this method to add any additional behavior, but should still call up into this method.

setContent(text)
Sets the dialog content (below the title, above the buttons).
Parameters:
{string} text
the dialog content

setTitle(title)
Sets the title.
Parameters:
{string} title
the title

setView(newView)
Sets the content of the dialog to a new view. Essentially re-parents the supplied control's HTML element to the dialogs HTML element
Parameters:
{DwtControl} newView
the control whose element is to be re-parented

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