OracleJavaScript API Reference for Oracle ADF Faces

 

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

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

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

public class AdfDhtmlMenuPeer
extends AdfRichUIPeer
Peer Implementation for menu



Field Summary

private Object
_enterKeyDown
private static Object
_focusDetachedMenuKeyStroke
private Object
_isDetached
private static Object
_JUMP_SCROLL_DELTA
private Object
_maxDisplayItems
private static Object
_menuBarKeyStroke
private static Object
_OPEN_CLOSE_DELAY
private static Object
_sBarMenus
private static Object
_SCROLL_DELTA
private static Object
_sDetachedMenus


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


Method Summary

private static Object
_addBarMenu(String clientId)
Registers this menu as a menu directly in a menuBar
private static Object
_addToDetachedMenus(String clientId)
Adds the clientid to the list of detached menu's.
private Object
_calculateReattachPosition()
Returns position where detached menu should reattach.
private Object
_cancelHiding()
Cancels closing of the popup, if scheduled.
private static Object
_cancelKeyPress(Event event)
Callback for cancelling the key press on the document in firefox.
public Object
cancelPopup()
Override of AdfRichUIPeer#cancelPopup so we can do our own special processing.
public static Object
cancelShowing()
If a popup was delayed for showing, this method will cancel the showing.
private Object
_clearHighlight()
public Object
close(Object immediate, Object keepSelectedStyle)
Closes this peer's menu.
private Object
_closeDetachedMenu(Object event)
Close a detached menu.
protected Object
ComponentDisabledChanged(Object component, Object domElement, Object newValue, Object oldValue)
Setter for disabled property
protected Object
ComponentRemoved(Object component)
Handles the removal of a component.
protected Object
ComponentTextChanged(Object component, Object domElement, Object newValue, Object oldValue)
Text property change handler, needed for inline editing.
private Object
_contains(Object element)
Checks if the given element is in this component.
private Object
_createDetachableWindow()
Creates a detachable window for the component.
private Object
_createMenuPopupHints(Object baseHints, Object focusOnFirstElement)
Given a base set of popup hints, create popup hints for the menu
private Object
_delayPopupHiding(Object deltaTimeout)
Delays the hiding of the popup, so users can move over other menu-items.
private Object
_delayPopupHidingCallback()
Callback for the delaying of hide().
private Object
_delayShow()
Delays the showing of the popup.
private Object
_delayShowCallback()
Callback for the delaying of show().
private Object
_deselectElement()
Remove all highlighting from the menu.
private Object
_dragEnd()
Callback that is called on the drag end off a floating submenu
private Object
_dragStart()
Callback that is called on the drag start off a floating submenu
private Object
_endScroll()
Stops the scrolling of the menu
private static Object
_focusFirstElementInMenuBar()
Focuses the first element in a menuBar.
private static Object
_focusNextDetachedMenuKeyHandler()
Key handler call that focuses on the next detached menu (if available).
private Object
_getDepth()
Gets the menu depth
protected Object
GetInlineEditor(Object event)
Overwriten hook from AdfRichUIPeer.
private Object
_getLazyState()
private Object
_getMenuElement()
Gets the (sub)menu-element.
private Object
_getMenuItemHeight()
Get the menu item height, which is used for scrolling.
private Object
_getMenuPopup()
Get the menu's popup window.
private Object
_getParentId()
Gets the the id of the first parentNode having an id.
private Object
_getShadowAnchor()
Get the shadow anchor for the menu.
private Object
_handleArrowKeys(Object keyCode, Object componentEvent)
Handler for arrow key events.
protected Object
HandleComponentBlur(Object componentEvent)
Menus lose highlight on blur.
protected Object
HandleComponentClick(Object componentEvent)
protected Object
HandleComponentFocus(Object componentEvent)
Handle component focus.
private Object
_handleComponentFocusRootMenu()
When a root menu gets focus, there are 3 outcomes:
private Object
_handleComponentFocusSubMenu()
When a sub menu gets focus, we highlight the submenu and close any open menus that have a greater depth than the submenu.
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
HandleComponentMouseDown(Object componentEvent)
protected Object
HandleComponentMouseOut(Object componentEvent)
protected Object
HandleComponentMouseOver(Object componentEvent)
protected Object
HandleComponentMouseUp(Object componentEvent)
private Boolean
_handleHideRequest(AdfUIComponent component, String clientId)
Common handling for both 'hidePopup' and 'cancelPopup' requests.
private static Object
_handleMenuItemAccessKeys(Object containerElement, Object componentEvent)
Handle menu item access keys.
private Object
_hideFetchingDataPopup()
Hides the fetching data message used during lazy content retrieval
public Object
hidePopup()
Override of AdfRichUIPeer#hidePopup so we can do our own special processing.
protected Object
Init(Object component)
Initializes the instance.
protected Object
InitDomElement(Object component, Object domElement)
Initialize the associated domElement when the peer is created.
private Object
_initElements(Object component, Object clientId, Object menuElement)
protected static Object
InitSubclass()
public Object
isContextMenu()
Returns true if this is a context type menu (a menu in a popup).
public Object
isDetached()
Returns true if menu is detached.
private Object
_isDisabled()
Returns if the component is disabled or not
private Object
_isMenuVisible()
Returns true if the menu popup is currently visible (open).
public Object
isRootMenu()
Returns true if this is a root level menu (a first level menu)
private Object
_isSubMenu()
Returns true if this is a submenu (i.e., a vertical menu).
private Object
_makeDetached()
Changes the state of the popupMenu to the detached state.
private static Object
_menuBarKeyHandler(Event event)
Handler that focuses the first item in a menuBar if Ctrl+Shift+M is pressed.
private Object
_moveDetachable(Object x, Object y)
Moves the floating submenu (used for moving floating submenu with keyboard)
private Object
_moveShadow(Object showShadow)
Move the menu shadow.
private Object
_onHandleClick(Object event)
Handler for click on detachable menu handle.
protected Object
PopupClosed(Object component, Object contentDom, Object popupId)
Moves the menu from the popup back into root element so that it can be cleaned up on a PPR
private Object
_reattachMenu()
If the menu is currently detached, temporarily reattachs the menu.
private static Object
_redetachMenu()
Detached menus are temporarily reattached when they are selected from their parent menu.
private static Object
_removeBarMenu(String clientId)
Unregisters this menu as a menu directly in a menuBar
private static Object
_removeFromDetachedMenus(String clientId)
Removes the clientid from the list of detached menu's.
protected Object
ReplaceDomElement(HTMLElement newElement, HTMLElement oldElement)
Replaces the a dom element contained in this peer.
private Object
_scroll()
Callback which gets called in an interval when the menu is scrolling
private Object
_setLazyState(Object newState)
public Object
setVisibleItems(Object items)
Sets the _maxDisplayItems property.
public Object
show(Object popupHints, Object focusOnFirstElement)
Shows the menu.
private Object
_showFetchingDataPopup()
Shows fetching data message used during lazy content retrieval.
public Object
showPopup(Object component, Object element, Object hints, Object popupId)
Shows the menu popup.
private Object
_showShadow(Object showShadow)
Show or hide the menu shadow.
private Object
_snapDetachedMenu(Object reattachPosition)
Animates a detached submenu back to its default position.
private Object
_startScroll(Object isScrollDown, Object isTimerSkipped)
Starts the scrolling of a scrollable menu.
public Object
updateScrollIconsState()
Adjusts the state of the scrollUp and scrollDown buttons based on whether or not there is space to scroll in that direction.


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

addComponentEventHandlers, addComponentPropertyChanges, addComponentPropertyGetters, addDomEventHandlers, addEventHandlerToDomInstance, addSuppressedPPRAttributes, bind, BindToComponent, cancelAllPopups, 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, getInlineStyleProperty, getLocatorByDomElement, getPagePosition, getPopupWindow, getReadyState, GetReadyState, GetRichResourceURL, getSubIdDomElement, GetSubIdDomElement, hideAllPopups, InitClass, initialize, isActive, isInActiveHeirarchy, isPopupVisible, messageNotify, MessageNotify, messageShow, MessageShow, needsChildVisibilityChanges, processPushData, ProcessPushData, registerKeyStroke, replaceDomElement, resizeNotify, ResizeNotify, scrollIntoView, ScrollIntoView, setBusy, SetBusy, setInlineStyleProperty, showContextMenu, TruncateClientId, TruncateClientIdOnceImpl, UnbindFromComponent, unregisterKeyStroke, visitChildren


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

getDefaultDragRecognizer, getParentPeer, initiateDrag, isVisible, needsResizeNotify


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

adopt, clone, createCallback, createInitializedObject, createSubclass, ensureClassInitialization, equals, getClass, GetLazyArrayProperty, GetLazyMapProperty, getTypeName, toDebugString, toString


Field Detail


_enterKeyDown

private Object _enterKeyDown

_focusDetachedMenuKeyStroke

private static Object _focusDetachedMenuKeyStroke

_isDetached

private Object _isDetached

_JUMP_SCROLL_DELTA

private static Object _JUMP_SCROLL_DELTA

_maxDisplayItems

private Object _maxDisplayItems

_menuBarKeyStroke

private static Object _menuBarKeyStroke

_OPEN_CLOSE_DELAY

private static Object _OPEN_CLOSE_DELAY

_sBarMenus

private static Object _sBarMenus

_SCROLL_DELTA

private static Object _SCROLL_DELTA

_sDetachedMenus

private static Object _sDetachedMenus

Constructor Detail


AdfDhtmlMenuPeer

public AdfDhtmlMenuPeer()

Peer Implementation for menu

Method Detail


_addBarMenu

private static Object _addBarMenu(String clientId)

Registers this menu as a menu directly in a menuBar

Parameters:
clientId  -  The clientId of the menu.
Return:
Object

_addToDetachedMenus

private static Object _addToDetachedMenus(String clientId)

Adds the clientid to the list of detached menu's.

Parameters:
clientId  -  The clientId to add
Return:
Object

_calculateReattachPosition

private Object _calculateReattachPosition()

Returns position where detached menu should reattach.

Return:
Object - the reattach position (with [x] and [y] values)

_cancelHiding

private Object _cancelHiding()

Cancels closing of the popup, if scheduled.

Return:
Object

_cancelKeyPress

private static Object _cancelKeyPress(Event event)

Callback for cancelling the key press on the document in firefox. This is needed to catch the Ctrl-Shift-W for cycling through detached menus, when the focus is not somewhere on the page. Otherwise firefox closes the window and that is probably not what the user wanted.

Parameters:
event  -  The event
Return:
Object

cancelPopup

public Object cancelPopup()

Override of AdfRichUIPeer#cancelPopup so we can do our own special processing. This method is called by the AdfAutoDismissalManager when focus is lost. Normal menus are hidden, but detached menus are not - they are only closed if escape is pressed when focus is in the detached menu or the x close button is pressed.

Return:
Object
Overrides:
AdfRichUIPeer.cancelPopup(AdfUIComponent, String)

cancelShowing

public static Object cancelShowing()

If a popup was delayed for showing, this method will cancel the showing. This method is also called by AdfDhtmlCommandMenuItemPeer.

Return:
Object

_clearHighlight

private Object _clearHighlight()

Return:
Object

close

public Object close(Object immediate,
                    Object keepSelectedStyle)

Closes this peer's menu. This method is also called by AdfDhtmlCommandMenuItemPeer.

Parameters:
immediate    
keepSelectedStyle    
Return:
Object

_closeDetachedMenu

private Object _closeDetachedMenu(Object event)

Close a detached menu.

Parameters:
event    
Return:
Object

ComponentDisabledChanged

protected Object ComponentDisabledChanged(Object component,
                                          Object domElement,
                                          Object newValue,
                                          Object oldValue)

Setter for disabled property

Parameters:
component    
domElement    
newValue    
oldValue    
Return:
Object

ComponentRemoved

protected Object ComponentRemoved(Object component)

Handles the removal of a component.

Parameters:
component    
Return:
Object
Overrides:
AdfUIPeer.componentRemoved(AdfUIComponent)

ComponentTextChanged

protected Object ComponentTextChanged(Object component,
                                      Object domElement,
                                      Object newValue,
                                      Object oldValue)

Text property change handler, needed for inline editing.

Parameters:
component    
domElement    
newValue    
oldValue    
Return:
Object

_contains

private Object _contains(Object element)

Checks if the given element is in this component.

Parameters:
element    
Return:
Object - true if the given element is contained in this component.

_createDetachableWindow

private Object _createDetachableWindow()

Creates a detachable window for the component.

Return:
Object

_createMenuPopupHints

private Object _createMenuPopupHints(Object baseHints,
                                     Object focusOnFirstElement)

Given a base set of popup hints, create popup hints for the menu

Parameters:
baseHints  -  [optional] a set of popup hints (see AdfDhtmlPopupWindow). Can be null.
focusOnFirstElement  -  if true then also focus on the first element (done for keyboard launch)
Return:
Object - hints for menu popup

_delayPopupHiding

private Object _delayPopupHiding(Object deltaTimeout)

Delays the hiding of the popup, so users can move over other menu-items.

Parameters:
deltaTimeout  -  This will be substracted from the programmed timeout, it should be a very small number. This is done to make sure the events are fired in the correct order. The larger the number, the sooner it will fire.
Return:
Object

_delayPopupHidingCallback

private Object _delayPopupHidingCallback()

Callback for the delaying of hide().

Return:
Object

_delayShow

private Object _delayShow()

Delays the showing of the popup.

Return:
Object

_delayShowCallback

private Object _delayShowCallback()

Callback for the delaying of show().

Return:
Object

_deselectElement

private Object _deselectElement()

Remove all highlighting from the menu.

Return:
Object

_dragEnd

private Object _dragEnd()

Callback that is called on the drag end off a floating submenu

Return:
Object

_dragStart

private Object _dragStart()

Callback that is called on the drag start off a floating submenu

Return:
Object

_endScroll

private Object _endScroll()

Stops the scrolling of the menu

Return:
Object

_focusFirstElementInMenuBar

private static Object _focusFirstElementInMenuBar()

Focuses the first element in a menuBar.

Return:
Object

_focusNextDetachedMenuKeyHandler

private static Object _focusNextDetachedMenuKeyHandler()

Key handler call that focuses on the next detached menu (if available).

Return:
Object

_getDepth

private Object _getDepth()

Gets the menu depth

Return:
Object

GetInlineEditor

protected Object GetInlineEditor(Object event)

Overwriten hook from AdfRichUIPeer.

Parameters:
event    
Return:
Object
Overrides:
AdfRichUIPeer.getInlineEditor(AdfUIComponent, Object)

_getLazyState

private Object _getLazyState()

Return:
Object

_getMenuElement

private Object _getMenuElement()

Gets the (sub)menu-element. Returns null if menu is not present (due to contentDelivery='lazy').

Return:
Object

_getMenuItemHeight

private Object _getMenuItemHeight()

Get the menu item height, which is used for scrolling. Uses lazy initialization.

Return:
Object

_getMenuPopup

private Object _getMenuPopup()

Get the menu's popup window. Returns null if menu is not currently open.

Return:
Object

_getParentId

private Object _getParentId()

Gets the the id of the first parentNode having an id.

Return:
Object

_getShadowAnchor

private Object _getShadowAnchor()

Get the shadow anchor for the menu. May return null.

Return:
Object - shadow anchor

_handleArrowKeys

private Object _handleArrowKeys(Object keyCode,
                                Object componentEvent)

Handler for arrow key events.

Parameters:
keyCode    
componentEvent    
Return:
Object

HandleComponentBlur

protected Object HandleComponentBlur(Object componentEvent)

Menus lose highlight on blur. Open and detached menus, however, remain in their depressed state.

Parameters:
componentEvent    
Return:
Object

HandleComponentClick

protected Object HandleComponentClick(Object componentEvent)

Parameters:
componentEvent    
Return:
Object

HandleComponentFocus

protected Object HandleComponentFocus(Object componentEvent)

Handle component focus.

Parameters:
componentEvent    
Return:
Object

_handleComponentFocusRootMenu

private Object _handleComponentFocusRootMenu()

When a root menu gets focus, there are 3 outcomes: If there are already open menus, but they are on a different menu bar, then the menu does not open and is not highlighted If there are no other open menus on the page, then the menu is highlighted but does not open If there are already open menus on the same menuBar, then the menu is depressed and opened

Return:
Object

_handleComponentFocusSubMenu

private Object _handleComponentFocusSubMenu()

When a sub menu gets focus, we highlight the submenu and close any open menus that have a greater depth than the submenu. If the menu received focus due to the mouse, we then do a delay show (show the submenu if the mouse stays put for a fraction of a second).

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

HandleComponentMouseDown

protected Object HandleComponentMouseDown(Object componentEvent)

Parameters:
componentEvent    
Return:
Object

HandleComponentMouseOut

protected Object HandleComponentMouseOut(Object componentEvent)

Parameters:
componentEvent    
Return:
Object

HandleComponentMouseOver

protected Object HandleComponentMouseOver(Object componentEvent)

Parameters:
componentEvent    
Return:
Object

HandleComponentMouseUp

protected Object HandleComponentMouseUp(Object componentEvent)

Parameters:
componentEvent    
Return:
Object

_handleHideRequest

private Boolean _handleHideRequest(AdfUIComponent component,
                                   String clientId)

Common handling for both 'hidePopup' and 'cancelPopup' requests.

Parameters:
component  -  showing a menu
clientId  -  id of the menu
Return:
Boolean - returns true if menu should really be hidden
See also:
hidePopup()
cancelPopup()

_handleMenuItemAccessKeys

private static Object _handleMenuItemAccessKeys(Object containerElement,
                                                Object componentEvent)

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

Parameters:
containerElement  -  the menu child container element
componentEvent  -  the key up component event
Return:
Object

_hideFetchingDataPopup

private Object _hideFetchingDataPopup()

Hides the fetching data message used during lazy content retrieval

Return:
Object

hidePopup

public Object hidePopup()

Override of AdfRichUIPeer#hidePopup so we can do our own special processing. Normal menus are hidden, but detached menus are not - they are only closed if escape is pressed when focus is in the detached menu or the x close button is pressed.

Return:
Object
Overrides:
AdfRichUIPeer.hidePopup(AdfUIComponent, String)

Init

protected Object Init(Object component)

Initializes the instance. Subclasses of AdfObject must call their superclass' Init

Parameters:
component    
Return:
Object
Overrides:
AdfObject.Init()

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)

_initElements

private Object _initElements(Object component,
                             Object clientId,
                             Object menuElement)

Parameters:
component    
clientId    
menuElement    
Return:
Object

InitSubclass

protected static Object InitSubclass()

Return:
Object

isContextMenu

public Object isContextMenu()

Returns true if this is a context type menu (a menu in a popup). This method is called by AdfMenuUtils during handling of arrow keys.

Return:
Object

isDetached

public Object isDetached()

Returns true if menu is detached. This method is called by AdfMenuUtils during handling of arrow keys.

Return:
Object

_isDisabled

private Object _isDisabled()

Returns if the component is disabled or not

Return:
Object

_isMenuVisible

private Object _isMenuVisible()

Returns true if the menu popup is currently visible (open). A menu item without a visible menu displayed is deselected on blur. A menu item with a visible menu displayed is not deselected on blur.

Return:
Object

isRootMenu

public Object isRootMenu()

Returns true if this is a root level menu (a first level menu)

Return:
Object

_isSubMenu

private Object _isSubMenu()

Returns true if this is a submenu (i.e., a vertical menu).

Return:
Object

_makeDetached

private Object _makeDetached()

Changes the state of the popupMenu to the detached state. This changes the style and the autodismissal behavior. Menus are detached when originally dragged and detached, and after a detached menu is temporarily shown as reattached during mouse over of its menu item.

Return:
Object

_menuBarKeyHandler

private static Object _menuBarKeyHandler(Event event)

Handler that focuses the first item in a menuBar if Ctrl+Shift+M is pressed.

Parameters:
event  -  The domEvent
Return:
Object

_moveDetachable

private Object _moveDetachable(Object x,
                               Object y)

Moves the floating submenu (used for moving floating submenu with keyboard)

Parameters:
x  -  number of pixels to move the menu to the right
y  -  number of pixels to move the menu down
Return:
Object

_moveShadow

private Object _moveShadow(Object showShadow)

Move the menu shadow. This is done when a menu is moved, including dragging a detached menu, detached menu snap back to original location, and reattached detached menu being redetached.

Parameters:
showShadow    
Return:
Object

_onHandleClick

private Object _onHandleClick(Object event)

Handler for click on detachable menu handle.

Parameters:
event    
Return:
Object

PopupClosed

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

Moves the menu from the popup back into root element so that it can be cleaned up on a PPR

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

_reattachMenu

private Object _reattachMenu()

If the menu is currently detached, temporarily reattachs the menu.

Return:
Object

_redetachMenu

private static Object _redetachMenu()

Detached menus are temporarily reattached when they are selected from their parent menu. The page can have at most one reattached menu displayed at a time. This class method checks if there is a reattached menu. If there is one, the method redetaches the reattached menu.

Return:
Object

_removeBarMenu

private static Object _removeBarMenu(String clientId)

Unregisters this menu as a menu directly in a menuBar

Parameters:
clientId  -  The clientId of the menu.
Return:
Object

_removeFromDetachedMenus

private static Object _removeFromDetachedMenus(String clientId)

Removes the clientid from the list of detached menu's.

Parameters:
clientId  -  The clientId to remove
Return:
Object

ReplaceDomElement

protected Object ReplaceDomElement(HTMLElement newElement,
                                   HTMLElement oldElement)

Replaces the a dom element contained in this peer. The dom element maybe a child (or descendent)

Parameters:
newElement  -  the new dom element
oldElement  -  the old dom element
Return:
Object
Overrides:
AdfRichUIPeer.replaceDomElement(AdfUIComponent, HTMLElement, HTMLElement)

_scroll

private Object _scroll()

Callback which gets called in an interval when the menu is scrolling

Return:
Object

_setLazyState

private Object _setLazyState(Object newState)

Parameters:
newState    
Return:
Object

setVisibleItems

public Object setVisibleItems(Object items)

Sets the _maxDisplayItems property. This method is called by QueryPeer to set the maximum number of menu items to display in query's "Add Fields" menu before adding scroll buttons.

Parameters:
items    
Return:
Object

show

public Object show(Object popupHints,
                   Object focusOnFirstElement)

Shows the menu.

Parameters:
popupHints  -  additional hints for the popup
focusOnFirstElement  -  if true then also focus on the first element. This will override the HINT_FOCUS setting in the popupHints. For a context menu, this defaults to true, for other menus, this defaults to false (true for keyboard launch only).
Return:
Object

_showFetchingDataPopup

private Object _showFetchingDataPopup()

Shows fetching data message used during lazy content retrieval.

Return:
Object

showPopup

public Object showPopup(Object component,
                        Object element,
                        Object hints,
                        Object popupId)

Shows the menu popup. This method is overridden from AdfRichUIPeer so we can add the menu to the open menu tracking array.

Parameters:
component  -  the component that owns the popup
element    
hints  -  [optional] a set of popup hints (see AdfDhtmlPopupWindow)
popupId  -  the id for the popup
Return:
Object
Overrides:
AdfRichUIPeer.showPopup(AdfUIComponent, HTMLElement, Object, String)

_showShadow

private Object _showShadow(Object showShadow)

Show or hide the menu shadow. Shadows are not shown when a menu is being moved via dragging or animation.

Parameters:
showShadow    
Return:
Object

_snapDetachedMenu

private Object _snapDetachedMenu(Object reattachPosition)

Animates a detached submenu back to its default position. This is the position where the submenu shows up when it is not detached. This way the detached menu can still be used in the normal menu structure.

Parameters:
reattachPosition    
Return:
Object

_startScroll

private Object _startScroll(Object isScrollDown,
                            Object isTimerSkipped)

Starts the scrolling of a scrollable menu.

Parameters:
isScrollDown  -  boolean which is true if the menu should scroll down
isTimerSkipped    
Return:
Object

updateScrollIconsState

public Object updateScrollIconsState()

Adjusts the state of the scrollUp and scrollDown buttons based on whether or not there is space to scroll in that direction. This method is also called by AdfDhtmlCommandMenuItemPeer.

Return:
Object

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

 

Generated on 2011.04.05 23:36 UTC
Copyright (c) 1998, 2011, Oracle and/or its affiliates. All rights reserved.