OracleJavaScript API Reference for Oracle ADF Faces

 

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

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

Warning:

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

public class AdfDhtmlSimpleFloat
extends AdfDhtmlPopupWindow
A popup window that is used to diplay dialogs and panelWindow components



Field Summary

private static Object
_CONTENT_ID
private static Object
_DRAG_STYLECLASS
private static Object
_INACTIVE_STYLECLASS


Fields inherited from oracle.adfinternal.view.js.laf.dhtml.internalWindow.AdfDhtmlPopupWindow

__CANCELED_EXPANDO, HINT_ALIGN, HINT_ALIGN_ELEMENT, HINT_ANIMATE, HINT_AUTODISMISS, HINT_AUTODISMISS_ALWAYS, HINT_AUTODISMISS_INACTIVATE, HINT_AUTODISMISS_MENU, HINT_AUTODISMISS_MOUSEOUT, HINT_AUTODISMISS_MOUSEOUT_ID, HINT_AUTODISMISS_NEVER, HINT_AUTODISMISS_TIMEOUT, HINT_CLOSE_HANDLER, HINT_CLOSE_HANDLER_PARAM, HINT_CLOSE_ON_ESCAPE, HINT_COMPONENT_CLIENT_ID, HINT_CONTENT, HINT_DETACH_DRAG_END_HANDLER, HINT_DETACH_DRAG_START_HANDLER, HINT_DRAG_ELEMENT, HINT_FOCUS, HINT_LAUNCH_SOURCE_ID, HINT_LEFT_POSITION, HINT_MAX_WIDTH, HINT_MODAL, HINT_MOUSEPOSITION, HINT_OPENED_HANDLER, HINT_OPENED_HANDLER_PARAM, HINT_RESTORE_IMMEDIATE, HINT_TITLE, HINT_TOP_POSITION, HINT_TYPE, HINT_TYPE_DIALOG, HINT_TYPE_INLINESELECTOR, HINT_TYPE_LOVCOMBOBOX, HINT_TYPE_MENU, HINT_TYPE_NOTEWINDOW, __REPLACEDOM_EXPANDO, setElement


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

constructor, superclass


Fields inherited from org.ecmascript.object.Object

prototype


Constructor Summary

public
AdfDhtmlSimpleFloat()
A popup window that is used to diplay dialogs and panelWindow components


Method Summary

public void
activate()
Activates the floating element by raising to the front, activating the first element, changing the CSS to render active, and adjusting the shadow.
protected HTMLElement
CreateDomElement()
Create and initialize the html.
public void
destroy()
Invoked when the dialog/panelWindow is hidden.
protected void
DoShow(map hints)
Overridden to capture a few "dialog" specific hints and register with the dialog services (AdfDhtmlDialogManager and optionally AdfDhtmlModalityManager).
private void
_dragEndHandler()
Invoked when the drag operation is ending.
private void
_dragStartHandler()
Invoked with the window drag begins.
public Object
getAlignPosition()
Calculates the position of the dialog when not aligned to an element.
protected int
GetAnimationDurationSkinProperty()
public String
getContainedComponentClientId()
private HTMLElement
_getContainedComponentDomElement()
Returns the dom element the contained panelWindow or dialog is bound to.
private AdfUIComponent
_getContainedComponentPeer()
Uses the private "_containedComponentId" to find the first child managed by the floating element.
protected HTMLElement
GetContentParent()
Gets the dom element that is the parent of the popup's content.
protected HTMLElement
GetFocusContent()
Sets focus to the first element in the window.
private HTMLElement
_getMainElement(HTMLElement content)
public boolean
getModal(Object modal)
Gets the modality of the "dialog".
public boolean
handleActivate(boolean focusOnFirstElement)
If the dialog is not active, activate the dialog.
public void
handleBindToComponent()
This function is called from the AdfDhtmlPanelWindowPeer.BindToComponent(component, domElement) to re-register various popup services after the dialog or panelWindow has been replaced by a ppr target.
public void
handleComponentRemoved()
The dom of the dialog or panelWindow is being replaced so we need to unregister services attached to the dom.
protected void
HandleEscapeKey(AdfComponentEvent event)
This is one of the several events that the "popup" controller listens for.
protected Object
Init()
Initializes the instance.
protected static Object
InitClass()
public void
initializeRepositionable()
Initializes the drag-and-drop repositionable object with the start and end handlers.
public Object
isAnimating()
Returns if the popup window is currently animating during the opening of the window or if the window is resizing or moving due to drag-and-drop.
public void
setContent(HTMLElement selectorContent)
Sets the content of this popup window
public void
setDragElement(Object dragElement)
public void
setDragging(boolean dragging)
public Object
setModal(Boolean modal)
Sets the modality of the "dialog".
public void
setPosition(Number positionTop, Number positionLeft)
This method is used to change the position of the floating element.
public void
setShadowVisibility(boolean visible)
Creates and removes the shadow decorator.
protected boolean
ShouldHideOnClip()
Returns false as simple float popups do not close on clip.
public void
showAsActive()
Removes the inactive style class from the root "dialog" element.
public void
showAsInActive()
Inspects the child nodes of the root elment looking for nodes marked with a "_afrPanelWindowBackground" expando attribute.


Methods inherited from oracle.adfinternal.view.js.laf.dhtml.internalWindow.AdfDhtmlPopupWindow

AnimateOpening, autoSize, cancel, CreateShadow, DoResizeNotifyDom, FocusOnFirstElement, GetAnimationDuration, getContent, GetFocusOnOpen, getLaunchSourceId, GetMaxWidth, getPopupClientId, GetPositionManagerIndex, HandleKeyNavigation, hide, isVisible, OpenedPopup, Position, RestoreScrollValues, SaveScrollValues, setCloseHandler, setCloseHandlerParam, SetFocusOnOpen, show, WrapContent


Methods inherited from oracle.adfinternal.view.js.laf.dhtml.internalWindow.AdfAbstractFloatingElement

CreateTable, getAlignElement, getElement, getHeight, getLeft, getShadowAnchor, getTop, getWidth, raiseToFront, setAlignElement, setAlignPosition, setElement, setLeft, setShadowAnchor, setTop


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

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


Field Detail


_CONTENT_ID

private static Object _CONTENT_ID

_DRAG_STYLECLASS

private static Object _DRAG_STYLECLASS

_INACTIVE_STYLECLASS

private static Object _INACTIVE_STYLECLASS

Constructor Detail


AdfDhtmlSimpleFloat

public AdfDhtmlSimpleFloat()

A popup window that is used to diplay dialogs and panelWindow components

Method Detail


activate

public void activate()

Activates the floating element by raising to the front, activating the first element, changing the CSS to render active, and adjusting the shadow.

Return:
void - null

CreateDomElement

protected HTMLElement CreateDomElement()

Create and initialize the html.

Return:
HTMLElement - the root dom element of this popup.
Overrides:
AdfDhtmlPopupWindow.CreateDomElement()

destroy

public void destroy()

Invoked when the dialog/panelWindow is hidden. This override, unregisters with the dialog manager, and modality manager - if the window is modal. It also destroys the drag-and-drop handler.

Return:
void - null
Overrides:
AdfAbstractFloatingElement.destroy()

DoShow

protected void DoShow(map hints)

Overridden to capture a few "dialog" specific hints and register with the dialog services (AdfDhtmlDialogManager and optionally AdfDhtmlModalityManager).

Parameters:
hints  -  a set of popup hints (see AdfDhtmlPopupWindow)
Return:
void - null
Overrides:
AdfDhtmlPopupWindow.DoShow(Object)

_dragEndHandler

private void _dragEndHandler()

Invoked when the drag operation is ending. The "drag" pseudo class is removed from the root node.

Return:
void - null
See also:
_dragStartHandler()

_dragStartHandler

private void _dragStartHandler()

Invoked with the window drag begins. The "drag" pseudo class is applied to the window content dom element activating selectors with the ":drag" state.

Return:
void - null
See also:
_dragEndHandler()

getAlignPosition

public Object getAlignPosition()

Calculates the position of the dialog when not aligned to an element.

Return:
Object - null (x, y) alignment position
See also:
setPosition(Number, Number)
Overrides:
AdfAbstractFloatingElement.getAlignPosition()

GetAnimationDurationSkinProperty

protected int GetAnimationDurationSkinProperty()

Return:
int - the skin property for animation duriation
Overrides:
AdfDhtmlPopupWindow.GetAnimationDurationSkinProperty()

getContainedComponentClientId

public String getContainedComponentClientId()

Return:
String - the client Id of the contained panelWindow or dialog.

_getContainedComponentDomElement

private HTMLElement _getContainedComponentDomElement()

Returns the dom element the contained panelWindow or dialog is bound to.

Return:
HTMLElement - dom element bound to the contained component

_getContainedComponentPeer

private AdfUIComponent _getContainedComponentPeer()

Uses the private "_containedComponentId" to find the first child managed by the floating element. The containedComponentId is provided as a popup hint.

Return:
AdfUIComponent - dialog or panelWindow that represents the floating element.

GetContentParent

protected HTMLElement GetContentParent()

Gets the dom element that is the parent of the popup's content.

Return:
HTMLElement - contentParentElement the parent of the content
Overrides:
AdfDhtmlPopupWindow.GetContentParent()

GetFocusContent

protected HTMLElement GetFocusContent()

Sets focus to the first element in the window. The content dom element is located using a sub client id. The conent dom will be the middle-center table cell if in normal mode. If in screen reader mode, the focus content must be the root element marked as the "popup container".

Return:
HTMLElement - content node area
Overrides:
AdfDhtmlPopupWindow.GetFocusContent()

_getMainElement

private HTMLElement _getMainElement(HTMLElement content)

Parameters:
content  -  area of the dialog
Return:
HTMLElement - markup container rendered by the dialog or panelWiindow component

getModal

public boolean getModal(Object modal)

Gets the modality of the "dialog".

Parameters:
modal    
Return:
boolean - true if "dialog" is modal

handleActivate

public boolean handleActivate(boolean focusOnFirstElement)

If the dialog is not active, activate the dialog. This is invoked by the AdfDhtmlPanelWindowPeer in the mouse down and focus component event handlers. When focus back to the component is detected on a modeless dialog or when a modal dialog is the primary window with child modeless popups, the state of the dialog needs to be toggled provided the dialog is not under modality glass. The dialog position within the modality stack is handled by the dialog manager.

Parameters:
focusOnFirstElement  -  if true, focus will be established on the first focusable element
Return:
boolean - returns true if the dialogs state has been activated from an inactive state

handleBindToComponent

public void handleBindToComponent()

This function is called from the AdfDhtmlPanelWindowPeer.BindToComponent(component, domElement) to re-register various popup services after the dialog or panelWindow has been replaced by a ppr target. De-registration is handled by handleComponentRemoved().

Return:
void - null

handleComponentRemoved

public void handleComponentRemoved()

The dom of the dialog or panelWindow is being replaced so we need to unregister services attached to the dom. By "services" we mean the shadow decorator and drag-and-drop. This logic is done here instead of the peer because we want to decouple the component peers with the specifices of the various popup services. This is called from the AdfRichUIPeer.ComponentRemoved(component) when the page service removes the component. These services are re-initialised by invokeing handleBindToComponent().

Return:
void - null

HandleEscapeKey

protected void HandleEscapeKey(AdfComponentEvent event)

This is one of the several events that the "popup" controller listens for. Popup controllers are not component peers so they subscribe to events on the document.

Parameters:
event  -  Esc key event trapped in the AdfDhtmlPopupWindow super class in the mouse up event handler
Return:
void - null
Overrides:
AdfDhtmlPopupWindow.HandleEscapeKey(Object)

Init

protected Object Init()

Initializes the instance. Subclasses of AdfObject must call their superclass' Init

Return:
Object
Overrides:
AdfObject.Init()

InitClass

protected static Object InitClass()

Return:
Object
Overrides:
AdfDhtmlPopupWindow.InitClass()

initializeRepositionable

public void initializeRepositionable()

Initializes the drag-and-drop repositionable object with the start and end handlers.

Return:
void - null
See also:
_dragStartHandler()
_dragEndHandler()

isAnimating

public Object isAnimating()

Returns if the popup window is currently animating during the opening of the window or if the window is resizing or moving due to drag-and-drop.

Return:
Object - true if the popup is currently animating or resizing
Overrides:
AdfDhtmlPopupWindow.isAnimating()

setContent

public void setContent(HTMLElement selectorContent)

Sets the content of this popup window

Parameters:
selectorContent  -  the dom element that is the content of the popupwindow
Return:
void - null
Overrides:
AdfDhtmlPopupWindow.setContent(HTMLElement)

setDragElement

public void setDragElement(Object dragElement)

Parameters:
dragElement    
Return:
void - null

setDragging

public void setDragging(boolean dragging)

Parameters:
dragging  -  true if the floating element is in drag mode
Return:
void - null

setModal

public Object setModal(Boolean modal)

Sets the modality of the "dialog".

Parameters:
modal  -  true if the dialog is modal
Return:
Object

setPosition

public void setPosition(Number positionTop,
                        Number positionLeft)

This method is used to change the position of the floating element. It's used by the AdfDhtmlPositionManager and to support drag and drop via AdfRepositionable. If the dialog does not align by element, the initial position will be the center of the page. When the dialog is moved using a drag-drop, we need to capture its location relative to the primary window making the dialog sticky to a location.

Parameters:
positionTop  -  new top
positionLeft  -  new left
Return:
void - null
See also:
getAlignPosition()
Overrides:
AdfAbstractFloatingElement.setPosition(Object, Object)

setShadowVisibility

public void setShadowVisibility(boolean visible)

Creates and removes the shadow decorator.

Parameters:
visible  -  false if the shadow should be hidden
Return:
void - null

ShouldHideOnClip

protected boolean ShouldHideOnClip()

Returns false as simple float popups do not close on clip.

Return:
boolean - if popup window should hide on clip
Overrides:
AdfDhtmlPopupWindow.ShouldHideOnClip()

showAsActive

public void showAsActive()

Removes the inactive style class from the root "dialog" element. The inactive style adjusts the opacity allowing the backgound to beeed through. Next, visit the first children of the root element changing the background div(s) to hidden by setting the display style to "none". The div(s) are layered under the content by the showAsInActive call.

Return:
void - null

showAsInActive

public void showAsInActive()

Inspects the child nodes of the root elment looking for nodes marked with a "_afrPanelWindowBackground" expando attribute. These nodes are background nodes that are resized to the size of the element similar to the shadow. These nodes are pre-assigned the af|dialog:inactive-background selector. The :inactive style is also added to the root element adjusting the opacity of the content allowing it to blend into the background div(s) that are layered behind the content.

Return:
void - null

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.