Echo.Sync
Button
Class Hierarchy:

Component rendering peer: Button

Constructor Summary
Public Echo.Sync.Button()
Creates a new Echo.

Class Field Summary
Internal _defaultIconTextMargin
Default margin between icon and text elements.
Internal _prototypeButton
Prototype DOM hierarchy for a rendered button.

Class Method Summary
Internal _createPrototypeButton()
Creates the prototype DOM hierarchy for a rendered button.

Instance Method Summary
Public, Virtual doAction()
Processes a user action (i.
Public, Virtual renderContent()
Renders the content (e.
Public, Virtual setPressedState()
Enables/disables pressed appearance of button.
Public, Virtual setRolloverState()
Enables/disables rollover appearance of button.
Internal _addEventListeners()
Registers event listeners on the button.
Public getFocusFlags()
Internal _processBlur()
Processes a focus blur event.
Internal _processClick()
Processes a mouse click event.
Internal _processFocus()
Processes a focus event.
Internal _processInitEvent()
The Initial focus/mouse rollover listener.
Internal _processKeyPress()
Processes a key press event.
Internal _processPress()
Processes a mouse button press event, displaying the button's pressed appearance.
Internal _processRelease()
Processes a mouse button release event on the button, displaying the button's normal appearance.
Internal _processRolloverEnter()
Processes a mouse roll over event, displaying the button's rollover appearance.
Internal _processRolloverExit()
Processes a mouse roll over exit event, displaying the button's normal appearance.
Public renderAdd()
Internal _renderButtonText()
Renders the button text.
Internal _renderButtonIcon()
Renders the button icon.
Public renderDispose()
Public renderFocus()
Public renderUpdate()
Internal _renderFocusStyle()
Enables/disables focused appearance of button.

Methods inherited from class Echo.Render.ComponentSync
renderAdd, renderDispose, renderUpdate

Constructor Detail
Echo.Render.ComponentSync()
Creates a new Echo.Sync.Button

Class Method Detail
_createPrototypeButton
Creates the prototype DOM hierarchy for a rendered button.
Returns:
(Element) $functionDO.getReturnDescription()

Instance Method Detail
doAction
Processes a user action (i.e., clicking or pressing enter when button is focused). Default implementation invokes doAction() on supported Echo.Component.

renderContent
Renders the content (e.g. text and/or icon) of the button. Appends rendered content to bounding element (this._div).

setPressedState
Enables/disables pressed appearance of button.
Parameters:
pressedState (Boolean) - the new pressed state.

setRolloverState
Enables/disables rollover appearance of button.
Parameters:
rolloverState (Boolean) - the new rollover state.

_addEventListeners
Registers event listeners on the button. This method is invoked lazily, i.e., the first time the button is focused or rolled over with the mouse. The initial focus/mouse rollover listeners are removed by this method. This strategy is used for performance reasons due to the fact that many buttons may be present on the screen, and each button has many event listeners, which would otherwise need to be registered on the initial render.

getFocusFlags

_processBlur
Processes a focus blur event.

_processClick
Processes a mouse click event.

_processFocus
Processes a focus event.

_processInitEvent
The Initial focus/mouse rollover listener. This listener is invoked the FIRST TIME the button is focused or mouse rolled over. It invokes the addListeners() method to lazily add the full listener set to the button.

_processKeyPress
Processes a key press event. Invokes doAction() in the case of enter being pressed.

_processPress
Processes a mouse button press event, displaying the button's pressed appearance.

_processRelease
Processes a mouse button release event on the button, displaying the button's normal appearance.

_processRolloverEnter
Processes a mouse roll over event, displaying the button's rollover appearance.

_processRolloverExit
Processes a mouse roll over exit event, displaying the button's normal appearance.

renderAdd

_renderButtonText
Renders the button text. Configures text alignment, and font.
Parameters:
element - the element which should contain the text.
text - the text to render

_renderButtonIcon
Renders the button icon.
Parameters:
elemnt - the element which should contain the icon.
icon - the icon property to render

renderDispose

renderFocus

renderUpdate

_renderFocusStyle
Enables/disables focused appearance of button.
Parameters:
focusState (Boolean) - the new focus state.