|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Object![]()
![]()
![]()
java.beans.beancontext.BeanContextChildSupport
![]()
![]()
![]()
java.beans.beancontext.BeanContextSupport
, BeanContextChild
, BeanContextServiceRevokedListener
, BeanContextServicesListener
, DesignMode
, PropertyChangeListener
, VetoableChangeListener
, Visibility
, Serializable
, Iterable
, Collection
, EventListener


public class BeanContextSupport

, Serializable
, PropertyChangeListener
, VetoableChangeListener

This helper class provides a utility implementation of the java.beans.beancontext.BeanContext interface.
Since this class directly implements the BeanContext interface, the class can, and is intended to be used either by subclassing this implementation, or via ad-hoc delegation of an instance of this class from another.
| Nested Class Summary | |
|---|---|
protected class |
BeanContextSupport.BCSChild
|
protected static class |
BeanContextSupport.BCSIterator
protected final subclass that encapsulates an iterator but implements a noop remove() method. |
| Field Summary | |
|---|---|
protected ArrayList |
bcmListeners
all accesses to the protected ArrayList bcmListeners field
shall be synchronized on that object. |
protected HashMap |
children
all accesses to the protected HashMap children field
shall be synchronized on that object. |
protected boolean |
designTime
A boolean indicating whether or not this object is currently in design time mode. |
protected Locale |
locale
The current locale of this BeanContext. |
protected boolean |
okToUseGui
A boolean indicating if this instance may now render a GUI. |
Fields inherited from class java.beans.beancontext.BeanContextChildSupport ![]() |
|---|
beanContext |
Fields inherited from interface java.beans.beancontext.BeanContext ![]() |
|---|
globalHierarchyLock |
Fields inherited from interface java.beans.DesignMode ![]() |
|---|
PROPERTYNAME |
| Constructor Summary | |
|---|---|
BeanContextSupport
Create an instance that is not a delegate of another object |
|
BeanContextSupport
Create an instance using with a default locale |
|
BeanContextSupport
Create an instance using the specified locale |
|
BeanContextSupport
Create an instance using the specified Locale and design mode. |
|
BeanContextSupport
Construct a BeanContextSupport instance |
|
| Method Summary | |
|---|---|
boolean |
add
Adds/nests a child within this BeanContext. |
boolean |
addAll
add Collection to set of Children (Unsupported) implementations must synchronized on the hierarchy lock and "children" protected field |
void |
addBeanContextMembershipListener
Adds a BeanContextMembershipListener |
boolean |
avoidingGui
Used to determine if the BeanContext child is avoiding using its GUI. |
protected Iterator |
bcsChildren
Returns an iterator of all children of this BeanContext. |
protected void |
bcsPreDeserializationHook
called by readObject after defaultReadObject() but prior to deserialization of any children. |
protected void |
bcsPreSerializationHook
called by writeObject after defaultWriteObject() but prior to serialization of currently serializable children. |
protected void |
childDeserializedHook
Called by readObject with the newly deserialized child and BCSChild. |
protected void |
childJustAddedHook
subclasses may override this method to simply extend add() semantics after the child has been added and before the event notification has occurred. |
protected void |
childJustRemovedHook
subclasses may override this method to simply extend remove() semantics after the child has been removed and before the event notification has occurred. |
protected static boolean |
classEquals
Tests to see if two class objects, or their names are equal. |
void |
clear
clear the children (Unsupported) implementations must synchronized on the hierarchy lock and "children" protected field |
boolean |
contains
Determines whether or not the specified object is currently a child of this BeanContext. |
boolean |
containsAll
Tests to see if all objects in the specified Collection are children of this BeanContext. |
boolean |
containsKey
Determines whether or not the specified object is currently a child of this BeanContext. |
protected Object |
copyChildren
Gets a copy of the this BeanContext's children. |
protected BeanContextSupport.BCSChild |
createBCSChild
Subclasses can override this method to insert their own subclass of Child without having to override add() or the other Collection methods that add children to the set. |
protected void |
deserialize
used by readObject to deserialize a collection. |
void |
dontUseGui
notify this instance that it may no longer render a GUI. |
protected void |
fireChildrenAdded
Fire a BeanContextshipEvent on the BeanContextMembershipListener interface |
protected void |
fireChildrenRemoved
Fire a BeanContextshipEvent on the BeanContextMembershipListener interface |
BeanContext |
getBeanContextPeer
Gets the instance of BeanContext that this object is providing the implementation for. |
protected static BeanContextChild |
getChildBeanContextChild
Gets the BeanContextChild (if any) of the specified child |
protected static BeanContextMembershipListener |
getChildBeanContextMembershipListener
Gets the BeanContextMembershipListener (if any) of the specified child |
protected static PropertyChangeListener |
getChildPropertyChangeListener
Gets the PropertyChangeListener (if any) of the specified child |
protected static Serializable |
getChildSerializable
Gets the Serializable (if any) associated with the specified Child |
protected static VetoableChangeListener |
getChildVetoableChangeListener
Gets the VetoableChangeListener (if any) of the specified child |
protected static Visibility |
getChildVisibility
Gets the Component (if any) associated with the specified child. |
Locale |
getLocale
Gets the locale for this BeanContext. |
URL |
getResource
Analagous to java.lang.ClassLoader.getResource(), this
method allows a BeanContext implementation to interpose
behavior between the child Component
and underlying ClassLoader. |
InputStream |
getResourceAsStream
Analagous to java.lang.ClassLoader.getResourceAsStream(),
this method allows a BeanContext implementation
to interpose behavior between the child Component
and underlying ClassLoader. |
protected void |
initialize
protected method called from constructor and readObject to initialize transient state of BeanContextSupport instance. |
Object |
instantiateChild
The instantiateChild method is a convenience hook in BeanContext to simplify the task of instantiating a Bean, nested, into a BeanContext. |
boolean |
isDesignTime
Reports whether or not this object is in currently in design time mode. |
boolean |
isEmpty
Reports whether or not this BeanContext is empty. |
boolean |
isSerializing
Is this BeanContext in the process of being serialized? |
Iterator |
iterator
Gets all JavaBean or BeanContext instances currently nested in this BeanContext. |
boolean |
needsGui
This method is typically called from the environment in order to determine if the implementor "needs" a GUI. |
void |
okToUseGui
Notify this instance that it may now render a GUI |