| java.lang.Object nextapp.echo2.app.Component
All known Subclasses: nextapp.echo2.app.list.AbstractListComponent, nextapp.echo2.app.text.TextComponent, nextapp.echo2.app.SplitPane, nextapp.echo2.app.test.NullComponent, nextapp.echo2.app.Grid, nextapp.echo2.app.test.LifecycleTestComponent, nextapp.echo2.app.Column, nextapp.echo2.app.Row, nextapp.echo2.app.WindowPane, nextapp.echo2.app.Table, nextapp.echo2.app.Window, nextapp.echo2.app.button.AbstractButton, nextapp.echo2.app.Composite, nextapp.echo2.app.ContentPane, nextapp.echo2.app.Label,
Component | abstract public class Component implements RenderIdSupport,Serializable(Code) | | A representation of an Echo component. This is an abstract base class from
which all Echo components are derived.
A hierarchy of Component objects is used to represent the
state of an application's user interface. A Component may have
a single parent Component and may contain zero or more child
Component s. Certain Component s may limit the
number or type(s) of children which may be added to them, and may even
establish requirements for what type(s) of parent Component s
they may be added to. In the event that an application attempts to add a
child Component to a parent Component in spite
of these requirements, an IllegalChildException is thrown.
Properties and Styles
The state of a single Component is represented by its
properties. Properties can be categorized into two types: "style" and
"non-style". Style properties are generally used to represent the
"look-and-feel" of a Component--information such as colors, fonts, location,
and borders. "Non-style" properties are generally used to represent
non-stylistic information such as data models, selection models, and locale.
"Style Properties" have a special definition because they may be stored in
Style or StyleSheet objects instead of as
properties of a specific Component instance. Property values
contained in a relevant Style or StyleSheet
will be used for rendering when the property values are not specified by a
Component itself. Style properties are identified by the
presence of a public static constant name in a Component
implementation with the prefix PROPERTY_ . In the base
Component class itself there are several examples of style
properties, such as PROPERTY_BACKGROUND ,PROPERTY_FONT
and PROPERTY_LAYOUT_DATA . The rendering application container
will use the Component.getRenderProperty() and
Component.getRenderIndexedProperty() to retrieve the values of
stylistic properties, in order that their values might be obtained from
the Component 's shared Style or the
ApplicationInstance 's StyleSheet in the event
they are not directly set in the Component .
A Component implementation should not store the values of
style properties as instance variables. Rather, the values of style
properties should be stored in the local Style instance, by
way of the setProperty() method. The
getProperty() method may be used to obtain the value of such
properties. Only style properties should be stored using these methods;
properties such as models should never be stored using the
getProperty() /setProperty() interface.
Events
Many Component s will provide the capability to register
EventListener s to notify interested parties when various
state changes occur. The base Component class provides an
EventListenerList as a convenient and memory efficient means
of storing such listeners. The internal EventListenerList may
be obtained using the getEventListenerList() method. The
EventListenerList is lazy-created and will only be
instantiated on the first invocation of the
getEventListenerList() method. If the intent is only to
inquire about the state of event listeners without necessarily forcing
instantiation of an EventListenerList , the
hasEventListenerList() should be queried prior to invoking
getEventListenerList() .
|
Constructor Summary | |
public | Component() Creates a new Component . |
Method Summary | |
public void | add(Component c) Adds the specified Component as a child of this
Component . | public void | add(Component c, int n) Adds the specified Component as the n th
child of this component. | public void | addPropertyChangeListener(PropertyChangeListener l) Adds a property change listener to this component. | void | assignRenderId(String renderId) Internal method to set the render identifier of theComponent .
This method is invoked by the ApplicationInstance
when the component is registered or unregistered, or by manual
invocation of setRenderId() . | public void | dispose() Life-cycle method invoked when the Component is removed
from a registered hierarchy. | void | doDispose() Recursively executes the dispose() life-cycle methods of
this Component and its descendants. | void | doInit() Recursively executes the init() life-cycle methods of
this Component and its descendants. | protected void | firePropertyChange(String propertyName, Object oldValue, Object newValue) Reports a bound property change to PropertyChangeListener s
and to the ApplicationInstance 's update management system. | public ApplicationInstance | getApplicationInstance() Returns the ApplicationInstance to which this
Component is registered, or null if it is not currently
registered. | public Color | getBackground() Returns the default/base background color of the Component . | final public Component | getComponent(int n) Returns the n th immediate child component. | final public Component | getComponent(String id) Recursively searches for the component with the specified id
by querying this component and its descendants.
The id value is that retrieved and set via the getId()
and setId() methods. | final public int | getComponentCount() Returns the number of immediate child Component s. | final public Component[] | getComponents() Returns an array of all immediate child Component s. | protected EventListenerList | getEventListenerList() Returns the local EventListenerList . | final public int | getFocusTraversalIndex() Returns the focus traversal (tab) index of the component.
Components with numerically lower indices will be focused before
components with numerically higher indices. | public Font | getFont() Returns the default/base font of the component. | public Color | getForeground() Returns the default/base foreground color of the Component . | public String | getId() Returns the user-defined identifier of the Component . | final public Object | getIndexedProperty(String propertyName, int propertyIndex) Returns the value of the specified indexed property. | public LayoutData | getLayoutData() Returns the LayoutData object used to describe how this
Component should be laid out within its parent container. | public LayoutDirection | getLayoutDirection() Returns the specific layout direction setting of this component, if any. | public Locale | getLocale() Returns the specific locale setting of this component, if any. | final public Component | getParent() Returns the parent component. | final public Object | getProperty(String propertyName) Returns the value of the specified property. | public String | getRenderId() Returns the render id of this component. | final public Object | getRenderIndexedProperty(String propertyName, int propertyIndex) Determines the "rendered state" of an indexed property.
The rendered state is determined by first determining if the given
property is locally set on this Component , and returning
it in that case. | final public Object | getRenderIndexedProperty(String propertyName, int propertyIndex, Object defaultValue) Determines the "rendered state" of an indexed property.
The rendered state is determined by first determining if the given
property is locally set on this Component , and returning
it in that case. | final public LayoutDirection | getRenderLayoutDirection() Returns the rendered LayoutDirection of the
Component . | final public Locale | getRenderLocale() Returns the rendered Locale of the Component .
If this Component does not itself specify a locale, its
ancestors will be queried recursively until a Component
providing a Locale is found. | final public Object | getRenderProperty(String propertyName) Determines the "rendered state" of a property.
The rendered state is determined by first determining if the given
property is locally set on this Component , and returning
it in that case. | final public Object | getRenderProperty(String propertyName, Object defaultValue) Determines the "rendered state" of a property.
The rendered state is determined by first determining if the given
property is locally set on this Component , and returning
it in that case. | final public Style | getStyle() Returns the shared Style object assigned to this
Component . | final public String | getStyleName() Returns the name of the Style in the
ApplicationInstance 'sStyleSheet from
which the renderer will retrieve properties. | final public Component | getVisibleComponent(int n) Returns the n th immediate visible
child Component . | final public int | getVisibleComponentCount() Returns the number of visible immediate child
Component s. | final public Component[] | getVisibleComponents() Returns an array of all visible immediate child
Component s. | protected boolean | hasEventListenerList() Determines if a local EventListenerList exists.
If no listener list exists, it can be assured that there are thus no
listeners registered to it. | final public int | indexOf(Component c) Determines the index of the given Component within the
children of this Component . | public void | init() Life-cycle method invoked when the Component is added
to a registered hierarchy. | final public boolean | isAncestorOf(Component c) Determines if this Component is or is an ancestor of
the specified Component . | final public boolean | isEnabled() Determines the enabled state of this Component .
DisabledComponent s are not eligible to receive user input.
The application container may render disabled components with an altered
appearance. | public boolean | isFocusTraversalParticipant() Determines if the Component participates in (tab) focus
traversal. | final public boolean | isRegistered() Determines if the Component is registered to an
ApplicationInstance . | final public boolean | isRenderEnabled() Determines whether this Component should be rendered with
an enabled state.
DisabledComponent s are not eligible to receive user input.
The application container may render disabled components with an altered
appearance. | final public boolean | isRenderVisible() Determines if the Component and all of its parents are
visible. | public boolean | isValidChild(Component child) Determines if a given Component is valid to be added as a
child to this Component . | public boolean | isValidParent(Component parent) Determines if this Component is valid to be added as a
child of the given parent Component . | final public boolean | isVisible() Returns the visibility state of this Component .
Non-visible components will not be seen by the rendering application
container, and will not be rendered in any fashion on the user
interface. | public void | processInput(String inputName, Object inputValue) Processes client input specific to the Component
received from the UpdateManager . | void | register(ApplicationInstance newValue) Sets the ApplicationInstance to which this component is
registered.
The ApplicationInstance to which a component is registered
may not be changed directly from one to another, i.e., if the component
is registered to instance "A" and an attempt is made to set it to
instance "B", an IllegalStateException will be thrown. | public void | remove(Component c) Removes the specified child Component from this
Component .
All Component remove operations use this method to
remove Component s. | public void | remove(int n) Removes the Component at the n th index. | public void | removeAll() Removes all child Component s. | public void | removePropertyChangeListener(PropertyChangeListener l) Removes a property change listener from this Component . | public void | setBackground(Color newValue) Sets the default background color of the Component . | public void | setEnabled(boolean newValue) Sets the enabled state of the Component . | public void | setFocusTraversalIndex(int newValue) Sets the focus traversal (tab) index of the component. | public void | setFocusTraversalParticipant(boolean newValue) Sets whether the component participates in the focus traversal order
(tab order). | public void | setFont(Font newValue) Sets the default text font of the Component . | public void | setForeground(Color newValue) Sets the default foreground color of the Component . | public void | setId(String id) Sets a user-defined identifier for this Component . | public void | setIndexedProperty(String propertyName, int propertyIndex, Object newValue) Sets a generic indexed property of the Component . | public void | setLayoutData(LayoutData newValue) Sets the LayoutData of this Component . | public void | setLayoutDirection(LayoutDirection newValue) Sets the LayoutDirection of this Component ,
describing whether content is rendered left-to-right or right-to-left.
Parameters: newValue - the new LayoutDirection . | public void | setLocale(Locale newValue) Sets the locale of the Component . | public void | setProperty(String propertyName, Object newValue) Sets a generic property of the Component . | public void | setRenderId(String renderId) Sets a custom render identifier for this Component .
The identifier may be changed without notification if another
component is already using it.
Identifiers are limited to ASCII alphanumeric values. | public void | setStyle(Style newValue) Sets the shared style of the Component . | public void | setStyleName(String newValue) Sets the name of the style to use from the
ApplicationInstance -defined StyleSheet . | public void | setVisible(boolean newValue) Sets the visibility state of this Component . | public void | validate() A life-cycle method invoked before the component is rendered to ensure it
is in a valid state. | public boolean | verifyInput(String inputName, Object inputValue) Invoked by the ClientUpdateManager on each component in the
hierarchy whose processInput() method will layer be invoked
in the current transaction. | final public int | visibleIndexOf(Component c) Determines the index of the given Component within the
visible children of this Component . |
CHILDREN_CHANGED_PROPERTY | final public static String CHILDREN_CHANGED_PROPERTY(Code) | | |
ENABLED_CHANGED_PROPERTY | final public static String ENABLED_CHANGED_PROPERTY(Code) | | |
FOCUS_TRAVERSAL_INDEX_CHANGED_PROPERTY | final public static String FOCUS_TRAVERSAL_INDEX_CHANGED_PROPERTY(Code) | | |
FOCUS_TRAVERSAL_PARTICIPANT_CHANGED_PROPERTY | final public static String FOCUS_TRAVERSAL_PARTICIPANT_CHANGED_PROPERTY(Code) | | |
LAYOUT_DIRECTION_CHANGED_PROPERTY | final public static String LAYOUT_DIRECTION_CHANGED_PROPERTY(Code) | | |
LOCALE_CHANGED_PROPERTY | final public static String LOCALE_CHANGED_PROPERTY(Code) | | |
PROPERTY_BACKGROUND | final public static String PROPERTY_BACKGROUND(Code) | | |
PROPERTY_FOREGROUND | final public static String PROPERTY_FOREGROUND(Code) | | |
PROPERTY_LAYOUT_DATA | final public static String PROPERTY_LAYOUT_DATA(Code) | | |
STYLE_CHANGED_PROPERTY | final public static String STYLE_CHANGED_PROPERTY(Code) | | |
STYLE_NAME_CHANGED_PROPERTY | final public static String STYLE_NAME_CHANGED_PROPERTY(Code) | | |
VISIBLE_CHANGED_PROPERTY | final public static String VISIBLE_CHANGED_PROPERTY(Code) | | |
Component | public Component()(Code) | | Creates a new Component .
|
add | public void add(Component c)(Code) | | Adds the specified Component as a child of this
Component . The child will be added at the greatest
index.
Parameters: c - the child Component to add |
add | public void add(Component c, int n) throws IllegalChildException(Code) | | Adds the specified Component as the n th
child of this component.
All component-add operations use this method to add components.
Component s that require notification of all child additions
should override this method (making sure to call the superclass'
implementation).
Parameters: c - the child component to add Parameters: n - the index at which to add the child component, or -1 to add thecomponent at the end throws: IllegalChildException - if the child is not allowed to be addedto this component, because it is either not valid for the component's state or is of an invalid type |
addPropertyChangeListener | public void addPropertyChangeListener(PropertyChangeListener l)(Code) | | Adds a property change listener to this component.
Parameters: l - the listener to add |
assignRenderId | void assignRenderId(String renderId)(Code) | | Internal method to set the render identifier of theComponent .
This method is invoked by the ApplicationInstance
when the component is registered or unregistered, or by manual
invocation of setRenderId() . This method performs no
error checking.
Parameters: renderId - the new identifier See Also: Component.getRenderId() See Also: Component.setRenderId() |
dispose | public void dispose()(Code) | | Life-cycle method invoked when the Component is removed
from a registered hierarchy. Implementations should always invoke
super.dispose() .
Modifications to the component hierarchy are not allowed within this
method.
|
doDispose | void doDispose()(Code) | | Recursively executes the dispose() life-cycle methods of
this Component and its descendants.
|
doInit | void doInit()(Code) | | Recursively executes the init() life-cycle methods of
this Component and its descendants.
|
firePropertyChange | protected void firePropertyChange(String propertyName, Object oldValue, Object newValue)(Code) | | Reports a bound property change to PropertyChangeListener s
and to the ApplicationInstance 's update management system.
Parameters: propertyName - the name of the changed property Parameters: oldValue - the previous value of the property Parameters: newValue - the present value of the property |
getApplicationInstance | public ApplicationInstance getApplicationInstance()(Code) | | Returns the ApplicationInstance to which this
Component is registered, or null if it is not currently
registered.
the application instance |
getBackground | public Color getBackground()(Code) | | Returns the default/base background color of the Component .
This property may not be relevant to certain components, though
even in such cases may be useful for setting a default for
children.
the background color |
getComponent | final public Component getComponent(int n)(Code) | | Returns the n th immediate child component.
Parameters: n - the index of the Component to retrieve the Component at index n throws: IndexOutOfBoundsException - when the index is invalid |
getComponent | final public Component getComponent(String id)(Code) | | Recursively searches for the component with the specified id
by querying this component and its descendants.
The id value is that retrieved and set via the getId()
and setId() methods. This method is in no way
related to renderId s.
Parameters: id - the user-defined id of the component to be retrieved the component with the specified id, if it either is thiscomponent or is a descendant of it, or null otherwise |
getComponentCount | final public int getComponentCount()(Code) | | Returns the number of immediate child Component s.
the number of immediate child Component s |
getComponents | final public Component[] getComponents()(Code) | | Returns an array of all immediate child Component s.
an array of all immediate child Component s |
getEventListenerList | protected EventListenerList getEventListenerList()(Code) | | Returns the local EventListenerList .
The listener list is lazily created; invoking this method will
create the EventListenerList if required.
the listener list |
getFocusTraversalIndex | final public int getFocusTraversalIndex()(Code) | | Returns the focus traversal (tab) index of the component.
Components with numerically lower indices will be focused before
components with numerically higher indices. The value 0 has special
meaning, in that components with a value of 0 will be focused last.
The default value is 0.
the focus traversal index, a value between 0 and 32767 |
getFont | public Font getFont()(Code) | | Returns the default/base font of the component.
This property may not be relevant to certain components, though
even in such cases may be useful for setting a default for
children.
the font |
getForeground | public Color getForeground()(Code) | | Returns the default/base foreground color of the Component .
This property may not be relevant to certain components, though
even in such cases may be useful for setting a default for
children.
the foreground color |
getId | public String getId()(Code) | | Returns the user-defined identifier of the Component .
Note that the user defined identifier has no relation to the
renderId .
the user-defined identifier |
getIndexedProperty | final public Object getIndexedProperty(String propertyName, int propertyIndex)(Code) | | Returns the value of the specified indexed property.
This method is generally used only internally by a
Component , however there are exceptions.
The more specific getXXX() methods to retrieve
property values from a Component whenever
possible.
See the class-level documentation for a more detailed
explanation of the use of this method.
Parameters: propertyName - the property name Parameters: propertyIndex - the property index the property value |
getLayoutData | public LayoutData getLayoutData()(Code) | | Returns the LayoutData object used to describe how this
Component should be laid out within its parent container.
the layout data, or null if unset See Also: LayoutData |
getLayoutDirection | public LayoutDirection getLayoutDirection()(Code) | | Returns the specific layout direction setting of this component, if any.
This method will return null unless a LayoutDirection is
specifically set on this Component .
the layout direction property of thisComponent See Also: Component.getRenderLayoutDirection() |
getLocale | public Locale getLocale()(Code) | | Returns the specific locale setting of this component, if any.
This method will return null unless a Locale is
specifically set on this Component .
the locale property of this Component See Also: Component.getRenderLocale() |
getParent | final public Component getParent()(Code) | | Returns the parent component.
the parent component, or null if this component has no parent |
getProperty | final public Object getProperty(String propertyName)(Code) | | Returns the value of the specified property.
This method is generally used only internally by a
Component , however there are exceptions.
The more specific getXXX() methods to retrieve
property values from a Component whenever
possible.
See the class-level documentation for a more detailed
explanation of the use of this method.
Parameters: propertyName - the property name the property value |
getRenderId | public String getRenderId()(Code) | | Returns the render id of this component.
This id is only guaranteed to be unique within
the ApplicationInstance to which this component is
registered. This method returns null in the event that the
component is not registered to an ApplicationInstance .
the ApplicationInstance -wide unique id of this component See Also: nextapp.echo2.app.RenderIdSupport.getRenderId |
getRenderIndexedProperty | final public Object getRenderIndexedProperty(String propertyName, int propertyIndex)(Code) | | Determines the "rendered state" of an indexed property.
The rendered state is determined by first determining if the given
property is locally set on this Component , and returning
it in that case. If the property state is not set locally, the
shared Style assigned to this component will be queried
for the property value. If the property state is not set in the
shared Style , the StyleSheet of the
ApplicationInstance to which this Component
is registered will be queried for the property value.
In the event the property is not set in any of these resources,
null is returned.
The application container will invoke this method
rather than individual property getter methods to determine the state
of properties when rendering.
Parameters: propertyName - the name of the property the rendered property value |
getRenderIndexedProperty | final public Object getRenderIndexedProperty(String propertyName, int propertyIndex, Object defaultValue)(Code) | | Determines the "rendered state" of an indexed property.
The rendered state is determined by first determining if the given
property is locally set on this Component , and returning
it in that case. If the property state is not set locally, the
shared Style assigned to this component will be queried
for the property value. If the property state is not set in the
shared Style , the StyleSheet of the
ApplicationInstance to which this Component
is registered will be queried for the property value.
In the event the property is not set in any of these resources,
defaultValue is returned.
Parameters: propertyName - the name of the property Parameters: defaultValue - the value to be returned if the property is not set the property state |
getRenderLayoutDirection | final public LayoutDirection getRenderLayoutDirection()(Code) | | Returns the rendered LayoutDirection of the
Component .
the layout direction of this component |
getRenderLocale | final public Locale getRenderLocale()(Code) | | Returns the rendered Locale of the Component .
If this Component does not itself specify a locale, its
ancestors will be queried recursively until a Component
providing a Locale is found. If no ancestors have
Locale s set, the ApplicationInstance 's
locale will be returned. In the event that no locale information is
available from the ancestral hierarchy of Component s and
no ApplicationInstance is registered, null is returned.
the locale for this component |
getRenderProperty | final public Object getRenderProperty(String propertyName)(Code) | | Determines the "rendered state" of a property.
The rendered state is determined by first determining if the given
property is locally set on this Component , and returning
it in that case. If the property state is not set locally, the
shared Style assigned to this component will be queried
for the property value. If the property state is not set in the
shared Style , the StyleSheet of the
ApplicationInstance to which this Component
is registered will be queried for the property value.
In the event the property is not set in any of these resources,
null is returned.
The application container will invoke this method
rather than individual property getter methods to determine the state
of properties when rendering.
Parameters: propertyName - the name of the property the rendered property value |
getRenderProperty | final public Object getRenderProperty(String propertyName, Object defaultValue)(Code) | | Determines the "rendered state" of a property.
The rendered state is determined by first determining if the given
property is locally set on this Component , and returning
it in that case. If the property state is not set locally, the
shared Style assigned to this component will be queried
for the property value. If the property state is not set in the
shared Style , the StyleSheet of the
ApplicationInstance to which this Component
is registered will be queried for the property value.
In the event the property is not set in any of these resources,
defaultValue is returned.
Parameters: propertyName - the name of the property Parameters: defaultValue - the value to be returned if the property is not set the property state |
getStyle | final public Style getStyle()(Code) | | Returns the shared Style object assigned to this
Component .
As its name implies, the shared Style
may be shared amongst multiple Component s.
Style properties will be rendered from the specified Style
when they are not specified locally in the Component
itself.
the shared Style |
getStyleName | final public String getStyleName()(Code) | | Returns the name of the Style in the
ApplicationInstance 'sStyleSheet from
which the renderer will retrieve properties. The renderer will only query
the StyleSheet when properties are not specified directly
by the Component or by the Component 's
shared Style .
the style name |
getVisibleComponent | final public Component getVisibleComponent(int n)(Code) | | Returns the n th immediate visible
child Component .
Parameters: n - the index of the Component to retrieve the Component at index n throws: IndexOutOfBoundsException - when the index is invalid |
getVisibleComponentCount | final public int getVisibleComponentCount()(Code) | | Returns the number of visible immediate child
Component s.
the number of visible immediate child Component s |
getVisibleComponents | final public Component[] getVisibleComponents()(Code) | | Returns an array of all visible immediate child
Component s.
an array of all visible immediate child Component s |
hasEventListenerList | protected boolean hasEventListenerList()(Code) | | Determines if a local EventListenerList exists.
If no listener list exists, it can be assured that there are thus no
listeners registered to it. This method should be invoked by event
firing code prior to invoking getListenerList() to avoid
unnecessary creation of an EventListenerList in response
to their query.
true if a local EventListenerList exists |
indexOf | final public int indexOf(Component c)(Code) | | Determines the index of the given Component within the
children of this Component . If the given
Component is not a child, -1 is returned.
Parameters: c - the Component to analyze the index of the specified Component amongst the children of this Component |
init | public void init()(Code) | | Life-cycle method invoked when the Component is added
to a registered hierarchy. Implementations should always invoke
super.init() .
Modifications to the component hierarchy are not allowed within this
method.
|
isAncestorOf | final public boolean isAncestorOf(Component c)(Code) | | Determines if this Component is or is an ancestor of
the specified Component .
Parameters: c - the Component to test for ancestry true if this Component is an ancestor of the specified Component |
isEnabled | final public boolean isEnabled()(Code) | | Determines the enabled state of this Component .
DisabledComponent s are not eligible to receive user input.
The application container may render disabled components with an altered
appearance.
true if the component is enabled See Also: Component.verifyInput(java.lang.String,java.lang.Object) |
isFocusTraversalParticipant | public boolean isFocusTraversalParticipant()(Code) | | Determines if the Component participates in (tab) focus
traversal.
true if the Component participates in focus traversal |
isRegistered | final public boolean isRegistered()(Code) | | Determines if the Component is registered to an
ApplicationInstance .
true if the Component is registered to an ApplicationInstance |
isRenderEnabled | final public boolean isRenderEnabled()(Code) | | Determines whether this Component should be rendered with
an enabled state.
DisabledComponent s are not eligible to receive user input.
The application container may render disabled components with an altered
appearance.
true if the component should be rendered enabled. |
isRenderVisible | final public boolean isRenderVisible()(Code) | | Determines if the Component and all of its parents are
visible.
true if the Component is recursively visible |
isValidChild | public boolean isValidChild(Component child)(Code) | | Determines if a given Component is valid to be added as a
child to this Component . Default implementation always
returns true, may be overridden to provide specific behavior.
Parameters: child - the Component to evaluate as a child true if the Component is a valid child |
isValidParent | public boolean isValidParent(Component parent)(Code) | | Determines if this Component is valid to be added as a
child of the given parent Component . Default
implementation always returns true, may be overridden to provide specific
behavior.
Parameters: parent - the Component to evaluate as a parent true if the Component is a valid parent |
isVisible | final public boolean isVisible()(Code) | | Returns the visibility state of this Component .
Non-visible components will not be seen by the rendering application
container, and will not be rendered in any fashion on the user
interface. Rendering Application Containers should ensure that no
information about the state of an invisible component is provided to
the user interface for security purposes.
the visibility state of this Component |
processInput | public void processInput(String inputName, Object inputValue)(Code) | | Processes client input specific to the Component
received from the UpdateManager .
Derivative implementations should take care to invoke
super.processInput() .
Parameters: inputName - the name of the input Parameters: inputValue - the value of the input See Also: nextapp.echo2.app.update.UpdateManager |
register | void register(ApplicationInstance newValue)(Code) | | Sets the ApplicationInstance to which this component is
registered.
The ApplicationInstance to which a component is registered
may not be changed directly from one to another, i.e., if the component
is registered to instance "A" and an attempt is made to set it to
instance "B", an IllegalStateException will be thrown. In
order to change the instance to which a component is registered, the
instance must first be set to null.
Parameters: newValue - the new ApplicationInstance throws: IllegalStateException - in the event that an attempt is made tore-add a Component to a hierarchy during a dispose() operation or if an attempt is made toremove a Component during an init() operation. |
remove | public void remove(Component c)(Code) | | Removes the specified child Component from this
Component .
All Component remove operations use this method to
remove Component s. Component s that require
notification of all child removals should
override this method (while ensuring to call the superclass'
implementation).
Parameters: c - the child Component to remove |
remove | public void remove(int n)(Code) | | Removes the Component at the n th index.
Parameters: n - the index of the child Component to remove throws: IndexOutOfBoundsException - if the index is not valid |
removeAll | public void removeAll()(Code) | | Removes all child Component s.
|
removePropertyChangeListener | public void removePropertyChangeListener(PropertyChangeListener l)(Code) | | Removes a property change listener from this Component .
Parameters: l - the listener to be removed |
setBackground | public void setBackground(Color newValue)(Code) | | Sets the default background color of the Component .
Parameters: newValue - the new background Color |
setEnabled | public void setEnabled(boolean newValue)(Code) | | Sets the enabled state of the Component .
Parameters: newValue - the new state See Also: Component.isEnabled |
setFocusTraversalIndex | public void setFocusTraversalIndex(int newValue)(Code) | | Sets the focus traversal (tab) index of the component.
Parameters: newValue - the new focus traversal index See Also: Component.getFocusTraversalIndex() |
setFocusTraversalParticipant | public void setFocusTraversalParticipant(boolean newValue)(Code) | | Sets whether the component participates in the focus traversal order
(tab order).
Parameters: newValue - true if the component participates in the focus traversal order |
setFont | public void setFont(Font newValue)(Code) | | Sets the default text font of the Component .
Parameters: newValue - the new Font |
setForeground | public void setForeground(Color newValue)(Code) | | Sets the default foreground color of the Component .
Parameters: newValue - the new foreground Color |
setId | public void setId(String id)(Code) | | Sets a user-defined identifier for this Component .
Parameters: id - the new identifier |
setIndexedProperty | public void setIndexedProperty(String propertyName, int propertyIndex, Object newValue)(Code) | | Sets a generic indexed property of the Component .
The value will be stored in this Component 's local style.
Parameters: propertyName - the name of the property Parameters: propertyIndex - the index of the property Parameters: newValue - the value of the property See Also: Component.getIndexedProperty(java.lang.String,int) |
setLayoutData | public void setLayoutData(LayoutData newValue)(Code) | | Sets the LayoutData of this Component .
A LayoutData implementation describes how this
Component is laid out within/interacts with its
containing parent Component .
Parameters: newValue - the new LayoutData See Also: LayoutData |
setLayoutDirection | public void setLayoutDirection(LayoutDirection newValue)(Code) | | Sets the LayoutDirection of this Component ,
describing whether content is rendered left-to-right or right-to-left.
Parameters: newValue - the new LayoutDirection . |
setProperty | public void setProperty(String propertyName, Object newValue)(Code) | | Sets a generic property of the Component .
The value will be stored in this Component 's local style.
Parameters: propertyName - the name of the property Parameters: newValue - the value of the property See Also: Component.getProperty(java.lang.String) |
setRenderId | public void setRenderId(String renderId)(Code) | | Sets a custom render identifier for this Component .
The identifier may be changed without notification if another
component is already using it.
Identifiers are limited to ASCII alphanumeric values.
The first character must be an upper- or lower-case ASCII letter.
Underscores and other punctuation characters are not permitted.
Use of "TitleCase" or "camelCase" is recommended.
Parameters: renderId - the new identifier |
setStyle | public void setStyle(Style newValue)(Code) | | Sets the shared style of the Component .
Setting the shared style will have no impact on the local stylistic
properties of the Component .
Parameters: newValue - the new shared style See Also: Component.getStyle() |
setStyleName | public void setStyleName(String newValue)(Code) | | Sets the name of the style to use from the
ApplicationInstance -defined StyleSheet .
Setting the style name will have no impact on the local stylistic
properties of the Component .
Parameters: newValue - the new style name See Also: Component.getStyleName |
setVisible | public void setVisible(boolean newValue)(Code) | | Sets the visibility state of this Component .
Parameters: newValue - the new visibility state See Also: Component.isVisible() |
validate | public void validate()(Code) | | A life-cycle method invoked before the component is rendered to ensure it
is in a valid state. Default implementation is empty. Overriding
implementations should ensure to invoke super.validate()
out of convention.
|
verifyInput | public boolean verifyInput(String inputName, Object inputValue)(Code) | | Invoked by the ClientUpdateManager on each component in the
hierarchy whose processInput() method will layer be invoked
in the current transaction. This method should return true if the
component will be capable of processing the given input in its current
state or false otherwise. This method should not do any of the actual
processing work if overridden (any actual processing should be done in
the processInput() implementation).
The default implementation verifies that the component is visible,
enabled, and not "obscured" by the presence of any modal component.
If overriding this method, your implementation should invoke
super.verifyInput() .
Parameters: inputName - the name of the input Parameters: inputValue - the value of the input true if the input is allowed to be processed by this componentin its current state |
visibleIndexOf | final public int visibleIndexOf(Component c)(Code) | | Determines the index of the given Component within the
visible children of this Component . If the
given Component is not a child, -1 is
returned.
Parameters: c - the Component to analyze the index of the specified Component amongst the visible children of this Component |
|
|