API Overview API Index Package Overview Direct link to this page
JDK 1.6
  java.beans.beancontext. BeanContextSupport View Source
Author(s)
Laurence P. G. Cable
Since
1.2
Version
1.46, 01/13/03
Serial
Hierarchy
 Object
      BeanContextChildSupport
          BeanContextSupport
Implements
 BeanContext
 Serializable
 PropertyChangeListener
 VetoableChangeListener
Subclasses
Description
public class BeanContextSupport
  This helper class provides a utility implementation of the java.beans.beancontext.BeanContext interface.
See also:   
Constructors
public BeanContextSupport ()
Create an instance that is not a delegate of another object
public BeanContextSupport (BeanContext peer)
  Create an instance using with a default locale
public BeanContextSupport (BeanContext peer, Locale lcle)
  Create an instance using the specified locale
public BeanContextSupport (BeanContext peer, Locale lcle, boolean dtime)
  Create an instance using the specified Locale and design mode.
public BeanContextSupport (BeanContext peer, Locale lcle, boolean dTime, boolean visible)
  Construct a BeanContextSupport instance
Methods
Hide/Show inherited methods
public boolean add (Object targetChild)
  Adds/nests a child within this BeanContext.
public boolean addAll (Collection c)
  add Collection to set of Children (Unsupported) implementations must synchronized on the hierarchy lock and "children" protected field
public void addBeanContextMembershipListener (BeanContextMembershipListener bcml) [Specified in BeanContext]
  Adds a BeanContextMembershipListener
public void addPropertyChangeListener (String name, PropertyChangeListener pcl) [Inherited From BeanContextChildSupport]
  Add a PropertyChangeListener for a specific property.
public void addVetoableChangeListener (String name, VetoableChangeListener vcl) [Inherited From BeanContextChildSupport]
  Add a VetoableChangeListener for a specific property.
public 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 (ObjectInputStream ois) throws IOException ClassNotFoundException
  called by readObject after defaultReadObject() but prior to deserialization of any children.
protected void bcsPreSerializationHook (ObjectOutputStream oos) throws IOException
  called by writeObject after defaultWriteObject() but prior to serialization of currently serializable children.
protected void childDeserializedHook (Object child, BCSChild bcsc)
  Called by readObject with the newly deserialized child and BCSChild.
protected void childJustAddedHook (Object child, BCSChild bcsc)
  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 (Object child, BCSChild bcsc)
  subclasses may override this method to simply extend remove() semantics after the child has been removed and before the event notification has occurred.
protectedfinalstatic boolean classEquals (Class first, Class second)
  Tests to see if two class objects, or their names are equal.
public void clear ()
  clear the children (Unsupported) implementations must synchronized on the hierarchy lock and "children" protected field
public boolean contains (Object o)
  Determines whether or not the specified object is currently a child of this BeanContext.
public boolean containsAll (Collection c)
  Tests to see if all objects in the specified Collection are children of this BeanContext.
public boolean containsKey (Object o)
  Determines whether or not the specified object is currently a child of this BeanContext.
protectedfinal Object copyChildren ()
  Gets a copy of the this BeanContext's children.
protected BCSChild createBCSChild (Object targetChild, Object peer)
  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.
protectedfinal void deserialize (ObjectInputStream ois, Collection coll) throws IOException ClassNotFoundException
  used by readObject to deserialize a collection.
publicsynchronized void dontUseGui ()
notify this instance that it may no longer render a GUI.
protectedfinal void fireChildrenAdded (BeanContextMembershipEvent bcme)
Fire a BeanContextshipEvent on the BeanContextMembershipListener interface
protectedfinal void fireChildrenRemoved (BeanContextMembershipEvent bcme)
Fire a BeanContextshipEvent on the BeanContextMembershipListener interface
public void firePropertyChange (String name, Object oldValue, Object newValue) [Inherited From BeanContextChildSupport]
  Report a bound property update to any registered listeners.
public void fireVetoableChange (String name, Object oldValue, Object newValue) throws PropertyVetoException [Inherited From BeanContextChildSupport]
  Report a vetoable property update to any registered listeners.
publicsynchronized BeanContext getBeanContext () [Inherited From BeanContextChildSupport]
  Gets the nesting BeanContext for this BeanContextChildSupport.
public BeanContextChild getBeanContextChildPeer () [Inherited From BeanContextChildSupport]
  Gets the BeanContextChild associated with this BeanContextChildSupport.
public BeanContext getBeanContextPeer ()
  Gets the instance of BeanContext that this object is providing the implementation for.
protectedfinalstatic BeanContextChild getChildBeanContextChild (Object child)
  Gets the BeanContextChild (if any) of the specified child
protectedfinalstatic BeanContextMembershipListener getChildBeanContextMembershipListener (Object child)
  Gets the BeanContextMembershipListener (if any) of the specified child
protectedfinalstatic PropertyChangeListener getChildPropertyChangeListener (Object child)
  Gets the PropertyChangeListener (if any) of the specified child
protectedfinalstatic Serializable getChildSerializable (Object child)
  Gets the Serializable (if any) associated with the specified Child
protectedfinalstatic VetoableChangeListener getChildVetoableChangeListener (Object child)
  Gets the VetoableChangeListener (if any) of the specified child
protectedfinalstatic Visibility getChildVisibility (Object child)
  Gets the Component (if any) associated with the specified child.
publicsynchronized Locale getLocale ()
  Gets the locale for this BeanContext.
public URL getResource (String name, BeanContextChild bcc) [Specified in BeanContext]
 
public InputStream getResourceAsStream (String name, BeanContextChild bcc) [Specified in BeanContext]
 
protectedsynchronized void initialize ()
  protected method called from constructor and readObject to initialize transient state of BeanContextSupport instance.
protected void initializeBeanContextResources () [Inherited From BeanContextChildSupport]
  This method may be overridden by subclasses to provide their own initialization behaviors.
public Object instantiateChild (String beanName) throws IOException ClassNotFoundException [Specified in BeanContext]
  The instantiateChild method is a convenience hook in BeanContext to simplify the task of instantiating a Bean, nested, into a BeanContext.
public boolean isDelegated () [Inherited From BeanContextChildSupport]
  Reports whether or not this class is a delegate of another.
publicsynchronized boolean isDesignTime ()
  Reports whether or not this object is in currently in design time mode.
public boolean isEmpty ()
  Reports whether or not this BeanContext is empty.
public boolean isSerializing ()
  Is this BeanContext in the process of being serialized?
public Iterator iterator ()
  Gets all JavaBean or BeanContext instances currently nested in this BeanContext.
publicsynchronized boolean needsGui ()
  This method is typically called from the environment in order to determine if the implementor "needs" a GUI.
publicsynchronized void okToUseGui ()
Notify this instance that it may now render a GUI
public void propertyChange (PropertyChangeEvent pce) [Specified in PropertyChangeListener]
subclasses may envelope to monitor child property changes.
publicfinal void readChildren (ObjectInputStream ois) throws IOException ClassNotFoundException
When an instance of this class is used as a delegate for the implementation of the BeanContext protocols (and its subprotocols) there exists a 'chicken and egg' problem during deserialization
protected void releaseBeanContextResources () [Inherited From BeanContextChildSupport]
  This method may be overridden by subclasses to provide their own release behaviors.
public boolean remove (Object targetChild)
  Removes a child from this BeanContext.
protected boolean remove (Object targetChild, boolean callChildSetBC)
  internal remove used when removal caused by unexpected setBeanContext or by remove() invocation.
public boolean removeAll (Collection c)
  remove all specified children (Unsupported) implementations must synchronized on the hierarchy lock and "children" protected field
public void removeBeanContextMembershipListener (BeanContextMembershipListener bcml) [Specified in BeanContext]
  Removes a BeanContextMembershipListener
public void removePropertyChangeListener (String name, PropertyChangeListener pcl) [Inherited From BeanContextChildSupport]
  Remove a PropertyChangeListener for a specific property.
public void removeVetoableChangeListener (String name, VetoableChangeListener vcl) [Inherited From BeanContextChildSupport]
  Removes a VetoableChangeListener.
public boolean retainAll (Collection c)
  retain only specified children (Unsupported) implementations must synchronized on the hierarchy lock and "children" protected field
protectedfinal void serialize (ObjectOutputStream oos, Collection coll) throws IOException
  Used by writeObject to serialize a Collection.
public void serviceAvailable (BeanContextServiceAvailableEvent bcsae) [Inherited From BeanContextChildSupport]
  A new service is available from the nesting BeanContext.
public void serviceRevoked (BeanContextServiceRevokedEvent bcsre) [Inherited From BeanContextChildSupport]
  A service provided by the nesting BeanContext has been revoked.
publicsynchronized void setBeanContext (BeanContext bc) throws PropertyVetoException [Inherited From BeanContextChildSupport]
  Sets the BeanContext for this BeanContextChildSupport.
publicsynchronized void setDesignTime (boolean dTime)
  Sets the new design time value for this BeanContext.
publicsynchronized void setLocale (Locale newLocale) throws PropertyVetoException
  Sets the locale of this BeanContext.
public int size ()
  Gets the number of children currently nested in this BeanContext.
public Object toArray ()
Gets all JavaBean or BeanContext instances currently nested in this BeanContext.
public Object toArray (Object arry)
  Gets an array containing all children of this BeanContext that match the types contained in arry.
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.
public boolean validatePendingSetBeanContext (BeanContext newValue) [Inherited From BeanContextChildSupport]
  Called from setBeanContext to validate (or otherwise) the pending change in the nesting BeanContext property value.
public void vetoableChange (PropertyChangeEvent pce) throws PropertyVetoException [Specified in VetoableChangeListener]
subclasses may envelope to monitor veto child property changes.
publicfinal void writeChildren (ObjectOutputStream oos) throws IOException
  Used to serialize all children of this BeanContext.
Fields
Hide/Show inherited fields
protectedtransient ArrayList bcmListeners
all accesses to the protected ArrayList bcmListeners field shall be synchronized on that object.
protectedtransient BeanContext beanContext [Inherited From BeanContextChildSupport]
public BeanContextChild beanContextChildPeer [Inherited From BeanContextChildSupport]
The BeanContext in which this BeanContextChild is nested.
protectedtransient 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.
publicfinalstatic Object globalHierarchyLock [Inherited From BeanContext]
This global lock is used by both BeanContext and BeanContextServices implementors to serialize changes in a BeanContext hierarchy and any service requests etc.
protected Locale locale
The current locale of this BeanContext.
protected boolean okToUseGui
A boolean indicating if this instance may now render a GUI.
protected PropertyChangeSupport pcSupport [Inherited From BeanContextChildSupport]
The PropertyChangeSupport associated with this BeanContextChildSupport.
publicfinalstatic String PROPERTYNAME = "designTime" [Inherited From BeanContext]
The standard value of the propertyName as fired from a BeanContext or other source of PropertyChangeEvents.
protectedtransient boolean rejectedSetBCOnce [Inherited From BeanContextChildSupport]
A flag indicating that there has been at least one PropertyChangeVetoException thrown for the attempted setBeanContext operation.
pack-privatefinalstatic long serialVersionUID = "-4879613978649577204" [Overrides BeanContextChildSupport]
protected VetoableChangeSupport vcSupport [Inherited From BeanContextChildSupport]
The VetoableChangeSupport associated with this BeanContextChildSupport.
Nested Classes
  BeanContextSupport.BCSIterator
protected final subclass that encapsulates an iterator but implements a noop remove() method.
  BeanContextSupport.BCSChild
Generated By: JavaOnTracks Doclet 0.1.4     ©Thibaut Colar