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
public static Object
LEFT_ALIGN_PERCENTAGE_EXPANDO
An expando attribute applied to the content element calculated in setPosition.
public static Object
TOP_ALIGN_PERCENTAGE_EXPANDO
An expando attribute applied to the content element calculated in setPosition.


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_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_MAX_WIDTH, HINT_MODAL, HINT_MOUSEPOSITION, HINT_OPENED_HANDLER, HINT_OPENED_HANDLER_PARAM, HINT_POSITION_HANDLER, HINT_TITLE, HINT_TYPE, HINT_TYPE_DIALOG, HINT_TYPE_INLINESELECTOR, HINT_TYPE_LOVCOMBOBOX, HINT_TYPE_MENU, HINT_TYPE_NOTEWINDOW, 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 Object
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 Object
destroy()
Invoked when the dialog/panelWindow is hidden.
protected Object
DoShow(Object hints)
Overridden to capture a few "dialog" specific hints and register with the dialog services (AdfDhtmlDialogManager and optionally AdfDhtmlModalityManager).
private Object
_dragEndHandler()
Invoked when the drag operation is ending.
private Object
_dragStartHandler()
Invoked with the window drag begins.
public Object
getAlignPosition()
If a positionHander was passed as a popup hint, use it to dynamically calculate the popup align position.
protected Object
GetAnimationDurationSkinProperty()
Returns the skin property for animation duriation
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(Object 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 Object
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 Object
handleComponentRemoved()
The dom of the dialog or panelWindow is being replaced so we need to unregister services attached to the dom.
protected Object
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 Object
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 Object
setContent(HTMLElement selectorContent)
Sets the content of this popup window
public Object
setDragElement(Object dragElement)
public void
setDragging(boolean dragging)
public Object
setModal(Boolean modal)
Sets the modality of the "dialog".
public Object
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 Object
showAsActive()
Removes the inactive style class from the root "dialog" element.
public Object
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, getPopupClientId, GetPositionHandler, GetPositionManagerIndex, HandleKeyNavigation, hide, isVisible, OpenedPopup, Position, RestoreScrollValues, SaveScrollValues, setCloseHandler, setCloseHandlerParam, SetFocusOnOpen, SetPositionHandler, 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

LEFT_ALIGN_PERCENTAGE_EXPANDO

public static Object LEFT_ALIGN_PERCENTAGE_EXPANDO

An expando attribute applied to the content element calculated in setPosition. The value is the percentage of width of the element relative to the primary window. It is used to proportionally resize the element relative to the center of the page.

TOP_ALIGN_PERCENTAGE_EXPANDO

public static Object TOP_ALIGN_PERCENTAGE_EXPANDO

An expando attribute applied to the content element calculated in setPosition. The value is the percentage of height of the element relative to the primary window. It is used to proportionally resize the element relative to the center of the page.

Constructor Detail


AdfDhtmlSimpleFloat

public AdfDhtmlSimpleFloat()

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

Method Detail


activate

public Object 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:
Object

CreateDomElement

protected HTMLElement CreateDomElement()

Create and initialize the html.

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

destroy

public Object 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:
Object
Overrides:
AdfAbstractFloatingElement.destroy()

DoShow

protected Object DoShow(Object 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)
Default value = null
Return:
Object
Overrides:
AdfDhtmlPopupWindow.DoShow(Object)

_dragEndHandler

private Object _dragEndHandler()

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

Return:
Object
See also:
_dragStartHandler()

_dragStartHandler

private Object _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:
Object
See also:
_dragEndHandler()

getAlignPosition

public Object getAlignPosition()

If a positionHander was passed as a popup hint, use it to dynamically calculate the popup align position.

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

GetAnimationDurationSkinProperty

protected Object GetAnimationDurationSkinProperty()

Returns the skin property for animation duriation

Return:
Object
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(Object content)

Parameters:
content    
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 Object 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:
Object

handleComponentRemoved

public Object 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:
Object

HandleEscapeKey

protected Object 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:
Object
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 Object initializeRepositionable()

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

Return:
Object
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 Object setContent(HTMLElement selectorContent)

Sets the content of this popup window

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

setDragElement

public Object setDragElement(Object dragElement)

Parameters:
dragElement    
Return:
Object

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 Object 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 panelWindow and dialog do not have alignment hits, 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:
Object
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 Object 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:
Object

showAsInActive

public Object 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:
Object

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

 

Generated on 2009.09.25 03:44 UTC
Copyright (c) 1998, 2009, Oracle and/or its affiliates. All rights reserved.