# 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.rich
Class AdfDhtmlToolbarPeer

## 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.adf.view.js.base.AdfUIPeer
                   |
                   +--oracle.adf.view.js.laf.rich.AdfRichUIPeer
                         |
                         +--oracle.adfinternal.view.js.laf.dhtml.rich.AdfDhtmlToolbarPeer

    public class AdfDhtmlToolbarPeer
    extends AdfRichUIPeer

Peer Implementation for toolbar

## Field Summary
`private Object` | `_childContainers`
`private Object` | `_isOverflowSupported`
`private Object` | `_isSingleTabstop`
`private Object` | `_overflowContainer`

### Fields inherited from oracle.adf.view.js.laf.rich.AdfRichUIPeer
`addComponentPropertyChanges, addComponentPropertyGetters, BUSY_STYLECLASS, CreateSubId, DISABLED_STYLECLASS, DRAG_READY_STYLECLASS, DRAG_SOURCE_STYLECLASS, DROP_TARGET_STYLECLASS, FOCUS_TARGET_STYLECLASS, HOVER_TARGET_STYLECLASS, READONLY_STYLECLASS, SELECTED_STYLECLASS`

### Fields inherited from oracle.adf.view.js.base.AdfObject
`constructor, superclass`

### Fields inherited from org.ecmascript.object.Object
`prototype`

## Constructor Summary
`public` | `AdfDhtmlToolbarPeer()` Peer Implementation for toolbar

## Method Summary
`private boolean` | `_canMoveFocus()` Can we move focus, for roving tab index case.
`protected Object` | `ChildVisibilityChanged(Object childComponent, Object childDomElement, Object childVisible)` Called when the visibility of a child component changes if the peer has overridden needsChildVisibilityChanges to return true.
`protected Object` | `ComponentRemoved(AdfUIComponent component)` Handles the removal of a component.
`private Object` | `_createOverflowElement(Object element)` Create and return a single html overflow element for the provided element data.
`public AdfUIComponent` | `getDescendantComponents(AdfUIComponent component, Array<AdfUIComponent> children)` Returns an array of descendant (child) components for this component.
`protected Number` | `GetMinimumWidth()` Returns the minimum width of a toolbar.
`protected Number` | `GetPreferredWidth()` Calculates the preferred width of a toolbar.
`private HTMLElement` | `_getStretchElement()` Finds the DOM element for the stretched component.
`private Object` | `_handleArrowKeys(Object keyCode, Object componentEvent)` Handler for arrow key events.
`protected Object` | `HandleComponentFocus(Object componentEvent)` Handle component focus.
`protected Object` | `HandleComponentKeyDown(Object componentEvent)` Component keyboard key down event handler
`protected Object` | `HandleComponentKeyPress(Object componentEvent)` Component keyboard key press event handler
`protected Object` | `InitDomElement(Object component, Object domElement)` Initialize the associated domElement when the peer is created.
`protected static Object` | `InitSubclass()`
`private static Object` | `_moveFocus(Object currentFocusElement, Object isPrevious)` Not invoking the focusNextTabStop/focusPreviousTabStop as it can move the focus to the document element.
`private Object` | `_moveHighlightToNextItem(Object componentEvent)` Moves the highlight (selection) to the next (right) item.
`private Object` | `_moveHighlightToPreviousItem(Object componentEvent)` Moves the highlight (selection) to the previous (left) item.
`public Object` | `needsChildVisibilityChanges(Object component)` Test whether the peer wants to be notified if the visibility of one of its children changes.
`public Object` | `needsResizeNotify(Object component)` We need resize notification.
`Object` | `__preferredSizeChangeNotify(AdfUIComponent component)` Notification that the components internal preferred sizes have changed.
`public Object` | `resetActiveDescendant()` For a single tabstop toolbar, reset the active descendant to the first focusable child.
`protected Object` | `ResizeNotify(Object oldWidth, Object oldHeight, Object newWidth, Object newHeight)` Resize notification callback - we perform geometry management here
`private Object` | `_reStretch()` If there is a stretch element in the toolbar, reapply it to it's maximum size
`protected Object` | `SimulateMouseOnDescendant(AdfUIComponent targetComponent, HTMLElement domElement, Object mouseEvent)` Override to see if descendant is in overflow.
`private Object` | `_unStretch()` If there is a stretch element in the toolbar, remove its assigned width.
`private Object` | `_updateActiveDescendant(HTMLElement newActiveDescendant)` Update the set active descendant to a new child element

### Methods inherited from oracle.adf.view.js.laf.rich.AdfRichUIPeer
`addComponentEventHandlers, addComponentPropertyChanges, addComponentPropertyGetters, addDomEventHandlers, addEventHandlerToDomInstance, addSuppressedPPRAttributes, applyDragReadyState, ApplyDragReadyState, applyDragSourceState, ApplyDragSourceState, bind, BindToComponent, cancelAllPopups, cancelPopup, clearDragReadyState, ClearDragReadyState, clearDragSourceState, ClearDragSourceState, ComponentInlineStyleChanged, ComponentPropertyChanged, componentRemoved, ComponentStyleClassChanged, ComponentVisibleChanged, ConvertClientIdToLocator, convertLocatorToClientId, createComponentEvent, CreateComponentEvent, CreateDraggableNode, createInnerPeerClassWithSubId, createPeerClass, createSubId, DefaultInitClass, descendantMessageChanged, DescendantMessageChanged, DispatchComponentEvent, DispatchUncanceledComponentEvent, domReplaceNotify, DomReplaceNotify, focus, Focus, getAbsoluteId, getAbsoluteLocator, getAccessibleName, GetAccessibleName, getAllPopups, GetBestMatchSubId, getComponent, GetComponent, GetComponentId, getComponentParent, getComponentProperty, GetComponentVisible, getDomContentElement, getDomContentElementForComponent, GetDomContentElementForNode, getDomDocument, getDomElement, getDomElementForComponent, getDomNode, GetDomNodeForCommentComponent, getDomNodeForComponent, getDomRootNodes, GetDomRootNodes, getDragOverFeedback, GetDragOverFeedback, getDragTransferable, GetDragTransferable, GetElementToReplaceWithSVG, getFallbackDomElement, GetFallbackDomElement, getFirstAncestorComponent, getInlineEditor, GetInlineEditor, getInlineStyleProperty, getLocatorByDomElement, getPagePosition, getPopupWindow, getReadyState, GetReadyState, GetRichResourceURL, getSubIdDomElement, GetSubIdDomElement, hideAllPopups, hidePopup, InitClass, initialize, isAbsoluteLocatorCacheable, isActive, isBusy, isComponentContainedByElement, isInActiveHeirarchy, isInlineSVGIcon, isPopupVisible, messageNotify, MessageNotify, messageShow, MessageShow, needsFocusTargetStyleClass, PopupClosed, processPushData, ProcessPushData, registerADSAccessibility, RegisterADSAccessibility, registerKeyStroke, replaceDomElement, ReplaceDomElement, resizeNotify, scrollIntoView, ScrollIntoView, setBusy, SetBusy, setInlineStyleProperty, showContextMenu, showPopup, simulateMouse, TruncateClientId, TruncateClientIdOnceImpl, UnbindFromComponent, unregisterKeyStroke, UpdateMessageType, visitChildren`

### Methods inherited from oracle.adf.view.js.base.AdfUIPeer
`getDefaultDragRecognizer, getParentPeer, Init, initiateDrag, isVisible`

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

### _childContainers

`private Object _childContainers`

### _isOverflowSupported

`private Object _isOverflowSupported`

### _isSingleTabstop

`private Object _isSingleTabstop`

### _overflowContainer

`private Object _overflowContainer`

## Constructor Detail

### AdfDhtmlToolbarPeer

`public AdfDhtmlToolbarPeer()`
  Peer Implementation for toolbar

## Method Detail

### _canMoveFocus

`private boolean _canMoveFocus()`
  Can we move focus, for roving tab index case.
  Return:
    `boolean` - can we move focus

### ChildVisibilityChanged

`protected Object ChildVisibilityChanged(Object childComponent,
Object childDomElement,
Object childVisible)`
  Called when the visibility of a child component changes if the peer has overridden `needsChildVisibilityChanges` to return `true`. The peer can use the child's component, domElement, and new visibility parameters to determine whether it needs to handle the visibility change rather than letting the default implementation of hiding or showing the child. If the peer will handle the change (often by marking itself as needing to be redrawn, it should perform whatever work is necessary and return `true` from this method.

  Overrides of this method should be aware that when this method is called, the child component's peer may no longer be bound to the child component (for example, if both the child and parent component peers are the same instance).

  Overrides of this method should use the childDomElement parameter to determine whether the passed in childComponent is actually a direct descendant of the parent component.

  Parameters:

    `childComponent` |  |
    `childDomElement` |  |
    `childVisible` |  |

  Return:
    `Object`
  Overrides:
    `AdfRichUIPeer.ChildVisibilityChanged(Object, Object, Object)`

### ComponentRemoved

`protected Object ComponentRemoved(AdfUIComponent component)`
  Handles the removal of a component.
  Parameters:

    `component` | - | The component that was removed.

  Return:
    `Object`
  Overrides:
    `AdfUIPeer.componentRemoved(AdfUIComponent)`

### _createOverflowElement

`private Object _createOverflowElement(Object element)`
  Create and return a single html overflow element for the provided element data.
  Parameters:

    `element` |  |

  Return:
    `Object`

### getDescendantComponents

`public AdfUIComponent getDescendantComponents(AdfUIComponent component,
Array<AdfUIComponent> children)`
  Returns an array of descendant (child) components for this component. Overwritten to include items in overflow as well.
  Parameters:

    `component` | - | this component
    `children` | - | array to store child components in. Descendent components will be added to the end of the array. This param is optional, if not passed in an array will be created.

  Return:
    `AdfUIComponent` - array of child components, may be empty
  Overrides:
    `AdfUIPeer.getDescendantComponents(AdfUIComponent, Array)`

### GetMinimumWidth

`protected Number GetMinimumWidth()`
  Returns the minimum width of a toolbar. Called by toolbox peer. NOTE: we might want to promote this method up to AdfRichUIPeer but holding off, since we want to be conservative about exposing new public APIs
  Return:
    `Number` - The minimum width.

### GetPreferredWidth

`protected Number GetPreferredWidth()`
  Calculates the preferred width of a toolbar. This is the width of the toolbar when it doesn't have overflow or stretching. This is used by the toolbox for overflowing purposes. NOTE: we might want to promote this method up to AdfRichUIPeer but holding off, since we want to be conservative about exposing new public APIs
  Return:
    `Number` - The preferred width.

### _getStretchElement

`private HTMLElement _getStretchElement()`
  Finds the DOM element for the stretched component.
  Return:
    `HTMLElement` - The element

### _handleArrowKeys

`private Object _handleArrowKeys(Object keyCode,
Object componentEvent)`
  Handler for arrow key events.
  Parameters:

    `keyCode` | - | the keyCode
    `componentEvent` | - | the component event

  Return:
    `Object`

### HandleComponentFocus

`protected Object HandleComponentFocus(Object componentEvent)`
  Handle component focus.
  Parameters:

    `componentEvent` | - | the component event invoked by focus

  Return:
    `Object`

### HandleComponentKeyDown

`protected Object HandleComponentKeyDown(Object componentEvent)`
  Component keyboard key down event handler
  Parameters:

    `componentEvent` | - | the component event invoked by key down

  Return:
    `Object`

### HandleComponentKeyPress

`protected Object HandleComponentKeyPress(Object componentEvent)`
  Component keyboard key press event handler
  Parameters:

    `componentEvent` | - | the component event invoked by key press

  Return:
    `Object`

### InitDomElement

`protected Object InitDomElement(Object component,
Object domElement)`
  Initialize the associated domElement when the peer is created. Stateless peers are not bound at the time that this method is called.
  Parameters:

    `component` |  |
    `domElement` |  |

  Return:
    `Object`
  Overrides:
    `AdfRichUIPeer.InitDomElement(AdfUIComponent, Object)`

### InitSubclass

`protected static Object InitSubclass()`
  Return:
    `Object`

### _moveFocus

`private static Object _moveFocus(Object currentFocusElement,
Object isPrevious)`
  Not invoking the focusNextTabStop/focusPreviousTabStop as it can move the focus to the document element. It is better to leave the focus within the toolbar, than to make the focus move to an unexpected element. This is especially the case within popup, where the TAB moves the focus within the popup.
  Parameters:

    `currentFocusElement` |  |
    `isPrevious` |  |

  Return:
    `Object`

### _moveHighlightToNextItem

`private Object _moveHighlightToNextItem(Object componentEvent)`
  Moves the highlight (selection) to the next (right) item.
  Parameters:

    `componentEvent` |  |

  Return:
    `Object`

### _moveHighlightToPreviousItem

`private Object _moveHighlightToPreviousItem(Object componentEvent)`
  Moves the highlight (selection) to the previous (left) item.
  Parameters:

    `componentEvent` |  |

  Return:
    `Object`

### needsChildVisibilityChanges

`public Object needsChildVisibilityChanges(Object component)`
  Test whether the peer wants to be notified if the visibility of one of its children changes. If a peer overrides this method to return `true`, the peer's `ChildVisibilityChanged` method will be called.

  The peer is not bound when this method is called. Peers with complicated logic to determine whether they need to be informed of child visibility changes should return `true` from this method and place their logic inside of their `ChildVisibilityChanged` override.

  Parameters:

    `component` |  |

  Return:
    `Object`
  Overrides:
    `AdfRichUIPeer.needsChildVisibilityChanges(AdfUIComponent)`

### needsResizeNotify

`public Object needsResizeNotify(Object component)`
  We need resize notification.
  Parameters:

    `component` |  |

  Return:
    `Object`
  Overrides:
    `AdfUIPeer.needsResizeNotify(Object)`

### __preferredSizeChangeNotify

`Object __preferredSizeChangeNotify(AdfUIComponent component)`
  Notification that the components internal preferred sizes have changed. This is needed for toolbars and toolboxes that used cached size values, and need to be notified when sizes change due to delayed image delivery. This is a temporary method and fix for bug 9035962, to be replaced by er 9491549 fix.
  Parameters:

    `component` | - | the associated component (not necessarily bound) identified as having a preferred size change.

  Return:
    `Object`

### resetActiveDescendant

`public Object resetActiveDescendant()`
  For a single tabstop toolbar, reset the active descendant to the first focusable child. This needs to occur when a child that was the active descendant enters a state (like disabled) where they no longer support focus.
  Return:
    `Object`

### ResizeNotify

`protected Object ResizeNotify(Object oldWidth,
Object oldHeight,
Object newWidth,
Object newHeight)`
  Resize notification callback - we perform geometry management here
  Parameters:

    `oldWidth` |  |
    `oldHeight` |  |
    `newWidth` |  |
    `newHeight` |  |

  Return:
    `Object`
  Overrides:
    `AdfUIPeer.resizeNotify(Object, Object, Object, Object, Object)`

### _reStretch

`private Object _reStretch()`
  If there is a stretch element in the toolbar, reapply it to it's maximum size
  Return:
    `Object`

### SimulateMouseOnDescendant

`protected Object SimulateMouseOnDescendant(AdfUIComponent targetComponent,
HTMLElement domElement,
Object mouseEvent)`
  Override to see if descendant is in overflow. If so, open overflow popup before the simulated mouse event is processed.
  Parameters:

    `targetComponent` | - | the component receiving the mouseEvent.
    `domElement` | - | the particular dom element receiving the mouseEvent
    `mouseEvent` | - | javascript object containing a sparse set of mouse event name value pairs.

  Return:
    `Object`
  Overrides:
    `AdfRichUIPeer.SimulateMouseOnDescendant(AdfUIComponent, HTMLElement, Object)`

### _unStretch

`private Object _unStretch()`
  If there is a stretch element in the toolbar, remove its assigned width.
  Return:
    `Object`

### _updateActiveDescendant

`private Object _updateActiveDescendant(HTMLElement newActiveDescendant)`
  Update the set active descendant to a new child element
  Parameters:

    `newActiveDescendant` | - | The new child element to set as the active descendant. Cannot be null.

  Return:
    `Object`

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.