|
|||||||||
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 Component
c
- The child component to add.public void add(Component c, int n)
Component
add
in interface Component
c
- 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 Component
l
- The HierarchyListener
to add.public void addPropertyChangeListener(java.beans.PropertyChangeListener l)
Component
addPropertyChangeListener
in interface Component
l
- The listener to add.public void applyStyle(Style style)
Component
Style
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 Component
style
- 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 Component
propertyName
- 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 Component
propertyName
- 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 Component
propertyName
- 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 Component
propertyName
- 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 Component
propertyName
- 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 Component
propertyName
- 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 Component
propertyName
- 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 Component
public Component getComponent(int n)
Component
getComponent
in interface Component
n
- The index of the component to retrieve.
public int getComponentCount()
Component
getComponentCount
in interface Component
public Component[] getComponents()
Component
getComponents
in interface Component
public EchoInstance getEchoInstance()
Component
getEchoInstance
in interface Component
public Font getFont()
Component
getFont
in interface Component
public Color getForeground()
Component
getForeground
in interface Component
public java.lang.Object getIdentifier()
Component
getIdentifier
in interface Component
public java.util.Locale getLocale()
Component
getLocale
in interface Component
public Component getParent()
Component
getParent
in interface Component
public int indexOf(Component c)
Component
indexOf
in interface Component
c
- The component to determine the index of.
public void init()
super.init()
is also invoked.
init
in interface Component
public boolean isAncestorOf(Component c)
Component
isAncestorOf
in interface Component
c
- The component to test for ancestry.
public boolean isEnabled()
Component
isEnabled
in interface Component
public boolean isFocused()
Component
isFocused
in interface Component
public boolean isRecursivelyVisible()
isRecursivelyVisible
in interface Component
public final boolean isRegistered()
Component
isRegistered
in interface Component
public final boolean isShowing()
Component
isShowing
in interface Component
public final boolean isVisible()
Component
isVisible
in interface Component
public void processHierarchyEvent(long changeFlags, Component changed, Component changedParent)
processHierarchyEvent
in interface Component
changeFlags
- 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 Component
c
- The child component to remove.public void remove(int n)
Component
remove
in interface Component
n
- The index of the child component to remove.public void removeAll()
Component
removeAll
in interface Component
public void removeHierarchyListener(HierarchyListener l)
Component
removeHierarchyListener
in interface Component
l
- The HierarchyListener
to remove.public void removePropertyChangeListener(java.beans.PropertyChangeListener l)
Component
removePropertyChangeListener
in interface Component
l
- The listener to be removed.public void setBackground(Color newValue)
Component
setBackground
in interface Component
newValue
- The new background color of the component.public void setEnabled(boolean newValue)
Component
setEnabled
in interface Component
newValue
- True if the component is enabled.public void setFocused(boolean newValue)
Component
setFocused
in interface Component
newValue
- True if the component is to be focused.public void setFont(Font newValue)
Component
setFont
in interface Component
newValue
- The new font of the component.public void setForeground(Color newValue)
Component
setForeground
in interface Component
newValue
- The new foreground color of the component.public void setIdentifier(java.lang.Object newValue)
Component
setIdentifier
in interface Component
newValue
- The new identifier for this component.public void setLocale(java.util.Locale newValue)
Component
setLocale
in interface Component
newValue
- The new locale for the component.public void setRegistered(boolean registered)
setRegistered
in interface Component
registered
- The new registration state.public void setVisible(boolean newValue)
Component
setVisible
in interface Component
newValue
- The new visibility state of the component.public void update()
Component
update
in interface Component
public void validate()
Component
validate()
is not inadvisable.
validate
in interface Component
public java.lang.String getClientId()
Component
Gets the reuseable Id, this is used to keep component peer id constant over show/hide cycles.
getClientId
in interface Component
public void setClientId(java.lang.String reusableId)
Component
Sets 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 Component
public void setParent(Component parent)
setParent
in interface Component
public boolean isSelectableForScriptRecorder()
isSelectableForScriptRecorder
in interface Component
public void setSelectableForScriptRecorder(boolean b)
setSelectableForScriptRecorder
in interface Component
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |