Class ZmButtonToolBar
Extends
ZmToolBar.
This class represents a toolbar that contains buttons.
It can be easily created using a set of standard operations, and/or custom buttons
can be provided. This class is designed for use with items (ZmItem), so it can for
example contain a button with a tab submenu. See also ZmActionMenu.
Defined in: ZmButtonToolBar.js.
Class Summary
Constructor Attributes |
Constructor Name and Description |
|
Creates a toolbar with the given buttons.
|
Field Summary
Field Attributes |
Field Name and Description |
|
The operation list property.
|
Method Summary
Method Attributes |
Method Name and Description |
|
Adds the operation.
|
|
Creates a button and adds its operation ID as data.
|
|
Creates a zimlet button and adds its operation ID as data.
|
|
gets the secondary button (the "Actions" button in the toolbar)
|
|
gets the secondary menu (the "Actions" menu in the toolbar)
|
|
Gets the button.
|
|
Gets the menu tag sub-menu (if any).
|
|
Removes the operation.
|
- Methods borrowed from class ZmToolBar:
- addSelectionListener, createButton, enable, enableAll, getButton, removeSelectionListener, setData, setItemVisible, setSize
- Methods borrowed from class DwtToolBar:
- addChild, addFiller, addSeparator, addSpacer, focus, getItem, getItemCount, getItems, getKeyMapName
- Methods borrowed from class DwtComposite:
- cleanupSeparators, clear, dispose, getChild, getChildren, getNumChildren, getTabGroupMember, removeChild, removeChildren
- Methods borrowed from class DwtControl:
- addClassName, addControlListener, addDisposeListener, addListener, appendElement, blur, clearContent, clearHandler, condClassName, delClassName, 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, setDisplay, setDisplayState, setDragBox, setDragSource, setDropTarget, setEnabled, setEventPropagation, setFocusElement, setHandler, setHtmlElementId, setLocation, setOpacity, setPosition, setScrollStyle, setToolTipContent, setVisibility, setVisible, setZIndex, showAlert, zShow
Class Detail
ZmButtonToolBar(params)
Creates a toolbar with the given buttons.
Author: Conrad Damon.
- Parameters:
-
{Hash} params
- a hash of parameters
-
{DwtComposite} params.parent
- the containing widget
-
{Array} params.buttons
- a list of operation IDs
-
{constant} params.posStyle
- the positioning style
-
{String} params.className
- the CSS class name
-
{Stirng} params.buttonClassName
- the CSS class name for buttons
-
{Hash} params.overrides
- a hash of overrides by op ID
-
{Array} params.secondaryButtons
- a list of operation IDs
-
{Array} params.rightSideButtons
- a list of operation IDs
-
{constant} params.context
- the vcontextID (used to generate button IDs)
-
{constant} params.toolbarType
- the toolbar type (used to generate button IDs)
-
{Boolean} params.addTextElement
- if true, add a text "button" (element) at the end (but before the view button, if any). This can be used for message counts etc
-
{ZmController} params.controller
- the owning controller
Field Detail
{Array}
opList
The operation list property.
Method Detail
addOp(id, index)
Adds the operation.
- Parameters:
-
{String} id
- the id
-
{int} index
- the index
createOp(id, params)
Creates a button and adds its operation ID as data.
- Parameters:
-
{String} id
- the name of the operation
-
{Hash} params
- a hash of parameters
-
{String} params.text
- a button text
-
{String} params.tooltip
- a button tooltip text
-
{String} params.image
- a icon class for the button
-
{String} params.disImage
- a disabled version of icon
-
{Boolean} params.enabled
- if
true , button is enabled
-
{String} params.className
- the CSS class name
-
{String} params.style
- thebutton style
-
{int} params.index
- the position at which to add the button
-
{Boolean} params.showImageInToolbar
- if
true , the button should show image (default is false)
-
{Boolean} params.showTextInToolbar
- if
true , the button should show text (default is !params.showImageInToolbar)
createZimletOp(id, params)
Creates a zimlet button and adds its operation ID as data. This method selects the best location for the zimlet, so zimlets don't have to do it and it's consistent.
for parameters see createOp
- Parameters:
-
id
-
params
getActionsButton()
gets the secondary button (the "Actions" button in the toolbar)
getActionsMenu()
gets the secondary menu (the "Actions" menu in the toolbar)
Gets the button.
- Parameters:
-
{constant} id
- the button
- Returns:
- {DwtButton} the button
- See:
- ZmOperation
Gets the menu tag sub-menu (if any).
- Returns:
- {ZmTagMenu} the menu
removeOp(id)
Removes the operation.
- Parameters:
-
{String} id
- the id
- See:
- ZmOperation
|