Zimlet JavaScript API Reference - DwtDialog

Class DwtDialog


Extends DwtBaseDialog.

This class represents a popup dialog with a title and standard buttons. A client or subclass sets the dialog content. Dialogs always hang-off the main shell since their stacking order is managed through z-index.

Defined in: DwtDialog.js.

Class Summary
Constructor Attributes Constructor Name and Description
 
DwtDialog(params)
Field Summary
Field Attributes Field Name and Description
<static>  
DwtDialog.ALIGN_CENTER
Defines the "center" align.
<static>  
DwtDialog.ALIGN_LEFT
Defines the "left" align.
<static>  
DwtDialog.ALIGN_RIGHT
Defines the "right" align.
<static>  
DwtDialog.ALL_BUTTONS
Defines "all" buttons.
<static>  
DwtDialog.CANCEL_BUTTON
Defines the "Cancel" button.
<static>  
DwtDialog.DISMISS_BUTTON
Defines the "Dismiss" button.
<static>  
DwtDialog.MODAL
Defines a "modal" dialog.
<static>  
DwtDialog.MODELESS
Defines a "modeless" dialog.
<static>  
DwtDialog.NO_BUTTON
Defines the "No" button.
<static>  
DwtDialog.NO_BUTTONS
Defines "no" buttons.
<static>  
DwtDialog.OK_BUTTON
Defines the "OK" button.
<static>  
DwtDialog.YES_BUTTON
Defines the "Yes" button.
Method Summary
Method Attributes Method Name and Description
 
Associates the "enter" key with a given button.
 
getButton(buttonId)
Gets a button by the specified Id.
 
getButtonEnabled(buttonId)
Gets the button enabled state.
 
popup(loc, focusButtonId)
This method will pop-up the dialog.
 
registerCallback(buttonId, func, obj, args)
Registers a callback for a given button.
 
Sets all buttons back to inactive state.
 
setButtonEnabled(buttonId, enabled)
Sets the button enabled state.
 
setButtonListener(buttonId, listener)
Sets the given listener as the only listener for the given button.
 
setButtonVisible(buttonId, enabled)
Sets the button visible state.
 
setEnterListener(listener)
Sets the enter key listener.
 
Unregisters a callback for a given button.
Methods borrowed from class DwtBaseDialog:
addEnterListener, addPopdownListener, addPopupListener, cleanup, isPoppedUp, popdown, removePopdownListener, removePopupListener, reset, setContent, setTitle, setView
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
DwtDialog(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 of dialog
{array|constant} params.standardButtons
an array of standard buttons to include. Defaults to DwtDialog.OK_BUTTON and DwtDialog.CANCEL_BUTTON.
{array} params.extraButtons
a list of DwtDialog_ButtonDescriptor objects describing custom buttons to add to the dialog
{number} params.zIndex
the z-index to set for this dialog when it is visible. Defaults to Dwt.Z_DIALOG.
{DwtDialog.MODELESS|DwtDialog.MODAL} params.mode
the modality of the dialog. Defaults to DwtDialog.MODAL.
{boolean} params.disposeOnPopDown
destroy the content of dialog on popdown, Defaults to false
{DwtPoint} params.loc
the location at which to popup the dialog. Defaults to centered within its parent.
See:
DwtDialog.CANCEL_BUTTON
DwtDialog.OK_BUTTON
DwtDialog.DISMISS_BUTTON
DwtDialog.NO_BUTTON
DwtDialog.YES_BUTTON
DwtDialog.ALL_BUTTONS
DwtDialog.NO_BUTTONS
Field Detail
<static> DwtDialog.ALIGN_CENTER
Defines the "center" align.

<static> DwtDialog.ALIGN_LEFT
Defines the "left" align.

<static> DwtDialog.ALIGN_RIGHT
Defines the "right" align.

<static> DwtDialog.ALL_BUTTONS
Defines "all" buttons. This constant is used to show all buttons.

<static> DwtDialog.CANCEL_BUTTON
Defines the "Cancel" button.

<static> DwtDialog.DISMISS_BUTTON
Defines the "Dismiss" button.

<static> DwtDialog.MODAL
Defines a "modal" dialog.
See:
DwtBaseDialog.MODAL

<static> DwtDialog.MODELESS
Defines a "modeless" dialog.
See:
DwtBaseDialog.MODELESS

<static> DwtDialog.NO_BUTTON
Defines the "No" button.

<static> DwtDialog.NO_BUTTONS
Defines "no" buttons. This constant is used to show no buttons.

<static> DwtDialog.OK_BUTTON
Defines the "OK" button.

<static> DwtDialog.YES_BUTTON
Defines the "Yes" button.
Method Detail
associateEnterWithButton(buttonId)
Associates the "enter" key with a given button.
Parameters:
{constant} buttonId
one of the standard dialog buttons

{DwtButton} getButton(buttonId)
Gets a button by the specified Id.
Parameters:
{constant} buttonId
the button Id
Returns:
{DwtButton} the button or null if not found

{boolean} getButtonEnabled(buttonId)
Gets the button enabled state.
Parameters:
{constant} buttonId
the button Id
Returns:
{boolean} true if the button is enabled; false otherwise

popup(loc, focusButtonId)
This method will pop-up the dialog.
Parameters:
{DwtPoint} loc
the location
{constant} focusButtonId
the button Id

registerCallback(buttonId, func, obj, args)
Registers a callback for a given button. Can be passed an AjxCallback, the params needed to create one, or as a bound function.
Parameters:
{constant} buttonId
one of the standard dialog buttons
{AjxCallback} func
the callback method
{Object} obj
the callback object
{array} args
the callback args

resetButtonStates()
Sets all buttons back to inactive state.

setButtonEnabled(buttonId, enabled)
Sets the button enabled state.
Parameters:
{constant} buttonId
the button Id
{boolean} enabled
if true, enable the button; false otherwise

setButtonListener(buttonId, listener)
Sets the given listener as the only listener for the given button.
Parameters:
{constant} buttonId
one of the standard dialog buttons
{AjxListener} listener
a listener

setButtonVisible(buttonId, enabled)
Sets the button visible state.
Parameters:
{constant} buttonId
the button Id
{boolean} enabled
if true, make the button visible; false otherwise

setEnterListener(listener)
Sets the enter key listener.
Parameters:
{AjxListener} listener
a listener

unregisterCallback(buttonId)
Unregisters a callback for a given button.
Parameters:
{constant} buttonId
one of the standard dialog buttons

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