# JavaScript API Reference for Oracle ADF Faces

Overview | Package | Class | Tree | Deprecated | Index | Help
| Oracle® Fusion Middleware Javascript API Reference for Oracle ADF Faces 12c (12.2.1.4.0) E81451-01
PREV NEXT | FRAMES NO FRAMES Warning: private items are visible |

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

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

## Warning:

- This is an unsupported, internal implementation class.
- Use an API class that might provide equivalent functionality instead.
- This class will change without notice.
- It is not recommended that you use anything in this class.

    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` | `_BACKGROUND_EXPANDO`
`private static Object` | `_CONTENT_ID`
`private static Object` | `_DRAG_STYLECLASS`
`private static Object` | `_INACTIVE_STYLECLASS`
`private static Object` | `_POPUP_INITIAL_FOCUS_LIVE_CONTENT_ID`
`private static Object` | `_TITLE_ID`

### Fields inherited from oracle.adfinternal.view.js.laf.dhtml.internalWindow.AdfDhtmlPopupWindow
`__CANCELED_EXPANDO, __POPUP_CONTAINER_ID, __POPUPID_EXPANDO, __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.
`public Object` | `announceOpeningViaLiveRegion(Object hints)` Announce opening of the popup via the wai-aria live region.
`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 String` | `GetAnimateSkinProperty()`
`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.
`public HtmlElement` | `getFirstTabStop()` Exposes the first tab stop, searching first in the content of the dialog, as a public interfaces.
`protected HTMLElement` | `GetFocusContent()` Sets focus to the first element in the window.
`public boolean` | `getInitialFocus(Object initialFocus)` Gets the modality of the "dialog".
`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.
`public boolean` | `hasContainedComponentDomElement()`
`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.
`private static boolean` | `_isMessageDialogVisible()`
`public Object` | `removeAccessibleAttrs()` Unsets accessible attributes to the popup container element.
`public Object` | `setAccessibleAttrs(Object hints)` Sets accessibility attributes for the container element
`public void` | `setContent(HTMLElement selectorContent)` Sets the content of this popup window
`protected Object` | `SetContentParent(HTMLElement contentParentElement)` Specifies which member element is the parent of the popup's content.
`public void` | `setDragElement(Object dragElement)`
`public void` | `setDragging(Boolean dragging)`
`public Object` | `setInitialFocus(Object initialFocus)` Sets the modality of the "dialog".
`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 Object` | `show(Object hints)`
`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 "data-afr-panelwindowbackground" expando attribute.

### Methods inherited from oracle.adfinternal.view.js.laf.dhtml.internalWindow.AdfDhtmlPopupWindow
`addOpenedHandler, AnimateClosing, AnimateOpening, AnimateUsingWrapper, autoSize, cancel, CloseAnimationComplete, ClosedPopup, CreateShadow, DoResizeNotifyDom, FocusOnFirstElement, GetAnimationDuration, GetCloseAnimationDuration, getContent, GetFocusOnOpen, getInitialPopupTailPosition, GetLaunchSourceElement, getLaunchSourceId, GetMaxWidth, getPopupClientId, GetPositionManagerIndex, getTailElement, getZorderScope, HandleKeyNavigation, HasShadow, hide, ImmediateZorderRegistration, isAncestorOrSelf, isPopupWindow, isVisible, NeedsCloseLink, OpenAnimationComplete, OpenedPopup, Position, RestoreScrollValues, SaveScrollValues, setCloseHandler, setCloseHandlerParam, SetFocusOnOpen, setRestoreFocusId, shouldInvertPosition, WrapContent`

### Methods inherited from oracle.adfinternal.view.js.laf.dhtml.internalWindow.AdfAbstractFloatingElement
`CreateTable, getAlignElement, getElement, GetFirstFormId, GetFloatingType, getHeight, getLeft, getShadowAnchor, getTop, getWidth, isPreventScrollOnClose, raiseToFront, setAlignElement, setAlignPosition, setElement, setLeft, setPreventScrollOnClose, setShadowAnchor, setTop`

### Methods inherited from oracle.adf.view.js.base.AdfObject
`adopt, clone, createCallback, createInitializedObject, createSubclass, ensureClassInitialization, equals, exportPrototypeSymbol, getClass, GetLazyArrayProperty, GetLazyMapProperty, getTypeName, toDebugString, toString`

## Field Detail

### _BACKGROUND_EXPANDO

`private static Object _BACKGROUND_EXPANDO`

### _CONTENT_ID

`private static Object _CONTENT_ID`

### _DRAG_STYLECLASS

`private static Object _DRAG_STYLECLASS`

### _INACTIVE_STYLECLASS

`private static Object _INACTIVE_STYLECLASS`

### _POPUP_INITIAL_FOCUS_LIVE_CONTENT_ID

`private static Object _POPUP_INITIAL_FOCUS_LIVE_CONTENT_ID`

### _TITLE_ID

`private static Object _TITLE_ID`

## 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

### announceOpeningViaLiveRegion

`public Object announceOpeningViaLiveRegion(Object hints)`
  Announce opening of the popup via the wai-aria live region.
  Parameters:

    `hints` | - | a set of popup hints (see AdfDhtmlPopupWindow) Default value = null

  Return:
    `Object`
  Overrides:
    `AdfDhtmlPopupWindow.announceOpeningViaLiveRegion(Object)`

### 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()`

### GetAnimateSkinProperty

`protected String GetAnimateSkinProperty()`
  Return:
    `String` - null "-tr-animate" skinning property for the window/dialog component.
  Overrides:
    `AdfDhtmlPopupWindow.GetAnimateSkinProperty()`

### GetAnimationDurationSkinProperty

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

### 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()`

### getFirstTabStop

`public HtmlElement getFirstTabStop()`
  Exposes the first tab stop, searching first in the content of the dialog, as a public interfaces.
  Return:
    `HtmlElement` - the first element that is a tab stop within the document
  See also:
    `GetFocusContent()`

### 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 content dom will be the middle-center table cell.
  Return:
    `HTMLElement` - content node area
  Overrides:
    `AdfDhtmlPopupWindow.GetFocusContent()`

### getInitialFocus

`public boolean getInitialFocus(Object initialFocus)`
  Gets the modality of the "dialog".
  Parameters:

    `initialFocus` |  |

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

### _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)`

### hasContainedComponentDomElement

`public boolean hasContainedComponentDomElement()`
  Return:
    `boolean` - returns true if a contained component dom element is found else returns false.

### 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()`

### _isMessageDialogVisible

`private static boolean _isMessageDialogVisible()`
  Return:
    `boolean` - true if the global face message dialog is visible

### removeAccessibleAttrs

`public Object removeAccessibleAttrs()`
  Unsets accessible attributes to the popup container element.
  Return:
    `Object`
  Overrides:
    `AdfDhtmlPopupWindow.removeAccessibleAttrs()`

### setAccessibleAttrs

`public Object setAccessibleAttrs(Object hints)`
  Sets accessibility attributes for the container element
  Parameters:

    `hints` | - | a set of popup hints (see AdfDhtmlPopupWindow) Default value = null

  Return:
    `Object`
  Overrides:
    `AdfDhtmlPopupWindow.setAccessibleAttrs(Object)`

### 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)`

### SetContentParent

`protected Object SetContentParent(HTMLElement contentParentElement)`
  Specifies which member element is the parent of the popup's content.
  Parameters:

    `contentParentElement` | - | the parent of the content

  Return:
    `Object`

### 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

### setInitialFocus

`public Object setInitialFocus(Object initialFocus)`
  Sets the modality of the "dialog".
  Parameters:

    `initialFocus` |  |

  Return:
    `Object`

### 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()`

### show

`public Object show(Object hints)`
  Parameters:

    `hints` |  |

  Return:
    `Object`
  Overrides:
    `AdfAbstractFloatingElement.show()`

### 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 "data-afr-panelwindowbackground" 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

Overview | Package | Class | Tree | Deprecated | Index | Help
| Oracle® Fusion Middleware Javascript API Reference for Oracle ADF Faces 12c (12.2.1.4.0) E81451-01
PREV NEXT | FRAMES NO FRAMES Warning: private items are visible |

Copyright (c) 1998, 2018, Oracle and/or its affiliates. All rights reserved.