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

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

    public class AdfDhtmlToolboxPeer
    extends AdfRichUIPeer

Peer Implementation for the toolbox

## Field Summary

### 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` | `AdfDhtmlToolboxPeer()` Peer Implementation for the toolbox

## Method Summary
`private Object` | `_areRowsValid()` Returns true if we already have valid cached row values.
`protected Object` | `ComponentRemoved(AdfUIComponent component)` Handles the removal of a component.
`private Object` | `_getPadding(Object element)` Helper method to get the left/right outer padding and margin for an element
`private Object` | `_getRowInfo(Object rowElement)` Returns information for all toolbars in a row for later use.
`protected Object` | `InitDomElement(Object component, Object domElement)` Initialize the associated domElement when the peer is created.
`private Object` | `_initRows()` Collects information on each row in the toolbox and saves this off in a private variable.
`protected static Object` | `InitSubclass()`
`public Object` | `needsResizeNotify(Object component)` Overriden to indicate interest in resize notifications
`private Object` | `_overflowChildren(Object row, Number newRowWidth, Number spaceToRemove)` Set the toolbar sizes for the toolbars in the toolbox row.
`Object` | `__preferredSizeChangeNotify(AdfUIComponent component)` Notification that the components internal preferred sizes have changed.
`protected Object` | `ResizeNotify(Object oldWidth, Object oldHeight, Object newWidth, Object newHeight)` Resize notification callback - we perform geometry management here
`private Object` | `_stretchChildren(Object row, Number newRowWidth, Number bonusSpace)` Increases toolbar sizes to fill up bonus space.

### Methods inherited from oracle.adf.view.js.laf.rich.AdfRichUIPeer
`addComponentEventHandlers, addComponentPropertyChanges, addComponentPropertyGetters, addDomEventHandlers, addEventHandlerToDomInstance, addSuppressedPPRAttributes, applyDragReadyState, ApplyDragReadyState, applyDragSourceState, ApplyDragSourceState, bind, BindToComponent, cancelAllPopups, cancelPopup, ChildVisibilityChanged, 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, getDescendantComponents, 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, needsChildVisibilityChanges, needsFocusTargetStyleClass, PopupClosed, processPushData, ProcessPushData, registerADSAccessibility, RegisterADSAccessibility, registerKeyStroke, replaceDomElement, ReplaceDomElement, resizeNotify, scrollIntoView, ScrollIntoView, setBusy, SetBusy, setInlineStyleProperty, showContextMenu, showPopup, simulateMouse, SimulateMouseOnDescendant, 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

## Constructor Detail

### AdfDhtmlToolboxPeer

`public AdfDhtmlToolboxPeer()`
  Peer Implementation for the toolbox

## Method Detail

### _areRowsValid

`private Object _areRowsValid()`
  Returns true if we already have valid cached row values.
  Return:
    `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)`

### _getPadding

`private Object _getPadding(Object element)`
  Helper method to get the left/right outer padding and margin for an element
  Parameters:

    `element` |  |

  Return:
    `Object`

### _getRowInfo

`private Object _getRowInfo(Object rowElement)`
  Returns information for all toolbars in a row for later use.
  Parameters:

    `rowElement` |  |

  Return:
    `Object` - JavaScript object that contains the following: 1) Array of Child Peers for this row 2) Total Width of the row (not including border sizes) 3) Fixed Width of the row 4) Total Flex for this row

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

### _initRows

`private Object _initRows()`
  Collects information on each row in the toolbox and saves this off in a private variable.
  Return:
    `Object`

### InitSubclass

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

### needsResizeNotify

`public Object needsResizeNotify(Object component)`
  Overriden to indicate interest in resize notifications
  Parameters:

    `component` |  |

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

### _overflowChildren

`private Object _overflowChildren(Object row,
Number newRowWidth,
Number spaceToRemove)`
  Set the toolbar sizes for the toolbars in the toolbox row. The algorithm for overflow is to go from right to left. Meaning take the right most toolbar and try to have it overflow first. If there is still space that needs to be removed it moves to the next toolbar to its left and repeats until the space to be removed has been accounteded for. This is done by taking the preferred width of the toolbar and subtracting all the space to be removed (spaceRemoved). IF the resulting space is less then the minimum width for this toolbar (which is the size of the overflow icon) then the toolbar width is set to the minimum. The toolbar logic is then responsible for filling the overflow popup component based on the width value provided by the toolbox. Next the spaceRemoved is decreased by the amount the toolbar use to consume minus the minimum width. The same process is started again with the next toolbar to the left. ELSE In the case where the preferred width minus the spaceRemoved is greater then the minimum width of the toolbar then we use the new dimension and set the toolbar width to this value. The toolbar is responsable for determining what elements need to go into the overflow.
  Parameters:

    `row` |  |
    `newRowWidth` | - | the new row width of the toolbox row
    `spaceToRemove` | - | is a positive integer value used to remove space from each toolbar in this toolbox row.

  Return:
    `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`

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

### _stretchChildren

`private Object _stretchChildren(Object row,
Number newRowWidth,
Number bonusSpace)`
  Increases toolbar sizes to fill up bonus space. This method will do two potential updates for the toolbar element. 1) it will try to provide the toolbar peer with all the space it requires to prevent it from overflowing. 2) Distribute space to each toolbar in this row that has a flex value that is not zero. For peers that are not toolbars the only action is to set the parent width (a TD) to the width of the peer to prevent the browser from allocating extra space for the TD. Example of none toolbars is things like menu's which can be directly added to the toolbox without surrounding it in a toolbar.
  Parameters:

    `row` |  |
    `newRowWidth` | - | the new row width of the toolbox row
    `bonusSpace` | - | is a positive integer value used to distribute extra space.

  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.