Methods
addClass(cssClass)
Inherits addClass
Adds a CSS class to this control.
Parameters
cssClass* string | The name of the CSS class. |
getDimensions()
Inherits getDimensions
Returns the dimensions of this control.
Returns
Type | Description |
---|---|
object | The width and height of the toolbar. |
getId()
Inherits getId
Gets this control’s ID.
Returns
Type | Description |
---|---|
string | The control’s ID. |
getPosition()
Inherits getPosition
Returns the position of this control relative to the canvas.
Returns
Type | Description |
---|---|
object | The top and left values of the toolbar. |
getState()
Returns the state of this button.
Returns
Type | Description |
---|---|
State | The state of the button. |
getToolTip()
Inherits getToolTip
Returns the tooltip text for this control.
Returns
Type | Description |
---|---|
string | The tooltip text. Null if it’s not set. |
isCollapsed()
Inherits isCollapsed
Gets the collapsed state of this control.
Returns
Type | Description |
---|---|
boolean | True if this control is collapsed. |
isCollapsible()
Inherits isCollapsible
Returns whether or not this control is collapsible.
Returns
Type | Description |
---|---|
boolean | True if this control can be collapsed. |
isVisible()
Inherits isVisible
Gets the visibility of this control.
Returns
Type | Description |
---|---|
boolean | True if the this control is visible. |
onClick(event)
Override this method to be notified when the user clicks on the button.
Parameters
event* MouseEvent |
onMouseOut(event)
Override this method to be notified when the mouse leaves the button.
Parameters
event* MouseEvent |
onMouseOver(event)
Override this method to be notified when the mouse enters the button.
Parameters
event* MouseEvent |
removeClass(cssClass)
Inherits removeClass
Removes a CSS class from this control.
Parameters
cssClass* string | The name of the CSS class. |
setCollapsed(collapsed)
Inherits setCollapsed
Sets the collapsed state of this control.
Parameters
collapsed* boolean | The collapsed value to set. |
Returns
Type | Description |
---|---|
boolean | True if the control’s collapsed state changes. |
setIcon(iconClass)
Sets the icon for the button.
Parameters
iconClass* string | The CSS class defining the appearance of the button icon (e.g. image background). |
setState(state)
Sets the state of this button.
Parameters
state* | The state. |
Returns
Type | Description |
---|---|
boolean | True if the state was set successfully. |
setToolTip(toolTipText)
Inherits setToolTip
Sets the tooltip text for this control.
Parameters
toolTipText* string | The text for the tooltip. |
Returns
Type | Description |
---|---|
boolean | True if the tooltip was successfully set. |
setVisible(visible)
Inherits setVisible
Sets the visibility of this control.
Parameters
visible* boolean | The visibility value to set. |
Returns
Type | Description |
---|---|
boolean | True if the control’s visibility changed. |
Events
COLLAPSED_CHANGED
Event fired when the collapsed state of the control changes.
Properties
controlId string | The ID of the control that fired this event. |
isCollapsed boolean | True if the control is now collapsed. |
STATE_CHANGED
Event fired when state of the button changes.
Properties
buttonId string | The ID of the button that fired this event. |
state | The new state of the button. |
VISIBILITY_CHANGED
Event fired when the visibility of the control changes.
Properties
controlId string | The ID of the control that fired this event. |
isVisible boolean | True if the control is now visible. |