Contents | Package | Class | Tree | Deprecated | Index | Help | Java 1.2 Beta 3 | ||
PREV | NEXT | SHOW LISTS | HIDE LISTS |
java.lang.Object | +----java.beans.beancontext.BeanContextChildSupport | +----java.beans.beancontext.BeanContextSupport
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.
Inner Class Summary | |
BeanContextSupport.BCSChild
|
|
static | BeanContextSupport.BCSIterator
|
Field Summary | |
ArrayList | bcmListeners
|
HashMap | children
|
boolean | designTime
|
Locale | locale
|
boolean | okToUseGui
|
Fields inherited from class java.beans.beancontext.BeanContextChildSupport |
beanContext, beanContextChildPeer, pcSupport, rejectedSetBCOnce, vcSupport |
Constructor Summary | |
BeanContextSupport(BeanContext peer,
Locale lcle,
boolean dTime,
boolean visible)
Construct a BeanContextSupport instance |
|
BeanContextSupport(BeanContext peer,
Locale lcle,
boolean dtime)
|
|
BeanContextSupport(BeanContext peer,
Locale lcle)
|
|
BeanContextSupport(BeanContext peer)
|
|
BeanContextSupport()
|
Method Summary | |
boolean | add(Object targetChild)
Adds/nests a child within this BeanContext Invoked as a side effect of java.beans.Beans.instantiate(). |
boolean | addAll(Collection c)
|
void | addBeanContextMembershipListener(BeanContextMembershipListener bcml)
|
boolean | avoidingGui()
|
Iterator | bcsChildren()
|
void | bcsPreDeserializationHook(ObjectInputStream ois)
|
void | bcsPreSerializationHook(ObjectOutputStream oos)
|
void | childDeserializedHook(Object child,
BeanContextSupport.BCSChild bcsc)
|
void | childJustAddedHook(Object child,
BeanContextSupport.BCSChild bcsc)
|
void | childJustRemovedHook(Object child,
BeanContextSupport.BCSChild bcsc)
|
static boolean | classEquals(Class first,
Class second)
|
void | clear()
|
boolean | contains(Object o)
|
boolean | containsAll(Collection c)
|
boolean | containsKey(Object o)
|
Object[] | copyChildren()
|
BeanContextSupport.BCSChild | createBCSChild(Object targetChild)
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. |
void | deserialize(ObjectInputStream ois,
Collection coll)
|
void | dontUseGui()
|
void | fireChildrenAdded(BeanContextMembershipEvent bcme)
|
void | fireChildrenRemoved(BeanContextMembershipEvent bcme)
|
BeanContext | getBeanContextPeer()
|
static BeanContextChild | getChildBeanContextChild(Object child)
|
static BeanContextMembershipListener | getChildBeanContextMembershipListener(Object child)
|
static PropertyChangeListener | getChildPropertyChangeListener(Object child)
|
static Serializable | getChildSerializable(Object child)
|
static VetoableChangeListener | getChildVetoableChangeListener(Object child)
|
static Visibility | getChildVisibility(Object child)
|
Locale | getLocale()
|
URL | getResource(String name,
BeanContextChild bcc)
|
InputStream | getResourceAsStream(String name,
BeanContextChild bcc)
|
void | initialize()
|
Object | instantiateChild(String beanName)
The instantiateChild method is a convenience hook in BeanContext to simplify the task of instantiating a Bean, nested, into a BeanContext. |
boolean | isDesignTime()
|
boolean | isEmpty()
|
boolean | isSerializing()
|
Iterator | iterator()
|
boolean | needsGui()
|
void | okToUseGui()
|
void | propertyChange(PropertyChangeEvent pce)
|
void | readChildren(ObjectInputStream ois)
|
boolean | remove(Object targetChild)
|
boolean | remove(Object targetChild,
boolean callChildSetBC)
|
boolean | removeAll(Collection c)
|
void | removeBeanContextMembershipListener(BeanContextMembershipListener bcml)
|
boolean | retainAll(Collection c)
|
void | serialize(ObjectOutputStream oos,
Collection coll)
|
void | setDesignTime(boolean dTime)
|
void | setLocale(Locale newLocale)
|
int | size()
|
Object[] | toArray()
|
Object[] | toArray(Object[] arry)
|
boolean | validatePendingAdd(Object targetChild)
Subclasses of this class may override, or envelope, this method to add validation behavior for the BeanContext to examine child objects immediately prior to their being added to the BeanContext. |
boolean | validatePendingRemove(Object targetChild)
Subclasses of this class may override, or envelope, this method to add validation behavior for the BeanContext to examine child objects immediately prior to their being removed from the BeanContext. |
void | vetoableChange(PropertyChangeEvent pce)
|
void | writeChildren(ObjectOutputStream oos)
|
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
protected transient HashMap children
protected transient ArrayList bcmListeners
protected Locale locale
protected boolean okToUseGui
protected boolean designTime
Constructor Detail |
public BeanContextSupport(BeanContext peer, Locale lcle, boolean dTime, boolean visible)
Construct a BeanContextSupport instance
peer
- The peer BeanContext we are supplying an implementation for, if null the this object is its own peer
lcle
- The current Locale for this BeanContext.
dtime
- The initial state, true if in design mode, false if runtime.
visible
- The initial visibility.
public BeanContextSupport(BeanContext peer, Locale lcle, boolean dtime)
peer
- The peer BeanContext we are supplying an implementation for, if null the this object is its own peer
lcle
- The current Locale for this BeanContext.
dtime
- The initial state, true if in design mode, false if runtime.
public BeanContextSupport(BeanContext peer, Locale lcle)
peer
- The peer BeanContext we are supplying an implementation for, if null the this object is its own peer
lcle
- The current Locale for this BeanContext.
public BeanContextSupport(BeanContext peer)
peer
- The peer BeanContext we are supplying an implementation for, if null the this object is its own peer
public BeanContextSupport()
Method Detail |
public BeanContext getBeanContextPeer()
public Object instantiateChild(String beanName) throws IOException, ClassNotFoundException
The instantiateChild method is a convenience hook in BeanContext to simplify the task of instantiating a Bean, nested, into a BeanContext.
The semantics of the beanName parameter are defined by java.beans.Beans.instantate.
beanName
- the name of the Bean to instantiate within this BeanContext
public int size()
public boolean isEmpty()
public boolean contains(Object o)
public boolean containsKey(Object o)
public Iterator iterator()
public Object[] toArray()
public Object[] toArray(Object[] arry)
protected BeanContextSupport.BCSChild createBCSChild(Object targetChild)
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.
targetChild
- the child to create the Child on behalf of
public boolean add(Object targetChild)
Adds/nests a child within this BeanContext
Invoked as a side effect of java.beans.Beans.instantiate().
targetChildren
- The child objects to nest within this BeanContext
public boolean remove(Object targetChild)
targetChildren
- The child objects to remove
protected boolean remove(Object targetChild, boolean callChildSetBC)
public boolean containsAll(Collection c)
public boolean addAll(Collection c)
public boolean removeAll(Collection c)
public boolean retainAll(Collection c)
public void clear()
public void addBeanContextMembershipListener(BeanContextMembershipListener bcml)
bcml
- the BeanContextMembershipListener to add
public void removeBeanContextMembershipListener(BeanContextMembershipListener bcml)
bcml
- the BeanContextMembershipListener to remove
public InputStream getResourceAsStream(String name, BeanContextChild bcc)
name
- the name of the resource requested.
child
- the child object making the request.
public URL getResource(String name, BeanContextChild bcc)
name
- the name of the resource requested.
child
- the child object making the request.
public void setDesignTime(boolean dTime)
dTime
- the new designTime value
public boolean isDesignTime()
public void setLocale(Locale newLocale) throws PropertyVetoException
newLocale
- the new locale
public Locale getLocale()
public boolean needsGui()
public void dontUseGui()
public void okToUseGui()
public boolean avoidingGui()
public boolean isSerializing()
protected Iterator bcsChildren()
protected void bcsPreSerializationHook(ObjectOutputStream oos) throws IOException
protected void bcsPreDeserializationHook(ObjectInputStream ois) throws IOException, ClassNotFoundException
protected void childDeserializedHook(Object child, BeanContextSupport.BCSChild bcsc)
protected final void serialize(ObjectOutputStream oos, Collection coll) throws IOException
protected final void deserialize(ObjectInputStream ois, Collection coll) throws IOException, ClassNotFoundException
public final void writeChildren(ObjectOutputStream oos) throws IOException
public final void readChildren(ObjectInputStream ois) throws IOException, ClassNotFoundException
public void vetoableChange(PropertyChangeEvent pce) throws PropertyVetoException
public void propertyChange(PropertyChangeEvent pce)
protected boolean validatePendingAdd(Object targetChild)
Subclasses of this class may override, or envelope, this method to add validation behavior for the BeanContext to examine child objects immediately prior to their being added to the BeanContext.
protected boolean validatePendingRemove(Object targetChild)
Subclasses of this class may override, or envelope, this method to add validation behavior for the BeanContext to examine child objects immediately prior to their being removed from the BeanContext.
protected void childJustAddedHook(Object child, BeanContextSupport.BCSChild bcsc)
protected void childJustRemovedHook(Object child, BeanContextSupport.BCSChild bcsc)
protected static final Visibility getChildVisibility(Object child)
protected static final Serializable getChildSerializable(Object child)
protected static final PropertyChangeListener getChildPropertyChangeListener(Object child)
protected static final VetoableChangeListener getChildVetoableChangeListener(Object child)
protected static final BeanContextMembershipListener getChildBeanContextMembershipListener(Object child)
protected static final BeanContextChild getChildBeanContextChild(Object child)
protected final void fireChildrenAdded(BeanContextMembershipEvent bcme)
protected final void fireChildrenRemoved(BeanContextMembershipEvent bcme)
protected void initialize()
protected final Object[] copyChildren()
protected static final boolean classEquals(Class first, Class second)
Contents | Package | Class | Tree | Deprecated | Index | Help | Java 1.2 Beta 3 | ||
PREV | NEXT | SHOW LISTS | HIDE LISTS |