Echo.Component
Echo.AbstractButton
, Echo.AbstractListComponent
, Echo.Arc.ChildContainer
, Echo.Column
, Echo.Composite
, Echo.ContentPane
, Echo.Grid
, Echo.Label
, Echo.Row
, Echo.SplitPane
, Echo.TextComponent
, Echo.WindowPane
, Extras.AccordionPane
, Extras.BorderPane
, Extras.CalendarSelect
, Extras.ColorSelect
, Extras.ContextMenu
, Extras.DropDownMenu
, Extras.Group
, Extras.MenuBarPane
, Extras.RichTextArea
, Extras.TabPane
, Extras.ToolTipContainer
, Extras.TransitionPane
Constructor Summary | |
---|---|
Public | Echo.Component() Creates a new Component. |
Class Field Summary | |
---|---|
Internal | _nextRenderId The next automatically assigned client render id. |
Instance Field Summary | |
---|---|
Public, Virtual | componentType Component type. |
Public, Virtual | focusable Flag indicating whether or not the component is focusable. |
Instance Method Summary | |
---|---|
Public, Virtual | getFocusComponent() Returns the child component at the specified index after sorting the children in the order which they should be focused. |
Public | add() Adds a component as a child. |
Public | addListener() Adds an arbitrary event listener. |
Public | fireEvent() Provides notification of an arbitrary event. |
Public | get() Returns an arbitrary property value. |
Public | getComponent() Retrieves the child component at the specified index. |
Public | getComponentCount() Returns the number of child components. |
Public | getIndex() Returns an arbitrary indexed property value. |
Public | getLayoutDirection() Returns the component layout direction. |
Public | getLocale() Returns the component locale. |
Public | getLocalStyleData() Retrieves local style property map associations. |
Public | getRenderLayoutDirection() Returns the layout direction with which the component should be rendered, based on analyzing the component's layout direction, its parent's, and/or the application's. |
Public | getRenderLocale() Returns the locale with which the component should be rendered, based on analyzing the component's locale, its parent's, and/or the application's. |
Public | getStyle() Returns the style assigned to this component, if any. |
Public | getStyleName() Returns the name of the style (from the application's style sheet) assigned to this component. |
Public | indexOf() Returns the index of a child component, or -1 if the component is not a child. |
Public | isActive() Determines if the component is active, that is, within the current modal context and ready to receive input. |
Public | isAncestorOf() Determines if this component is or is an ancestor of another component. |
Public | isEnabled() Determines the enabled state of this component. |
Public | isRenderEnabled() Determines whether this Component should be rendered with
an enabled state.
|
Public | register() Registers / unregisters a component that has been added/removed to/from a registered hierarchy (a hierarchy that is registered to an application). |
Public | render() Returns the value of a property that should be rendered, based on the value set on this component, in the component's specified style, and/or in the application's stylesheet. |
Public | renderIndex() Returns the value of an indexed property that should be rendered, based on the value set on this component, in the component's specified style, and/or in the application's stylesheet. |
Public | remove() Removes a child component. |
Public | removeAll() Removes all child components. |
Public | removeListener() Removes an arbitrary event listener. |
Public | set() Sets the value of a property in the internal style. |
Public | setEnabled() Sets the enabled state of the component. |
Public | setIndex() Sets the value of an indexed property in the internal style. |
Public | setLayoutDirection() Sets a component-specific layout direction. |
Public | setLocale() Sets a component-specific locale. |
Public | setStyle() Sets the style of the component. |
Public | setStyleName() Sets the name of the style (from the application's style sheet) assigned to this component. |
Public | toString() Returns a string representation of the component (default implementation). |
Style Properties | ||
---|---|---|
background |
Color (String )
|
the background color |
font |
Font (Object )
|
the component font |
foreground |
Color (String )
|
the foreground color |
layoutData |
layout data information, describing how the component should be rendered by its container |
Events | ||
---|---|---|
property |
An event fired when the a property of the component changes. The propertyName property
will specify the name of the changed property. The oldValue and newValue properties
(may) describe the previous and current states of the property, respectively. |
|
init |
An event which is fired when the Component is added to a component hierarchy which is registered to an application. The "application" property of the Component will be available when the event is fired. | |
dispose |
An event which is fired when the Component is about to be removed from a component hierarchy which is registered to an application. The "application" property of the Component will be available when the event is fired. | |
parent |
An event which is fired when the Component's parent is changed. | |
children |
An event which is fired when a child is added to or removed from the Component. |
properties
- (Optional) associative mapping of initial property values (may be null)
By default, all properties will be placed into the local style, except for the following:
styleName
specifies the component stylesheet style namestyle
specifies the referenced component stylerenderId
specifies the render idchildren
an array specifying the initial children of the componentevents
an associative mapping between event names and listener methodsindex
(Number)
- the index of the child (in focus order)component
(Echo.Component)
- the component to addindex
(Number)
- the (integer) index at which to add it (optional, omission
will cause component to be appended to end)eventType
(String)
- the event type nameeventTarget
(Function)
- the method to invoke when the event occurs
(the event will be passed as the single argument)event
- the event to firename
(String)
- the name of the propertyindex
(Number)
- the (integer) indexname
(String)
- the name of the propertyindex
(Number)
- the index to returncomponent
(Echo.Component)
- the componentc
(Echo.Component)
- the component to testComponent
should be rendered with
an enabled state.
Disabled Component
s are not eligible to receive user input.
application
(Echo.Application)
- the application (null to unregister the component)name
(String)
- the name of the propertydefaultValue
- the default value to return if no value is
specified in an internal property, style, or stylesheetname
(String)
- the name of the propertyindex
(Number)
- the (integer) index of the propertydefaultValue
- the default value to return if no value is
specified in an internal property, style, or stylesheetcomponentOrIndex
- the index of the component to remove, or the component to remove
(values may be of type Echo.Component or Number)eventType
(String)
- the event type nameeventTarget
(Function)
- the method to invoke when the event occurs
(the event will be passed as the single argument)name
(String)
- the name of the propertyvalue
- the new value of the propertynewValue
- the new enabled statename
(String)
- the name of the propertyindex
(Number)
- the index of the propertynewValue
- the new value of the propertynewValue
(Echo.LayoutDirection)
- the new layout directionnewValue
(String)
- the new layout directionnewValue
- the new stylenewValue
(String)
- the style namelongFormat
(Boolean)
- an optional flag specifying whether all information about
the component should be displayed (e.g., property values)