Echo.Application
Constructor Summary | |
---|---|
Public | Echo.Application() Creates a new application instance. |
Class Field Summary | |
---|---|
Internal | _nextUid Next unique identifier. |
Class Method Summary | |
---|---|
Public | generateUid() Generates a unique identifier. |
Instance Method Summary | |
---|---|
Public, Virtual | init() Performs application initialization operations. |
Public, Virtual | dispose() Performs application disposal/resource cleanup operations. |
Public | addListener() Adds an arbitrary event listener. |
Public | doDispose() Invoked by application container to dispose of the application. |
Public | doInit() Invoked by application container to initialize of the application. |
Internal | _findModalContextRoot() Recursively determines the current root component of the modal context. |
Public | fireEvent() Provides notification of an arbitrary event. |
Public | focusNext() Focuses the previous/next component based on the currently focused component. |
Public | getComponentByRenderId() Retrieves the registered component with the specified render id. |
Public | getFocusedComponent() Returns the focused component. |
Public | getLayoutDirection() Returns the default layout direction of the application. |
Public | getLocale() Returns the default locale of the application. |
Public | getModalContextRoot() Returns the root component of the modal context. |
Public | getStyleSheet() Returns the application style sheet. |
Public | isActive() Returns the active state of the application. |
Public | notifyComponentUpdate() Notifies the application of an update to a component. |
Internal | _registerComponent() Registers a component with the application. |
Public | removeListener() Removes an arbitrary event listener. |
Public | setFocusedComponent() Sets the focused component. |
Public | setLayoutDirection() Sets the application default layout direction. |
Public | setLocale() Sets the application default locale. |
Internal | _setModal() Informs the application of the modal state of a specific component. |
Public | setStyleSheet() Sets the application style sheet. |
Internal | _unregisterComponent() Unregisters a component from the application. |
Events | ||
---|---|---|
componentUpdate |
An event fired when any component within the application is updated. Listening for this event may degrade the performance of an application, due to the frequency with which it will be fired. | |
focus |
An event fired when the focused component of the application changes. | |
modal |
An event fired when the modal state of the application changes. |
init()
method should always be invoked out of convention.
The client
property will be available.
dispose()
method should always be invoked out of convention.
The client
property will be available.
eventType
(String)
- the event type nameeventTarget
(Function)
- the method to invoke when the event occurs
(the event will be passed as the single argument)dispose()
method.
Once invoked, the application will no longer function and cannot be used again.
This method will free any resources allocated by the application.
init()
method.
searchComponent
(Echo.Component)
- (optional) the component from which to search
(this parameter is provided when recursively searching, if omitted the sear
will begin at the root component of the application).event
- the event to firereverse
(Boolean)
- false to focus the next component, true to focus the
previous componentrenderId
(String)
- the render idcomponentUpdate
event.
parent
(Echo.Component)
- the parent componentpropertyName
(String)
- the updated propertyoldValue
- the previous property valuenewValue
- the new property valuecomponent
(Echo.Component)
- the component to registereventType
(String)
- the event type nameeventTarget
(Function)
- the method to invoke when the event occurs
(the event will be passed as the single argument)newValue
(Echo.Component)
- the new focused componentnewValue
(Echo.LayoutDirection)
- the new layout directionnewValue
(String)
- the new localecomponent
- the componentmodal
- the modal statenewValue
(Echo.StyleSheet)
- the new style sheetcomponent
(Echo.Component)
- the component to remove