Class Index

Global Variables

Classes


Class MVToolButton

MVToolButton defines a clickable tool button displayed in a MVToolBar object. It response to mouse clicks by invoking the corresponding event handlers defined by the application. A tool button can be defined in one of the following three types:

Class Summary
Constructor Attributes Constructor Name and Description
 
MVToolButton(buttonID, buttonType, buttonIcon, buttonSelectedIcon)
Method Summary
Method Attributes Method Name and Description
 
attachEventListener(event, listener)
This method attaches an event listener that handles one of the following tool button events: MVEvent.BUTTON_DOWN and MVEvent.BUTTON_UP
  • A MVEvent.BUTTON_DOWN event is fired when the user clicks a button and its state changes from UP to DOWN.
 
detachEventListener(event, listener)
This method detaches an event listener that has previously been attached to the tool button by #attachEventListener.
 
This method resets and releases the button if it is pressed down.
 
setToolTip(tooltip)
This method adds a tooltip to the button.
Class Detail
MVToolButton(buttonID, buttonType, buttonIcon, buttonSelectedIcon)
Parameters:
{String} buttonID
A string that specifies the id of the button.
{integer} buttonType
ButtonType specifies the type of the new created button. It can be MVToolButton.COMMAND, MVToolButton.TOGGLE or MVToolButton.SEPARATOR. The default type is MVToolButton.COMMAND.
{string} buttonIcon
A string specifies a icon to be displayed when the button is in the UP state.
{string} buttonSelectedIcon
A string specifies a icon to be displayed when the button is in the DOWN state.
Returns:
The newly created MVToolButton object.
Method Detail
{void} attachEventListener(event, listener)
This method attaches an event listener that handles one of the following tool button events: MVEvent.BUTTON_DOWN and MVEvent.BUTTON_UP
Parameters:
{String} event
a String that specifies the type of event to be handled by the listener. It can only be MVEvent.BUTTON_DOWN or MVEvent.BUTTON_UP.
{Function} listener
a javascript listener function. No parameter is passed to the listener when it is called.
Returns:
none

{void} detachEventListener(event, listener)
This method detaches an event listener that has previously been attached to the tool button by #attachEventListener.
Parameters:
{String} event
a String that specifies the type of event handled by the listener. It can only be MVEvent.BUTTON_DOWN or MVEvent.BUTTON_UP.
{Function} listener
a javascript listener function. No parameter is passed to the listener when it is called.
Returns:
none

{void} reset()
This method resets and releases the button if it is pressed down.
Returns:
None

{void} setToolTip(tooltip)
This method adds a tooltip to the button. The tooltip is displayed when the mouse moves over the button.
Parameters:
{string} tooltip
a string that specifies the content of the tooltip.
Returns:
None

Documentation generated by JsDoc Toolkit 2.1.0 on Fri Feb 25 2011 12:34:47 GMT-0500 (EST)