OracleJavaScript API Reference for Oracle ADF Faces

 

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

oracle.adfinternal.view.js.laf.dhtml.rich
Class AdfDhtmlToolboxPeer

Warning:

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, DISABLED_STYLECLASS, DRAG_SOURCE_STYLECLASS, DROP_TARGET_STYLECLASS, FOCUS_TARGET_STYLECLASS, HOVER_TARGET_STYLECLASS, READONLY_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.
public Object
needsResizeNotify(Object component)
Tests whether the peer requires resize notification.
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)
Called to notify the peer of resize activity.
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, bind, BindToComponent, cancelAllPopups, cancelPopup, ChildVisibilityChanged, ComponentInlineStyleChanged, ComponentPropertyChanged, componentRemoved, ComponentStyleClassChanged, ComponentVisibleChanged, ConvertClientIdToLocator, convertLocatorToClientId, CreateDraggableNode, createPeerClass, createSubId, CreateSubId, DefaultInitClass, DispatchComponentEvent, domReplaceNotify, DomReplaceNotify, focus, Focus, getAbsoluteId, getAbsoluteLocator, getAccessibleName, GetAccessibleName, getAllPopups, getComponent, GetComponent, GetComponentId, getComponentParent, getComponentProperty, GetComponentVisible, getDescendantComponents, getDomContentElement, getDomContentElementForComponent, GetDomContentElementForNode, getDomDocument, getDomElement, getDomElementForComponent, getDomNode, GetDomNodeForCommentComponent, getDomNodeForComponent, getDragOverFeedback, GetDragOverFeedback, getDragTransferable, GetDragTransferable, getFirstAncestorComponent, getInlineEditor, GetInlineEditor, getInlineStyleProperty, getLocatorByDomElement, getPagePosition, getPopupWindow, getReadyState, GetReadyState, GetRichResourceURL, getSubIdDomElement, GetSubIdDomElement, hideAllPopups, hidePopup, Init, InitClass, initialize, isActive, isInActiveHeirarchy, isPopupVisible, messageNotify, MessageNotify, messageShow, MessageShow, needsChildVisibilityChanges, PopupClosed, processPushData, ProcessPushData, registerKeyStroke, replaceDomElement, ReplaceDomElement, resizeNotify, scrollIntoView, ScrollIntoView, setBusy, SetBusy, setInlineStyleProperty, showContextMenu, showPopup, TruncateClientId, TruncateClientIdOnceImpl, UnbindFromComponent, unregisterKeyStroke, visitChildren


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

getDefaultDragRecognizer, getParentPeer, initiateDrag, isVisible


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

adopt, clone, createCallback, createInitializedObject, createSubclass, ensureClassInitialization, equals, 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

needsResizeNotify

public Object needsResizeNotify(Object component)

Tests whether the peer requires resize notification. Peers which perform geometry management should override this to return true. When true, resizeNotify() will be called when browser window is resized.

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)

Called to notify the peer of resize activity. Only called if peer overrides needsResizeNotify() to return true.

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

 

Generated on 2010.12.10 19:37 UTC
Copyright (c) 1998, 2011, Oracle and/or its affiliates. All rights reserved.