|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||
java.lang.Objectnextapp.echo.AbstractComponent
public abstract class AbstractComponent
A base class from which all Components are derived.
| Field Summary |
|---|
| Constructor Summary | |
|---|---|
AbstractComponent()
Default Component constructor. |
|
| Method Summary | |
|---|---|
void |
add(Component c)
Adds the specified Component at the end of this Component's children. |
void |
add(Component c,
int n)
Adds the specified Component as the nth child All component add operations use this method to add components. |
void |
addHierarchyListener(HierarchyListener l)
Adds a hierarchy listener to be notified when this component's state in the hierarchy changes. |
void |
addPropertyChangeListener(java.beans.PropertyChangeListener l)
Adds a property change listener to this component. |
void |
applyStyle(Style style)
Sets stylistic properties of this component based on a Style
object. |
void |
firePropertyChange(java.lang.String propertyName,
boolean oldValue,
boolean newValue)
Reports a bound property change. |
void |
firePropertyChange(java.lang.String propertyName,
char oldValue,
char newValue)
Reports a bound property change. |
void |
firePropertyChange(java.lang.String propertyName,
double oldValue,
double newValue)
Reports a bound property change. |
void |
firePropertyChange(java.lang.String propertyName,
float oldValue,
float newValue)
Reports a bound property change. |
void |
firePropertyChange(java.lang.String propertyName,
int oldValue,
int newValue)
Reports a bound property change. |
void |
firePropertyChange(java.lang.String propertyName,
long oldValue,
long newValue)
Reports a bound property change. |
void |
firePropertyChange(java.lang.String propertyName,
java.lang.Object oldValue,
java.lang.Object newValue)
Reports a bound property change. |
Color |
getBackground()
Returns the background color of the component. |
java.lang.String |
getClientId()
Gets the reuseable Id, this is used to keep component peer id constant over show/hide cycles. |
Component |
getComponent(int n)
Gets the nth immediate child component. |
int |
getComponentCount()
Returns the number of immediate child components. |
Component[] |
getComponents()
Returns an array of all immediate child components. |
EchoInstance |
getEchoInstance()
Returns the EchoInstance object to which this component belongs, or null if it is not bound to any instance. |
Font |
getFont()
Returns the font. |
Color |
getForeground()
Returns the foreground of the component. |
java.lang.Object |
getIdentifier()
Returns the identifier for this component. |
EventListenerList |
getListenerList()
|
java.util.Locale |
getLocale()
Returns the locale of the component. |
Component |
getParent()
Returns the parent component. |
int |
indexOf(Component c)
Returns the index of the specified component if it a child of this Component, or -1 if it is not. |
void |
init()
Called exactly one time when a component is registered to a hierarchy for the first time. |
boolean |
isAncestorOf(Component c)
Determines if this component is an ancestor of the specified component. |
static boolean |
isDifferent(java.lang.Object o1,
java.lang.Object o2)
|
boolean |
isEnabled()
Returns true if the component is enabled. |
boolean |
isFocused()
Returns true if the component is focused. |
boolean |
isRecursivelyVisible()
Returns true if the component and all of its ancestors are visible. |
boolean |
isRegistered()
Returns true if the component is registered to an application. |
boolean |
isSelectableForScriptRecorder()
|
boolean |
isShowing()
Returns true if the component is registered and all of its ancestors are visible. |
boolean |
isVisible()
Returns the component's visibility state. |
void |
processHierarchyEvent(long changeFlags,
Component changed,
Component changedParent)
Notifies descendant components of a hierarchy event. |
void |
remove(Component c)
Removes the specified child component. |
void |
remove(int n)
Removes the component at the given index. |
void |
removeAll()
Removes all child Components. |
void |
removeHierarchyListener(HierarchyListener l)
Removes a hierarchy listener from being notified when this component's state in the hierarchy changes. |
void |
removePropertyChangeListener(java.beans.PropertyChangeListener l)
Removes a property change listener from this component. |
void |
setBackground(Color newValue)
Sets the background color of the component. |
void |
setClientId(java.lang.String reusableId)
Sets the reuseable Id, this is used to keep component peer id constant over show/hide cycles. |
void |
setEnabled(boolean newValue)
Sets whether the component is enabled. |
void |
setFocused(boolean newValue)
Sets whether the component is focused. |
void |
setFont(Font newValue)
Sets the font of the component. |
void |
setForeground(Color newValue)
Sets the foreground color of the component. |
void |
setIdentifier(java.lang.Object newValue)
Sets the identifier for this component. |
void |
setLocale(java.util.Locale newValue)
Sets the locale of the component. |
void |
setParent(Component parent)
|
void |
setRegistered(boolean registered)
Sets the registration state of the component and children beneath it within the hierarchy. |
void |
setSelectableForScriptRecorder(boolean b)
|
void |
setVisible(boolean newValue)
Sets the component visible or invisible. |
void |
update()
Forces the component to be re-rendered immediately. |
void |
validate()
Validates this component. |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Constructor Detail |
|---|
public AbstractComponent()
| Method Detail |
|---|
public void add(Component c)
Component
add in interface Componentc - The child component to add.
public void add(Component c,
int n)
Component
add in interface Componentc - The child component to add.n - The index at which to add the child component, or -1 to add
the component at the end.public void addHierarchyListener(HierarchyListener l)
Component
addHierarchyListener in interface Componentl - The HierarchyListener to add.public void addPropertyChangeListener(java.beans.PropertyChangeListener l)
Component
addPropertyChangeListener in interface Componentl - The listener to add.public void applyStyle(Style style)
ComponentStyle
object. The version of this method in Component will set
foreground and background colors and the font from the style if they are
present. Components should override this method if they allow more
properties to be set from a style object, and should call
super.applyStyle() if necessary.
applyStyle in interface Componentstyle - The style object from which to retrieve properties for this
Component.
public void firePropertyChange(java.lang.String propertyName,
java.lang.Object oldValue,
java.lang.Object newValue)
Component
firePropertyChange in interface ComponentpropertyName - The name of the changed property.oldValue - The previous value of the property.newValue - The present value of the property.
public void firePropertyChange(java.lang.String propertyName,
boolean oldValue,
boolean newValue)
Component
firePropertyChange in interface ComponentpropertyName - The name of the changed property.oldValue - The previous value of the property.newValue - The present value of the property.
public void firePropertyChange(java.lang.String propertyName,
char oldValue,
char newValue)
Component
firePropertyChange in interface ComponentpropertyName - The name of the changed property.oldValue - The previous value of the property.newValue - The present value of the property.
public void firePropertyChange(java.lang.String propertyName,
double oldValue,
double newValue)
Component
firePropertyChange in interface ComponentpropertyName - The name of the changed property.oldValue - The previous value of the property.newValue - The present value of the property.
public void firePropertyChange(java.lang.String propertyName,
float oldValue,
float newValue)
Component
firePropertyChange in interface ComponentpropertyName - The name of the changed property.oldValue - The previous value of the property.newValue - The present value of the property.
public void firePropertyChange(java.lang.String propertyName,
int oldValue,
int newValue)
Component
firePropertyChange in interface ComponentpropertyName - The name of the changed property.oldValue - The previous value of the property.newValue - The present value of the property.
public void firePropertyChange(java.lang.String propertyName,
long oldValue,
long newValue)
Component
firePropertyChange in interface ComponentpropertyName - The name of the changed property.oldValue - The previous value of the property.newValue - The present value of the property.public Color getBackground()
Component
getBackground in interface Componentpublic Component getComponent(int n)
Component
getComponent in interface Componentn - The index of the component to retrieve.
public int getComponentCount()
Component
getComponentCount in interface Componentpublic Component[] getComponents()
Component
getComponents in interface Componentpublic EchoInstance getEchoInstance()
Component
getEchoInstance in interface Componentpublic Font getFont()
Component
getFont in interface Componentpublic Color getForeground()
Component
getForeground in interface Componentpublic java.lang.Object getIdentifier()
Component
getIdentifier in interface Componentpublic java.util.Locale getLocale()
Component
getLocale in interface Componentpublic Component getParent()
Component
getParent in interface Componentpublic int indexOf(Component c)
Component
indexOf in interface Componentc - The component to determine the index of.
public void init()
super.init() is also invoked.
init in interface Componentpublic boolean isAncestorOf(Component c)
Component
isAncestorOf in interface Componentc - The component to test for ancestry.
public boolean isEnabled()
Component
isEnabled in interface Componentpublic boolean isFocused()
Component
isFocused in interface Componentpublic boolean isRecursivelyVisible()
isRecursivelyVisible in interface Componentpublic final boolean isRegistered()
Component
isRegistered in interface Componentpublic final boolean isShowing()
Component
isShowing in interface Componentpublic final boolean isVisible()
Component
isVisible in interface Component
public void processHierarchyEvent(long changeFlags,
Component changed,
Component changedParent)
processHierarchyEvent in interface ComponentchangeFlags - The hierarchy event flags used to describe the changes.changed - The component whose state in the hierarchy changed.changedParent - The parent (or in some cases, former parent) of the component
whose state in the hierarchy changed.public void remove(Component c)
Component
remove in interface Componentc - The child component to remove.public void remove(int n)
Component
remove in interface Componentn - The index of the child component to remove.public void removeAll()
Component
removeAll in interface Componentpublic void removeHierarchyListener(HierarchyListener l)
Component
removeHierarchyListener in interface Componentl - The HierarchyListener to remove.public void removePropertyChangeListener(java.beans.PropertyChangeListener l)
Component
removePropertyChangeListener in interface Componentl - The listener to be removed.public void setBackground(Color newValue)
Component
setBackground in interface ComponentnewValue - The new background color of the component.public void setEnabled(boolean newValue)
Component
setEnabled in interface ComponentnewValue - True if the component is enabled.public void setFocused(boolean newValue)
Component
setFocused in interface ComponentnewValue - True if the component is to be focused.public void setFont(Font newValue)
Component
setFont in interface ComponentnewValue - The new font of the component.public void setForeground(Color newValue)
Component
setForeground in interface ComponentnewValue - The new foreground color of the component.public void setIdentifier(java.lang.Object newValue)
Component
setIdentifier in interface ComponentnewValue - The new identifier for this component.public void setLocale(java.util.Locale newValue)
Component
setLocale in interface ComponentnewValue - The new locale for the component.public void setRegistered(boolean registered)
setRegistered in interface Componentregistered - The new registration state.public void setVisible(boolean newValue)
Component
setVisible in interface ComponentnewValue - The new visibility state of the component.public void update()
Component
update in interface Componentpublic void validate()
Componentvalidate() is not inadvisable.
validate in interface Componentpublic java.lang.String getClientId()
ComponentGets the reuseable Id, this is used to keep component peer id constant over show/hide cycles.
getClientId in interface Componentpublic void setClientId(java.lang.String reusableId)
ComponentSets the reuseable Id, this is used to keep component peer id constant over show/hide cycles. Do not call from your application code !
setClientId in interface Component
public static boolean isDifferent(java.lang.Object o1,
java.lang.Object o2)
public EventListenerList getListenerList()
getListenerList in interface Componentpublic void setParent(Component parent)
setParent in interface Componentpublic boolean isSelectableForScriptRecorder()
isSelectableForScriptRecorder in interface Componentpublic void setSelectableForScriptRecorder(boolean b)
setSelectableForScriptRecorder in interface Component
|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||