Class icm.widget.menu.Menu
Extends
dijit/_Widget, dijit/_Templated, ecm/LoggerMixin.
Provides a base class that represents a menu or a toolbar.
Defined in: <icm/widget/menu/Menu.js>.
Constructor Summary
Constructor Attributes | Constructor Name and Description |
---|---|
Constructs a menu or a toolbar.
|
Method Summary
Method Attributes | Method Name and Description |
---|---|
build(callback)
Builds the menu or toolbar.
|
|
getContextObject(ctxobj)
Gets the context object that is to be used in the menu or toolbar.
|
|
getId()
Gets the identifier of the menu or toolbar.
|
|
True if the menu instance is a contextualMenu
|
|
isEnabled(action)
Determines whether the specified action is enabled.
|
|
isGlobalAction(action)
Determines whether the specified action is global.
|
|
isMultipleAction(action)
Determines whether the specified action is applicable for multiple items.
|
|
isSingleAction(action)
Determines whether the specified action is applicable for single item.
|
|
True if the menu instance is a toolbar
|
|
isVisible(action)
Determines whether the specified action is visible.
|
|
performAction(action)
Performs the specified action.
|
|
setActionParameterMap(action)
Sets the parameter map for the specified action.
|
|
setContextObject(ctxobj)
Set the context object to be used in the menu.
|
|
startup()
|
Method Detail
build(callback)
Builds the menu or toolbar.
- Parameters:
- callback
- instance of icm.action.Action.
constructor()
getContextObject(ctxobj)
Gets the context object that is to be used in the menu or toolbar. If a context object
is not set explicitly, the method attempts to find the nearest parent widget
that implements the icm.base.BaseActionContext class.
- Parameters:
- {object} ctxobj
- The icm.base.BaseActionContext object.
{string} getId()
Gets the identifier of the menu or toolbar.
- Returns:
- {string} The identifier of the menu or toolbar.
isContextualMenu()
True if the menu instance is a contextualMenu
{boolean} isEnabled(action)
Determines whether the specified action is enabled.
- Parameters:
- {object} action
- The icm.action.Action object that represents the action.
- Returns:
- {boolean} true if the action should be enabled. Otherwise, this method returns false.
{boolean} isGlobalAction(action)
Determines whether the specified action is global.
- Parameters:
- {object} action
- The icm.action.Action object that represents the action.
- Returns:
- {boolean} true if the action should be global. Otherwise, this method returns false.
{boolean} isMultipleAction(action)
Determines whether the specified action is applicable for multiple items.
- Parameters:
- {object} action
- The icm.action.Action object that represents the action.
- Returns:
- {boolean} true if the action is applicable for multiple items.
{boolean} isSingleAction(action)
Determines whether the specified action is applicable for single item.
- Parameters:
- {object} action
- The icm.action.Action object that represents the action.
- Returns:
- {boolean} true if the action is applicable for single item.
isToolbar()
True if the menu instance is a toolbar
{boolean} isVisible(action)
Determines whether the specified action is visible.
- Parameters:
- {object} action
- The icm.action.Action object that represents the action.
- Returns:
- {boolean} true if the action should be visible. Otherwise, this method returns false.
performAction(action)
Performs the specified action.
- Parameters:
- {object} action
- The icm.action.Action object that represents the action.
postCreate()
setActionParameterMap(action)
Sets the parameter map for the specified action. This method checks that a parameterMap
property is set on the action and parameterMapValues property is not set on the action.
- Parameters:
- {object} action
- The icm.action.Action object that represents the action.
setContextObject(ctxobj)
Set the context object to be used in the menu.
- Parameters:
- {object} ctxobj
- Instance of icm.base.BaseActionContext
startup()
Licensed Materials - Property of IBM (©) Copyright IBM Corp. 2013. All Rights Reserved.