Class DwtButton
There are several different types of button:
CSS
Keyboard Actions
Defined in: DwtButton.js.
Class Detail
DwtButton(params)
Creates a button.
Author: Ross Dargahi, Conrad Damon.
Method Detail
addDropDownSelectionListener(listener)
Adds a listener to be notified when the dropdown arrow is pressed.
addSelectionListener(listener, index)
Adds a listener to be notified when the button is pressed.
dispose()
Disposes of the button.
{string}
getKeyMapName()
Gets the key map name.
{DwtMenu}
getMenu(dontCreate)
Gets the button menu.
{boolean}
handleKeyAction(actionCode, ev)
Handles a key action event.
{boolean}
isToggled()
Checks if the button is toggled.
popup(menu, event)
Pops-up the button menu (if present).
removeDropDownSelectionListener(listener)
Removes a dropdown selection listener.
removePullDownMenuOptions()
Removes options from drop down menu
removeSelectionListener(listener)
Removes a selection listener.
removeSelectionListeners()
Removes all the selection listeners.
resetClassName()
Resets the button display to normal (not hovered or active).
setActionTiming(actionTiming)
Sets whether actions for this button should occur on mouse up or mouse down.
setDepressedImage(imageInfo)
Sets the depressed image
setDisplayState(state, force)
Sets the display state.
setDropDownHovImage(hovImg)
Sets the Drop Down Hover Image
setDropDownImages(enabledImg, disImg, hovImg, depImg)
Sets the dropdown images.
setEnabled(enabled)
Sets the enabled/disabled state of the button. A disabled button may have a different
image, and greyed out text. The button (and its menu) will only have listeners if it
is enabled.
setEnabledImage(imageInfo)
Sets the enabled image
setHovered(hovered)
Activates/de-activates the button. A button is hovered when the mouse is over it.
setHoverImage(hoverImageInfo, direction)
Sets the hover image.
setImage(imageInfo, direction)
Sets the main (enabled) image. If the button is currently enabled, the image is updated.
setMenu(params, menu, shouldToggle, menuPopupStyle, popupAbove, popupRight)
Adds a dropdown menu to the button, available through a small down-arrow. If a
callback is passed as the dropdown menu, it is called the first time the
menu is requested. The callback must return a valid DwtMenu object.
setSelected(selected)
Sets the button as selected.
setText(text)
Sets the text.
|
||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
Documentation generated by JsDoc Toolkit 2.3.0 on Tue Jun 28 2016 21:01:27 GMT-0400 (EDT)
|