Class ZmPopupMenu
Extends
DwtMenu.
This class represents a basic popup menu which can add menu items, manage listeners, and
enable/disabled its menu items.
Defined in: ZmPopupMenu.js.
Class Summary
Constructor Attributes |
Constructor Name and Description |
|
Creates a popup menu.
|
Method Summary
Method Attributes |
Method Name and Description |
|
Adds a section listener.
|
|
Creates a menu item and adds the item to this menu.
|
|
Creates a menu item separator.
|
|
Enables/disables menu items.
|
|
Enables/disables all menu items.
|
|
Gets the menu item with the given ID.
|
|
Gets the menu items.
|
|
Gets the menu search sub-menu (if any).
|
|
Removes a section listener.
|
|
sets an item visibility.
|
- Methods borrowed from class DwtMenu:
- addPopdownListener, addPopupListener, checkItem, getItem, getItemById, getItemCount, getItems, isPoppedUp, removePopdownListener, removePopupListener, scrollToItem, setSelectedItem
- Methods borrowed from class DwtComposite:
- addChild, cleanupSeparators, clear, dispose, getChild, getChildren, getNumChildren, getTabGroupMember, removeChild, removeChildren
- Methods borrowed from class DwtControl:
- addClassName, addControlListener, addDisposeListener, addListener, appendElement, blur, clearContent, clearHandler, condClassName, delClassName, focus, getBounds, getClassName, getContent, getCursor, getData, getDragBox, getDragSource, getDropTarget, getEnabled, getFocusElement, getH, getHtmlElement, getHTMLElId, getInsetBounds, getInsets, getLocation, getMargins, getOpacity, getOuterSize, getPosition, getScrollContainer, getScrollStyle, getSize, getTooltipBase, getToolTipContent, getVisibility, getVisible, getW, getX, getXW, getY, getYH, getZIndex, hasFocus, isAlertShown, isDisposed, isInitialized, isListenerRegistered, notifyListeners, preventContextMenu, preventSelection, removeAllListeners, removeControlListener, removeDisposeListener, removeListener, reparent, reparentHtmlElement, replaceElement, setBounds, setClassName, setContent, setCursor, setData, setDisplay, setDisplayState, setDragBox, setDragSource, setDropTarget, setEnabled, setEventPropagation, setFocusElement, setHandler, setHtmlElementId, setLocation, setOpacity, setPosition, setScrollStyle, setSize, setToolTipContent, setVisibility, setVisible, setZIndex, showAlert, zShow
Class Detail
ZmPopupMenu(parent, className, id, controller)
Creates a popup menu.
Author: Conrad Damon.
- Parameters:
-
{DwtComposite} parent
- the containing widget
-
{string} className
- the CSS class
-
{string} id
- an explicit ID to use for the control's HTML element
-
{ZmController} controller
- the owning controller
Method Detail
addSelectionListener(menuItemId, listener, index)
Adds a section listener.
- Parameters:
-
{string} menuItemId
- the menu item id
-
{AjxListener} listener
- the selection listener
-
{number} index
- the index where to insert the listener
createMenuItem(id, params)
Creates a menu item and adds the item to this menu.
- Parameters:
-
{string} id
- the menu item ID
-
{hash} params
- a hash of parameters
-
{string} params.text
- the menu item text
-
{string} params.image
- the icon class for the or menu item
-
{string} params.disImage
- disabled version of icon
-
{boolean} params.enabled
- if
true , menu item is enabled
-
{constant} params.style
- the menu item style
-
{string} params.radioGroupId
- the ID of radio group for this menu item
-
{constant} params.shortcut
- the shortcut ID (from ZmKeyMap) for showing hint
- See:
- DwtMenuItem
Creates a menu item separator.
- Returns:
- {DwtMenuItem} the separator menu item
enable(ids, enabled)
Enables/disables menu items.
- Parameters:
-
{array} ids
- a list of menu item IDs
-
{boolean} enabled
- if
true , enable the menu items
enableAll(enabled)
Enables/disables all menu items.
- Parameters:
-
{boolean} enabled
- if
true , enable the menu items
Gets the menu item with the given ID.
- Parameters:
-
{string} id
- an operation ID
- Returns:
- {DwtMenuItem} the menu item
{array}
getMenuItems()
Gets the menu items.
- Returns:
- {array} an array of DwtMenuItem objects
Gets the menu search sub-menu (if any).
- Returns:
- {DwtMenu} the menu
removeSelectionListener(menuItemId, listener)
Removes a section listener.
- Parameters:
-
{string} menuItemId
- the menu item id
-
{AjxListener} listener
- the selection listener
setItemVisible(id, visible)
sets an item visibility. finds the menu item by id.
- Parameters:
-
{String} id
- the operation id
-
{Boolean} visible
|