OracleJavaScript API Reference for Oracle ADF Faces

 

SUMMARY: FIELD | CONSTR | METHOD    DETAIL: FIELD | CONSTR | METHOD

oracle.adfinternal.view.js.laf.dhtml.internalWindow
Class AdfDhtmlDialogManager

Warning:

org.ecmascript.object.Object
   |
   +--oracle.adf.view.js.base.AdfObject
         |
         +--oracle.adfinternal.view.js.laf.dhtml.internalWindow.AdfDhtmlDialogManager

public class AdfDhtmlDialogManager
extends AdfObject
Dialog manager handles activation of the active window, deactivating the previous active window and restoring the most recent open dialog. It also tracks active open windows. The ctrl+alt+w key combination can be used to cycle through the active dialogs. The active open window navigation consists of any open modeless dialogs that are at the same level as the primary window. The primary window is also included in the window rotation. The definition of the primary window depends on if there are any modal dialogs open. When there is not a model dialog open, the primary window is the document. When a model dialog is open, the primary window becomes the modal dialog. Any modeless windows open after the modal dialog (primary window) defines the active window navigation. This means that any open windows under the modal glass pane are inactive. When the primary window is closed, all active modeless child dialogs are closed.



Field Summary

private Object
_activationChain
private Object
_activeDialog
private Object
_dialogs
private Object
_lastScrollLeft
private Object
_lastScrollTop
private Object
_primaryWindow


Fields inherited from oracle.adf.view.js.base.AdfObject

constructor, superclass


Fields inherited from org.ecmascript.object.Object

prototype


Constructor Summary

public
AdfDhtmlDialogManager()
Dialog manager handles activation of the active window, deactivating the previous active window and restoring the most recent open dialog.


Method Summary

public Boolean
activateDialog(AdfDhtmlSimpleFloat dialog)
Makes the dialog passed in active.
public Object
deactivateCurrentDialog()
Deactivates the current dialog but doesn't audit it in activation history.
public Object
focusNextModelessDialog(Object prevDocumentDomElement)
Looks for the next dialog to activate.
public AdfDhtmlSimpleFloat
getActiveDialog()
public Number
getElementCount()
public static AdfDhtmlDialogManager
getInstance()
private Number
_getTopDialogNavigation()
Builds a private array of the top modeless dialogs if it doesn't exist.
protected Object
Init()
Initializes the internal stacks that tracks dialogs.
public Object
registerDialog(AdfDhtmlSimpleFloat dialog)
Adds a new dialog to the bottom of the dialog stack.
public Object
unregisterDialog(AdfDhtmlSimpleFloat dialog)
Removes the dialog from the stack activating the last dialog opened.


Methods inherited from oracle.adf.view.js.base.AdfObject

adopt, clone, createCallback, createInitializedObject, createSubclass, ensureClassInitialization, equals, getClass, GetLazyArrayProperty, GetLazyMapProperty, getTypeName, toDebugString, toString


Field Detail


_activationChain

private Object _activationChain

_activeDialog

private Object _activeDialog

_dialogs

private Object _dialogs

_lastScrollLeft

private Object _lastScrollLeft

_lastScrollTop

private Object _lastScrollTop

_primaryWindow

private Object _primaryWindow

Constructor Detail


AdfDhtmlDialogManager

public AdfDhtmlDialogManager()

Dialog manager handles activation of the active window, deactivating the previous active window and restoring the most recent open dialog. It also tracks active open windows. The ctrl+alt+w key combination can be used to cycle through the active dialogs. The active open window navigation consists of any open modeless dialogs that are at the same level as the primary window. The primary window is also included in the window rotation. The definition of the primary window depends on if there are any modal dialogs open. When there is not a model dialog open, the primary window is the document. When a model dialog is open, the primary window becomes the modal dialog. Any modeless windows open after the modal dialog (primary window) defines the active window navigation. This means that any open windows under the modal glass pane are inactive. When the primary window is closed, all active modeless child dialogs are closed.

Method Detail


activateDialog

public Boolean activateDialog(AdfDhtmlSimpleFloat dialog)

Makes the dialog passed in active. The dialog must already have been registered by calling registerDialog. If there is an active dialog, it is deactivated before making the target dialog active. Dialog activation history is kept so that we can determine the previous dialog to active when a dialog is unregistered. The dialog will not be activated if it is "under the modality glass". If the target dialog to activate is not in the top dialog navigation stack, "false" is returned.

Parameters:
dialog  -  the dialog to unregister
Return:
Boolean - returns true if the dialog was activated; otherwise, false if the dialog couldn't be activated.

deactivateCurrentDialog

public Object deactivateCurrentDialog()

Deactivates the current dialog but doesn't audit it in activation history.

Return:
Object

focusNextModelessDialog

public Object focusNextModelessDialog(Object prevDocumentDomElement)

Looks for the next dialog to activate. The dialogs are tracked in order they are opend. To determine then next dialog we need to first define the subset of modless windows. A modal window can open modeless windows. We can only rotate within the last set of modeless windows. If all opened windows are modeless, the document must be must be included in the rotation. If there is an open modal dialog, the "document" primary window will be under glass and will not be in the rotation. The modeless dialog will become the primary window.

Parameters:
prevDocumentDomElement  -  optional DOM document element that focus should return using the ctrl+alt+w key combo
Return:
Object

getActiveDialog

public AdfDhtmlSimpleFloat getActiveDialog()

Return:
AdfDhtmlSimpleFloat - returns the active dialog

getElementCount

public Number getElementCount()

Return:
Number - the total number of floating elements managed

getInstance

public static AdfDhtmlDialogManager getInstance()

Return:
AdfDhtmlDialogManager - Instantiate the singleton

_getTopDialogNavigation

private Number _getTopDialogNavigation()

Builds a private array of the top modeless dialogs if it doesn't exist. The top of the array or the first modal dialog delineates the active modeless stack. If there are not any modal dialogs in the list, the "primary window" is added to the end "top" of the dialog rotation. If there is a modal dialog, the "primary window" is under glass and so the modal dialog is considered the primary. When the primary window is the document it is represended by a private object that implements an "active" method like the AdfDhtmlSimpleFloat. Each time this method is called, the private "this._topDialogNavigation" is rebuilt from "this._dialogs". The method returns an integer that is the index into the private stack that is the "this._activeDialog". If the active dialog is not found, -1 is returned.

Return:
Number - index into this._topDialogNavigation for the this._activeDialog.

Init

protected Object Init()

Initializes the internal stacks that tracks dialogs. Registers a scroll event with the DOM document to reposition the dialogs.

Return:
Object
Overrides:
AdfObject.Init()

registerDialog

public Object registerDialog(AdfDhtmlSimpleFloat dialog)

Adds a new dialog to the bottom of the dialog stack. The unregisterDialog method is used to remove it. This call only registers the dialog. The activeDialog must be called to set it active.

Parameters:
dialog  -  the dialog to unregister
Return:
Object

unregisterDialog

public Object unregisterDialog(AdfDhtmlSimpleFloat dialog)

Removes the dialog from the stack activating the last dialog opened. Reference to the dialog was already established by calling registerDialog.

Parameters:
dialog  -  the dialog to unregister
Return:
Object

SUMMARY: FIELD | CONSTR | METHOD    DETAIL: FIELD | CONSTR | METHOD

 

Generated on 2010.12.10 19:37 UTC
Copyright (c) 1998, 2011, Oracle and/or its affiliates. All rights reserved.