OracleJavaScript API Reference for Oracle ADF Faces

 

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

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

Warning:

org.ecmascript.object.Object
   |
   +--oracle.adf.view.js.base.AdfObject
         |
         +--oracle.adfinternal.view.js.laf.dhtml.rich.AdfMenuUtils

public class AdfMenuUtils
extends AdfObject
Utility class used by various menu peers - menu, commandMenuItem, and goMenuItem



Field Summary

public static Object
AFR_TARGETCOMPONENTID
public static Object
AFR_TARGETROWCURRENCY
public static Object
DEPRESSED_STYLE_CLASS
public static Object
DETACHED_STYLE_CLASS
public static Object
FOCUSED_STYLE_CLASS
public static Object
HIGHLIGHTED_STYLE_CLASS
public static Object
MENU_DEPTH_KEY
public static Object
OVERFLOW_CELL_STYLE_CLASS
public static Object
OVERFLOW_KEY
public static Object
SELECTED_STYLE_CLASS
private static Object
_sOpenedMenus


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

constructor, superclass


Fields inherited from org.ecmascript.object.Object

prototype


Constructor Summary

public
AdfMenuUtils()
Utility class used by various menu peers - menu, commandMenuItem, and goMenuItem


Method Summary

public static Object
addOpenMenu(Object menuId)
If not already present, add the menu popup id to the open menu array.
public static Object
areMenusOpened()
Returns true if any menus are opened.
public static Object
closeAllMenus(Object restoreFocus)
Closes all menus.
public static Object
dismiss(Object element, Object immediate, Object keepOpen)
Closes every opened menu on the stack higher than the provided element.
public static Object
getContextMenuItemTargetAttrs(Object menuItem)
For compatibility with context menus, get target attributes for handling row key
protected static Object
GetLastOpenedRootMenuId()
Get the last opened root menu id (if present)
public static Object
handleArrowKeys(Object componentEvent, Object rootElement, Object component)
Handler for arrow key events or items in a menu or on the menuBar
private static Object
_handleInMenuArrowKeys(Object componentEvent, Object rootElement, Object component)
Handler for in menu arrow key events.
private static Object
_handleInMenuBarArrowKeys(Object componentEvent, Object rootElement, Object component)
Handler for in menu arrow key events.
private static Object
_handleInMenuBarOverflowArrowKeys(Object componentEvent, Object rootElement, Object component)
Handler for in menuBar overflow arrow key events.
private static Object
_handleMenuItemLeftArrowKey(Object parentMenuComponent)
Handle left arrow key press from within a menu.
private static Object
_handleMenuItemRightArrowKey(Object parentMenuComponent)
Handle right arrow key press from a menu item.
public static Object
highlightRootMenuItem(Object domElement)
Helper method to call when highlighting a root menu - clears any previously highlighted root menu.
protected static Object
InitClass()
public static Object
isInMenu(Object component)
Returns true if menu item is in a menu
public static Object
isInOverflow(Object rootElement)
Returns true if menu item is in a menuBar overflow popup
public static Object
isMenuBarAutoOpenMode()
Returns boolean (or null which is also false) indicating if we are in menubar auto open mode.
public static Object
isMenuOpen(Object menuId)
Checks if a menu is already in the open menus.
public static Object
isOnMenuBar(Object component)
Returns true if menu item is on a menuBar
private static Object
_moveHighlightToNextMenuItem(Object rootElement, Object component)
Moves the highlight (selection) to the next (down) menu item.
private static Object
_moveHighlightToPreviousMenuItem(Object rootElement, Object component)
Moves the highlight (selection) to the previous (up) menu item.
public static Object
removeOpenMenu(Object menuId)
Remove the menu with the matching menuId from the opened menu array.
public static Object
restoreFocusToLastOpenedRootMenu()
Restore the focus to the last opened root menu (if present).
public static Object
setContextMenuItemTargetAttrs(Object menuItem, Object targetAttrs)
For compatibility with context menus, set target attributes for handling row key
public static Object
setLastOpenedRootMenuId(Object menuId)
Set the menu as the last opened root menu.
public static Object
setMenuBarAutoOpenMode(Object menuBarAutoOpenMode)
Set the menubar auto open mode
public static Object
unhighlightRootMenuItem()
Helper method to call to unhighlight the currently highlighted root menu (if there is one).


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

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


Field Detail


AFR_TARGETCOMPONENTID

public static Object AFR_TARGETCOMPONENTID

AFR_TARGETROWCURRENCY

public static Object AFR_TARGETROWCURRENCY

DEPRESSED_STYLE_CLASS

public static Object DEPRESSED_STYLE_CLASS

DETACHED_STYLE_CLASS

public static Object DETACHED_STYLE_CLASS

FOCUSED_STYLE_CLASS

public static Object FOCUSED_STYLE_CLASS

HIGHLIGHTED_STYLE_CLASS

public static Object HIGHLIGHTED_STYLE_CLASS

MENU_DEPTH_KEY

public static Object MENU_DEPTH_KEY

OVERFLOW_CELL_STYLE_CLASS

public static Object OVERFLOW_CELL_STYLE_CLASS

OVERFLOW_KEY

public static Object OVERFLOW_KEY

SELECTED_STYLE_CLASS

public static Object SELECTED_STYLE_CLASS

_sOpenedMenus

private static Object _sOpenedMenus

Constructor Detail


AdfMenuUtils

public AdfMenuUtils()

Utility class used by various menu peers - menu, commandMenuItem, and goMenuItem

Method Detail


addOpenMenu

public static Object addOpenMenu(Object menuId)

If not already present, add the menu popup id to the open menu array.

Parameters:
menuId  -  the client id for the menu popup
Return:
Object

areMenusOpened

public static Object areMenusOpened()

Returns true if any menus are opened.

Return:
Object

closeAllMenus

public static Object closeAllMenus(Object restoreFocus)

Closes all menus. This method is also called by commandMenuItem and goMenuItem peer. It is up to caller (if needed) to first the menuBar auto open state via .setMenuBarAutoOpenMode() method.

Parameters:
restoreFocus  -  If true, the last opened root menu regains focus and highlighting after close
Return:
Object

dismiss

public static Object dismiss(Object element,
                             Object immediate,
                             Object keepOpen)

Closes every opened menu on the stack higher than the provided element. In this way, you can close menus higher in the stack than a particular open menu.

Parameters:
element  -  The element to be found
immediate  -  When true, there's no delay before showing the menu. When false there is a 300ms delay before the menu is closed. Menus are delay closed when you mouseOver a different menu item, allowing you time to 'get back' to the menu before it closes.
keepOpen  -  When true, the menus removed from the stack but not closed. This is for when a menu becomes detached - we don't want it to close but it needs to be removed from the open menu stack.
Return:
Object

getContextMenuItemTargetAttrs

public static Object getContextMenuItemTargetAttrs(Object menuItem)

For compatibility with context menus, get target attributes for handling row key

Parameters:
menuItem  -  the menuItem component
Return:
Object

GetLastOpenedRootMenuId

protected static Object GetLastOpenedRootMenuId()

Get the last opened root menu id (if present)

Return:
Object - the client id for the menu.

handleArrowKeys

public static Object handleArrowKeys(Object componentEvent,
                                     Object rootElement,
                                     Object component)

Handler for arrow key events or items in a menu or on the menuBar

Parameters:
componentEvent  -  the key press component event
rootElement  -  the peer's root dom element
component  -  the peer's component
Return:
Object

_handleInMenuArrowKeys

private static Object _handleInMenuArrowKeys(Object componentEvent,
                                             Object rootElement,
                                             Object component)

Handler for in menu arrow key events.

Parameters:
componentEvent  -  the key press component event
rootElement  -  the peer's root dom element
component  -  the peer's component
Return:
Object

_handleInMenuBarArrowKeys

private static Object _handleInMenuBarArrowKeys(Object componentEvent,
                                                Object rootElement,
                                                Object component)

Handler for in menu arrow key events.

Parameters:
componentEvent  -  the key press component event
rootElement  -  the peer's root dom element
component  -  the peer's component
Return:
Object

_handleInMenuBarOverflowArrowKeys

private static Object _handleInMenuBarOverflowArrowKeys(Object componentEvent,
                                                        Object rootElement,
                                                        Object component)

Handler for in menuBar overflow arrow key events.

Parameters:
componentEvent  -  the key press component event
rootElement  -  the peer's root dom element
component  -  the peer's component
Return:
Object

_handleMenuItemLeftArrowKey

private static Object _handleMenuItemLeftArrowKey(Object parentMenuComponent)

Handle left arrow key press from within a menu.

Parameters:
parentMenuComponent  -  the component's parent component
Return:
Object

_handleMenuItemRightArrowKey

private static Object _handleMenuItemRightArrowKey(Object parentMenuComponent)

Handle right arrow key press from a menu item. If the parent menu(s) are not detached or context menus all the way up to the menuBar, then highlight the next item on the menu bar.

Parameters:
parentMenuComponent  -  the component's parent component
Return:
Object

highlightRootMenuItem

public static Object highlightRootMenuItem(Object domElement)

Helper method to call when highlighting a root menu - clears any previously highlighted root menu.

Parameters:
domElement  -  menu item dom element to be highlighted
Return:
Object

InitClass

protected static Object InitClass()

Return:
Object

isInMenu

public static Object isInMenu(Object component)

Returns true if menu item is in a menu

Parameters:
component  -  the peer's component
Return:
Object

isInOverflow

public static Object isInOverflow(Object rootElement)

Returns true if menu item is in a menuBar overflow popup

Parameters:
rootElement  -  the peer's root dom element
Return:
Object

isMenuBarAutoOpenMode

public static Object isMenuBarAutoOpenMode()

Returns boolean (or null which is also false) indicating if we are in menubar auto open mode.

Return:
Object - boolean menubar auto open mode (may be null)

isMenuOpen

public static Object isMenuOpen(Object menuId)

Checks if a menu is already in the open menus.

Parameters:
menuId  -  the client id for the menu popup
Return:
Object

isOnMenuBar

public static Object isOnMenuBar(Object component)

Returns true if menu item is on a menuBar

Parameters:
component  -  the peer's component
Return:
Object

_moveHighlightToNextMenuItem

private static Object _moveHighlightToNextMenuItem(Object rootElement,
                                                   Object component)

Moves the highlight (selection) to the next (down) menu item.

Parameters:
rootElement  -  the peer's root dom element
component  -  the peer's component
Return:
Object

_moveHighlightToPreviousMenuItem

private static Object _moveHighlightToPreviousMenuItem(Object rootElement,
                                                       Object component)

Moves the highlight (selection) to the previous (up) menu item.

Parameters:
rootElement  -  the peer's root dom element
component  -  the peer's component
Return:
Object

removeOpenMenu

public static Object removeOpenMenu(Object menuId)

Remove the menu with the matching menuId from the opened menu array.

Parameters:
menuId  -  the client id for the menu popup
Return:
Object

restoreFocusToLastOpenedRootMenu

public static Object restoreFocusToLastOpenedRootMenu()

Restore the focus to the last opened root menu (if present).

Return:
Object

setContextMenuItemTargetAttrs

public static Object setContextMenuItemTargetAttrs(Object menuItem,
                                                   Object targetAttrs)

For compatibility with context menus, set target attributes for handling row key

Parameters:
menuItem  -  the menuItem component
targetAttrs  -  menu item's target attributes (see method above)
Return:
Object

setLastOpenedRootMenuId

public static Object setLastOpenedRootMenuId(Object menuId)

Set the menu as the last opened root menu.

Parameters:
menuId  -  the client id for the menu.
Return:
Object

setMenuBarAutoOpenMode

public static Object setMenuBarAutoOpenMode(Object menuBarAutoOpenMode)

Set the menubar auto open mode

Parameters:
menuBarAutoOpenMode  -  new boolean value
Return:
Object

unhighlightRootMenuItem

public static Object unhighlightRootMenuItem()

Helper method to call to unhighlight the currently highlighted root menu (if there is one).

Return:
Object

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

 

Generated on 2012.08.25 02:16 UTC
Copyright (c) 1998, 2012, Oracle and/or its affiliates. All rights reserved.