OverviewSingleDeprecated

jsx3.gui

class Dialog

Object
->jsx3.lang.Object
  ->jsx3.app.Model
    ->jsx3.gui.Painted
      ->jsx3.gui.Block
        ->jsx3.gui.Dialog

All Implemented Interfaces:

jsx3.gui.Alerts, jsx3.gui.Interactive, jsx3.util.EventDispatcher

class Dialog
extends jsx3.gui.Block
Renders a dialog window. A dialog can contain other DOM objects; usually a dialog contains one child of type jsx3.gui.WindowBar and one child of type jsx3.gui.Block.

Field Summary
static String
DEFAULTBACKGROUNDCOLOR
#e8e8f5 (default)
static int
FIXED
Enum value for the resizable property of instances of this class indicating a non-resizable dialog.
static int
MAXIMIZED
Enum value for the windowState property of instances of this class indicating a maximized dialog.
static int
MINIMIZED
Enum value for the windowState property of instances of this class indicating a minimized dialog.
static int
MODAL
Enum value for the modal property of instances of this class indicating a modal dialog.
static int
NONMODAL
Enum value for the modal property of instances of this class indicating a non-modal dialog.
static int
RESIZABLE
Enum value for the resizable property of instances of this class indicating a resizable dialog.
static void
Deprecated. Renamed to RESIZABLE.
Constructor Summary
void
init(strName : String, vntWidth : int | String, vntHeight : int | String, strTitle : String)
instance initializer
Method Summary
void
alerts the user's attention to the dialog box by making its caption bar 'flash' on-screen (as it typical with a windows modal dialog)
void
Modifies the top and left properties of this dialog in order to fit it within its parent container.
void
removes the dialog box from the JSX DOM and removes its on-screen VIEW from the browser DOM
void
Toggles the state of the dialog between 'maximized' and its 'initial state'
void
doToggleState(STATE : int)
typically called by minimize/windowshade jsx3.gui.ToolbarButton in the dialog box's caption bar; toggles the window's state between full-size and window-shaded (where only the dialog's caption bar is visible); or fully minimized to the application task bar if one exists
void
focus(bTimeout : boolean)
Applies focus to the caption bar if the dialog has one; otherwise the dialog is given focus.
Object<String, int>
Returns the absolute positioning of the object's on-screen view (specifically, the dialog box, not its modal container if there is one) in relation to JSXROOT (whose left/top is 0/0).
jsx3.gui.Block
Implements necessary method for the Alerts interface.
jsx3.gui.WindowBar
Returns an object handle to the jsx3.gui.WindowBar instance associated with the jsx3.gui.Dialog instance
int
Returns whether a dialog displays as modal or not.
int
Returns whether the dialog can be resized or not.
jsx3.gui.ToolbarButton
Returns object handle to the jsx3.gui.ToolbarButton instance that resides in the application (this.getServer()) task bar and is associated with this dialog instance; returns null if none found
static String
Deprecated.
int
Returns state of the window (full-size / window-shaded).
int
Returns numeric multiplier for the dialog's z-index.
boolean
Returns whether this dialog instance is the front-most dialog among all open dialogs
String
Returns the HTML, used for this object's on-screen VIEW
void
paintChild(objJSX : jsx3.app.Model, bGroup : ?)
Ensures that HTML content is added to the correct VIEW element given the unique complexities of a the jsx3.gui.Dialog class
void
Removes the box model abstraction for a given object and its descendants.
jsx3.gui.Dialog
setModal(intModal : int)
Sets whether a dialog displays as modal or not.
jsx3.gui.Dialog
setResize(RESIZE : int)
Sets whether the dialog box's on-screen view can be resized; returns reference to self to facilitate method chaining
jsx3.gui.Dialog
setResizeParameters(RESIZE : int, intMinX : int, intMinY : int, intMaxX : int, intMaxY : int, strAfterResizeFunction : ?)
Sets resize parameters such as min width, max width, etc for the dialog; returns reference to self to facilitate method chaining
jsx3.gui.Dialog
setWindowState(STATE : int)
Sets state of the window (full-size / window-shaded); returns ref to self for method chaining
jsx3.gui.Dialog
setZMultiplier(intMultiplier : int)
Sets numeric multiplier for the dialog's z-index.
Methods Inherited From jsx3.gui.Alerts
alert, configureAlert, confirm, prompt
Methods Inherited From jsx3.gui.Block
getBackground, getBackgroundColor, getBorder, getCDFAttribute, getCDFId, getCSSOverride, getClassName, getColor, getCursor, getDimensions, getDisplay, getFontName, getFontSize, getFontWeight, getHeight, getIndex, getLeft, getMargin, getOverflow, getPadding, getRelativePosition, getTagName, getText, getTextAlign, getTip, getTop, getVisibility, getWidth, getZIndex, hideMask, setBackground, setBackgroundColor, setBorder, setCDFAttribute, setCDFId, setCSSOverride, setClassName, setColor, setCursor, setDimensions, setDisplay, setFontName, setFontSize, setFontWeight, setHeight, setIndex, setLeft, setMargin, setOverflow, setPadding, setRelativePosition, setTagName, setText, setTextAlign, setTip, setTop, setVisibility, setWidth, setZIndex, showMask
Methods Inherited From jsx3.gui.Interactive
doEvent, getCanDrag, getCanDrop, getCanMove, getCanSpy, getEvent, getEvents, getMenu, hasEvent, registerHotKey, removeEvent, removeEvents, setCanDrag, setCanDrop, setCanMove, setCanSpy, setEvent, setMenu, setSpyStyles, showSpy
Methods Inherited From jsx3.gui.Painted
getAttribute, getAttributes, getDynamicProperty, getRendered, insertHTML, onAfterPaint, onAfterRestoreView, paintChildren, removeAttribute, removeAttributes, repaint, setAttribute, setDynamicProperty
Methods Inherited From jsx3.app.Model
adoptChild, doClone, findAncestor, findDescendants, getAncestorOfName, getAncestorOfType, getChild, getChildIndex, getChildren, getDescendantOfName, getDescendantsOfType, getFirstChild, getFirstChildOfType, getHelpId, getId, getLastChild, getLoadType, getMetaValue, getNS, getName, getNextSibling, getParent, getPersistence, getPreviousSibling, getServer, getUriResolver, insertBefore, load, loadAndCache, loadXML, onAfterAssemble, onAfterAttach, onBeforeAssemble, onChangeServer, onDestroy, onRemoveChild, onSetChild, onSetParent, removeChild, removeChildren, setChild, setHelpId, setLoadType, setMetaValue, setName, setPersistence, toString, toXML, toXMLDoc
Methods Inherited From jsx3.util.EventDispatcher
publish, subscribe, unsubscribe, unsubscribeAll
Methods Inherited From jsx3.lang.Object
clone, equals, eval, getClass, getInstanceOf, getInstanceOfClass, getInstanceOfPackage, instanceOf, isInstanceOf, isSubclassOf, jsxmix, jsxsuper, jsxsupermix, setInstanceOf
Field Detail

DEFAULTBACKGROUNDCOLOR

static String DEFAULTBACKGROUNDCOLOR
#e8e8f5 (default)

FIXED

static final int FIXED
Enum value for the resizable property of instances of this class indicating a non-resizable dialog.

MAXIMIZED

static final int MAXIMIZED
Enum value for the windowState property of instances of this class indicating a maximized dialog.

MINIMIZED

static final int MINIMIZED
Enum value for the windowState property of instances of this class indicating a minimized dialog.

MODAL

static final int MODAL
Enum value for the modal property of instances of this class indicating a modal dialog.

NONMODAL

static final int NONMODAL
Enum value for the modal property of instances of this class indicating a non-modal dialog.

RESIZABLE

static final int RESIZABLE
Enum value for the resizable property of instances of this class indicating a resizable dialog.

RESIZEABLE

static ? RESIZEABLE
Deprecated. Renamed to RESIZABLE.
Constructor Detail

init

void init(strName : String, vntWidth : int | String, vntHeight : int | String, strTitle : String)
instance initializer

Parameters:

strNameunique name distinguishing this object from all other JSX GUI objects in the JSX application
vntWidthwidth in pixels
vntHeightheight in pixels
strTitleif != null, will be set as the text property on the child captionbar
Method Detail

beep

void beep()
alerts the user's attention to the dialog box by making its caption bar 'flash' on-screen (as it typical with a windows modal dialog)

constrainPosition

void constrainPosition(arg : boolean | Array<int>)
Modifies the top and left properties of this dialog in order to fit it within its parent container. This method ensures that at least a certain amount of the dialog shows on the East, South, and West edges of the server and that the entire dialog shows on the North edge.

This method is called by default after the user moves a dialog with the mouse. If an AFTER_MOVE model event is specified, then this method is not called automatically and must be called explicitly by the model event.

Parameters:

argif true, this dialog will be placed entirely within its container, with a certain amount of padding, and this dialog will be resized if necessary. If this argument is an array, it is taken as the N-E-S-W minimum pixels to show after constraining the position of the dialog. A null value for any dimension means that the entire dimension should be shown. A negative value means the number of pixels less than the size of the dialog in that dimension.

doClose

void doClose()
removes the dialog box from the JSX DOM and removes its on-screen VIEW from the browser DOM

doMaximize

void doMaximize(objTBB : jsx3.gui.ToolbarButton)
Toggles the state of the dialog between 'maximized' and its 'initial state'

Parameters:

objTBBtoolbarbutton instance on the dialog to toggle the image/tip text for

doToggleState

void doToggleState(STATE : int)
typically called by minimize/windowshade jsx3.gui.ToolbarButton in the dialog box's caption bar; toggles the window's state between full-size and window-shaded (where only the dialog's caption bar is visible); or fully minimized to the application task bar if one exists

Parameters:

STATEif != null, window state is set to fullsize (jsx3.gui.Dialog.MAXIMIZED) and window-shade (jsx3.gui.Dialog.MINIMIZED); if no value is passed, the state is toggled

focus

void focus(bTimeout : boolean)
Applies focus to the caption bar if the dialog has one; otherwise the dialog is given focus.

Parameters:

bTimeout

Overrides:

focus in jsx3.gui.Painted

getAbsolutePosition

Object<String, int> getAbsolutePosition(objRoot : HTMLElement)
Returns the absolute positioning of the object's on-screen view (specifically, the dialog box, not its modal container if there is one) in relation to JSXROOT (whose left/top is 0/0). Returns information as a JavaScript object with properties, L, T, W, H of @objRoot is null, the on-screen view for JSXROOT is used as the object reference

Parameters:

objRootobject reference to IE DOM object (i.e., div, span, etc); if null is passed, the first div child of JSXROOT's on-screen representation will be used

Returns:

JScript object with properties: L, T, W, H (corresponding to left, top width, height)  

Overrides:

getAbsolutePosition in jsx3.gui.Painted

getAlertsParent

jsx3.gui.Block getAlertsParent()
Implements necessary method for the Alerts interface.

Returns:

this object.  

Overrides:

getAlertsParent in jsx3.gui.Alerts

getCaptionBar

jsx3.gui.WindowBar getCaptionBar()
Returns an object handle to the jsx3.gui.WindowBar instance associated with the jsx3.gui.Dialog instance

Returns:

jsx3.gui.WindowBar instance or null  

getModal

int getModal()
Returns whether a dialog displays as modal or not. Modal dialogs mask the rest of the container with an semi-transparent mask that blocks mouse interaction. Modal dialogs do not show up in the task bar. Default: jsx3.gui.Dialog.NONMODAL

Returns:

one of: jsx3.gui.Dialog.NONMODAL or jsx3.gui.Dialog.MODAL  

getResize

int getResize()
Returns whether the dialog can be resized or not. Default: jsx3.gui.Dialog.RESIZABLE

Returns:

one of: jsx3.gui.Dialog.RESIZABLE jsx3.gui.Dialog.FIXED  

getTaskButton

jsx3.gui.ToolbarButton getTaskButton(objTaskBar : jsx3.gui.WindowBar)
Returns object handle to the jsx3.gui.ToolbarButton instance that resides in the application (this.getServer()) task bar and is associated with this dialog instance; returns null if none found

Parameters:

objTaskBarspecify the task bar to search in

Returns:

or null  

getVersion

static String getVersion()
Deprecated.
Returns the release/build for the class (i.e., "2.2.00")

Returns:

 

getWindowState

int getWindowState()
Returns state of the window (full-size / window-shaded). Default: jsx3.gui.Dialog.MAXIMIZED

Returns:

one of: jsx3.gui.Dialog.MAXIMIZED or jsx3.gui.Dialog.MINIMIZED  

getZMultiplier

int getZMultiplier()
Returns numeric multiplier for the dialog's z-index. If a dialog box needs to always be on top of other dialog box instances, this multiplier can be increased to assure the appropriate zIndex. For example, a value of 5 would mean that this dialog box would be stacked on top of all dialog boxes with a alwaysOnTop multiplier less than 5. Default: 1

Returns:

integer  

isFront

boolean isFront()
Returns whether this dialog instance is the front-most dialog among all open dialogs

Returns:

 

paint

String paint()
Returns the HTML, used for this object's on-screen VIEW

Returns:

 

Overrides:

paint in jsx3.gui.Block

paintChild

void paintChild(objJSX : jsx3.app.Model, bGroup : ?)
Ensures that HTML content is added to the correct VIEW element given the unique complexities of a the jsx3.gui.Dialog class

Parameters:

objJSXJSX GUI object that is already part of the dialog's MODEL, but not yet a part of its VIEW
bGroup

Overrides:

paintChild in jsx3.gui.Painted

recalcBox

void recalcBox()
Removes the box model abstraction for a given object and its descendants. This effectively resets the box profiler, so dimensions can be recalculated as if the object was just broought into the visual DOM.

Overrides:

recalcBox in jsx3.gui.Painted

setModal

jsx3.gui.Dialog setModal(intModal : int)
Sets whether a dialog displays as modal or not. Modal dialogs mask the rest of the container with an semi-transparent mask that blocks mouse interaction. Modal dialogs do not show up in the task bar.

Parameters:

intModalone of: jsx3.gui.Dialog.NONMODAL or jsx3.gui.Dialog.MODAL

Returns:

this object  

setResize

jsx3.gui.Dialog setResize(RESIZE : int)
Sets whether the dialog box's on-screen view can be resized; returns reference to self to facilitate method chaining

Parameters:

RESIZEone of: jsx3.gui.Dialog.RESIZABLE jsx3.gui.Dialog.FIXED

Returns:

this object  

setResizeParameters

jsx3.gui.Dialog setResizeParameters(RESIZE : int, intMinX : int, intMinY : int, intMaxX : int, intMaxY : int, strAfterResizeFunction : ?)
Sets resize parameters such as min width, max width, etc for the dialog; returns reference to self to facilitate method chaining

Parameters:

RESIZEone of: jsx3.gui.Dialog.RESIZABLE jsx3.gui.Dialog.FIXED
intMinXmin width for the dialog when being resized
intMinYmin height for the dialog when being resized
intMaxXmax width for the dialog when being resized
intMaxYmax heightfor the dialog when being resized
strAfterResizeFunction

Returns:

this object  

setWindowState

jsx3.gui.Dialog setWindowState(STATE : int)
Sets state of the window (full-size / window-shaded); returns ref to self for method chaining

Parameters:

STATEone of: jsx3.gui.Dialog.MAXIMIZED or jsx3.gui.Dialog.MINIMIZED

Returns:

this object  

setZMultiplier

jsx3.gui.Dialog setZMultiplier(intMultiplier : int)
Sets numeric multiplier for the dialog's z-index. If a dialog box needs to always be on top of other dialog box instances, this multiplier can be increased to assure the appropriate zIndex. For example, a value of 5 would mean that this dialog box would be stacked on top of all dialog boxes with a alwaysOnTop multiplier less than 5

Parameters:

intMultiplierinteger; zero is allowed, but is not recommended; passing null is equivalent to passing 1

Returns:

this object