OracleJavaScript API Reference for Oracle ADF Faces

 

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

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

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.AdfDhtmlMenuBarPeer

public class AdfDhtmlMenuBarPeer
extends AdfRichUIPeer
Peer Implementation for menu bar



Field Summary

private Object
_childContainers
private Object
_isOverflowSupported
private Object
_overflowContainer
private static Object
_sOpenedPopups


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
AdfDhtmlMenuBarPeer()
Peer Implementation for menu bar


Method Summary

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.
private Object
_closeAllPopups()
when using menuModel, this function just closes all the open popups
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.
private Object
_createPopupHints(Object alignElement, Object eventSource, Object focusOnFirstElement)
when using menuModel, create hints for the popup
private Object
_dismissPopups(Object eventSource)
when using menuModel, dismisses the popups that do not come in the current event source opened popup tree
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 menuBar.
private HTMLElement
_getPopupContainerElement(Object component)
when using menuModel, finds the DOM element of the cell containing the popup
private HTMLElement
_getPopupElement(Object componentEvent)
when using menuModel, finds the DOM element for the popup
protected Number
GetPreferredWidth()
Calculates the preferred width of the menuBar.
private HTMLElement
_getStretchElement()
Finds the DOM element for the stretched component.
private Object
_handleArrowKeys(Object keyCode, Object componentEvent)
Handler for left/right arrow key events.
private Object
_handleArrowKeysForMenuModel(Object keyCode, Object componentEvent)
when using menuModel, handles the arrow keys events
protected Object
HandleComponentBlur(Object componentEvent)
As of now it handles blur only when menuModel is there
protected Object
HandleComponentClick(Object componentEvent)
As of now it handles click only when menuModel is there
protected Object
HandleComponentFocus(Object componentEvent)
As of now it handles focus only when menuModel is there
protected Object
HandleComponentKeyDown(Object componentEvent)
Component keyboard key down event handler
protected Object
HandleComponentKeyPress(Object componentEvent)
Component keyboard key press event handler
protected Object
HandleComponentKeyUp(Object componentEvent)
Component keyboard key up event handler.
protected Object
HandleComponentMouseOut(Object componentEvent)
As of now it handles mouseOver event only when menuModel is there
protected Object
HandleComponentMouseOver(Object componentEvent)
As of now it handles mouseOver event only when menuModel is there
private static Object
_handleMenuBarItemAccessKeys(Object component, Object componentEvent)
Handle menu bar item access keys A root level (on the menuBar) commandMenuItem or menu may have an access key assigned.
protected Object
InitDomElement(Object component, Object domElement)
Initialize the associated domElement when the peer is created.
protected static Object
InitSubclass()
private Object
_isInOpenedTree(Object navComponent, Object eventSource)
private Object
_isPopupOpen(Object componentId)
private Object
_moveHighlightToNextBarItem(Object componentEvent)
Moves the highlight (selection) to the next (right) bar item.
private Object
_moveHighlightToPreviousBarItem(Object componentEvent)
Moves the highlight (selection) to the previous (left) bar 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.
protected Object
PopupClosed(Object component, Object contentDom, Object popupId)
Called from framework when a popup is closed.
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 menuBar, reapply it to it's maximum size
private Object
_showPopup(Object componentEvent, Object focusOnFirstElement)
when using menuModel, shows the popup for the commandNavigationItem which caused the event
private Object
_unStretch()
If there is a stretch element in the menuBar, remove its assigned width.
public Object
updateScrollIconsState()
MenuBar (as apposed to Menu) does not have scroll icons, so calls to this method (which originate from MenuBar overflow) are ignored.


Methods inherited from oracle.adf.view.js.laf.rich.AdfRichUIPeer

addComponentEventHandlers, addComponentPropertyChanges, addComponentPropertyGetters, addDomEventHandlers, addEventHandlerToDomInstance, addSuppressedPPRAttributes, bind, BindToComponent, cancelAllPopups, cancelPopup, ComponentInlineStyleChanged, ComponentPropertyChanged, componentRemoved, ComponentStyleClassChanged, ComponentVisibleChanged, ConvertClientIdToLocator, convertLocatorToClientId, CreateDraggableNode, createPeerClass, createSubId, CreateSubId, DefaultInitClass, descendantMessageChanged, DescendantMessageChanged, DispatchComponentEvent, domReplaceNotify, DomReplaceNotify, focus, Focus, getAbsoluteId, getAbsoluteLocator, getAccessibleName, GetAccessibleName, getAllPopups, getComponent, GetComponent, GetComponentId, getComponentParent, getComponentProperty, GetComponentVisible, 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, needsFocusTargetStyleClass, 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


_childContainers

private Object _childContainers

_isOverflowSupported

private Object _isOverflowSupported

_overflowContainer

private Object _overflowContainer

_sOpenedPopups

private static Object _sOpenedPopups

Constructor Detail


AdfDhtmlMenuBarPeer

public AdfDhtmlMenuBarPeer()

Peer Implementation for menu bar

Method Detail


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)

_closeAllPopups

private Object _closeAllPopups()

when using menuModel, this function just closes all the open popups

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)

_createOverflowElement

private Object _createOverflowElement(Object element)

Create and return a single html overflow element for the provided element data.

Parameters:
element    
Return:
Object

_createPopupHints

private Object _createPopupHints(Object alignElement,
                                 Object eventSource,
                                 Object focusOnFirstElement)

when using menuModel, create hints for the popup

Parameters:
alignElement  -  the HTML element to which popup is aligned
eventSource  -  the source of event
focusOnFirstElement    
Return:
Object - hints for the popup

_dismissPopups

private Object _dismissPopups(Object eventSource)

when using menuModel, dismisses the popups that do not come in the current event source opened popup tree

Parameters:
eventSource  -  the source of event
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<AdfUIComponent>)

GetMinimumWidth

protected Number GetMinimumWidth()

Returns the minimum width of a menuBar. Called by toolbox peer.

Return:
Number - The minimum width.

_getPopupContainerElement

private HTMLElement _getPopupContainerElement(Object component)

when using menuModel, finds the DOM element of the cell containing the popup

Parameters:
component  -  the navigation component used in menuModel implementation
Return:
HTMLElement - The element

_getPopupElement

private HTMLElement _getPopupElement(Object componentEvent)

when using menuModel, finds the DOM element for the popup

Parameters:
componentEvent    
Return:
HTMLElement - The element

GetPreferredWidth

protected Number GetPreferredWidth()

Calculates the preferred width of the menuBar. This is the width of the menuBar when it doesn't have overflow or stretching. This is used by the toolbox for overflowing purposes.

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 left/right arrow key events.

Parameters:
keyCode    
componentEvent    
Return:
Object

_handleArrowKeysForMenuModel

private Object _handleArrowKeysForMenuModel(Object keyCode,
                                            Object componentEvent)

when using menuModel, handles the arrow keys events

Parameters:
keyCode  -  the keyCode
componentEvent  -  the component event
Return:
Object

HandleComponentBlur

protected Object HandleComponentBlur(Object componentEvent)

As of now it handles blur only when menuModel is there

Parameters:
componentEvent    
Return:
Object

HandleComponentClick

protected Object HandleComponentClick(Object componentEvent)

As of now it handles click only when menuModel is there

Parameters:
componentEvent    
Return:
Object

HandleComponentFocus

protected Object HandleComponentFocus(Object componentEvent)

As of now it handles focus only when menuModel is there

Parameters:
componentEvent    
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

HandleComponentKeyUp

protected Object HandleComponentKeyUp(Object componentEvent)

Component keyboard key up event handler.

Parameters:
componentEvent  -  the component event invoked by key up
Return:
Object

HandleComponentMouseOut

protected Object HandleComponentMouseOut(Object componentEvent)

As of now it handles mouseOver event only when menuModel is there

Parameters:
componentEvent    
Return:
Object

HandleComponentMouseOver

protected Object HandleComponentMouseOver(Object componentEvent)

As of now it handles mouseOver event only when menuModel is there

Parameters:
componentEvent    
Return:
Object

_handleMenuBarItemAccessKeys

private static Object _handleMenuBarItemAccessKeys(Object component,
                                                   Object componentEvent)

Handle menu bar item access keys A root level (on the menuBar) commandMenuItem or menu may have an access key assigned. The way menu-type access keys work is that while your focus is in a menu or menuBar, a press of an access key (without any of the normal modifiers like shift-alt) will bring focus to that menu/menuBar item. This method checks its children for an access key match and handles it.

Parameters:
component  -  the menuBar component
componentEvent  -  the key up component event
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

_isInOpenedTree

private Object _isInOpenedTree(Object navComponent,
                               Object eventSource)

Parameters:
navComponent  -  commandNavigationItem whose corresponding popup is open
eventSource  -  the source of event Returns true if the popup falls inside the current event source component hierarchy
Return:
Object

_isPopupOpen

private Object _isPopupOpen(Object componentId)

Parameters:
componentId  -  the clientId of a component Returns true if the popup corresponding to "componentId" is open
Return:
Object

_moveHighlightToNextBarItem

private Object _moveHighlightToNextBarItem(Object componentEvent)

Moves the highlight (selection) to the next (right) bar item.

Parameters:
componentEvent    
Return:
Object

_moveHighlightToPreviousBarItem

private Object _moveHighlightToPreviousBarItem(Object componentEvent)

Moves the highlight (selection) to the previous (left) bar 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)

PopupClosed

protected Object PopupClosed(Object component,
                             Object contentDom,
                             Object popupId)

Called from framework when a popup is closed. When using menuModel, this method moves the dom from the popup back into the associated commandNavigationItem div element so that it can be cleaned up on a PPR.

Parameters:
component    
contentDom    
popupId    
Return:
Object
Overrides:
AdfRichUIPeer.PopupClosed(AdfUIComponent, HTMLElement, String)

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 menuBar, reapply it to it's maximum size

Return:
Object

_showPopup

private Object _showPopup(Object componentEvent,
                          Object focusOnFirstElement)

when using menuModel, shows the popup for the commandNavigationItem which caused the event

Parameters:
componentEvent  -  the component event
focusOnFirstElement    
Return:
Object

_unStretch

private Object _unStretch()

If there is a stretch element in the menuBar, remove its assigned width.

Return:
Object

updateScrollIconsState

public Object updateScrollIconsState()

MenuBar (as apposed to Menu) does not have scroll icons, so calls to this method (which originate from MenuBar overflow) are ignored.

Return:
Object

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

 

Generated on 2011.08.31 02:41 UTC
Copyright (c) 1998, 2011, Oracle and/or its affiliates. All rights reserved.