|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
ObjectControlBeanContextChildSupport
ControlBeanContextSupport
public class ControlBeanContextSupport
BeanContext implementation for Beehive Controls.
Field Summary |
---|
Fields inherited from interface BeanContext |
---|
globalHierarchyLock |
Fields inherited from interface DesignMode |
---|
PROPERTYNAME |
Constructor Summary | |
---|---|
ControlBeanContextSupport()
Constructor. |
|
ControlBeanContextSupport(BeanContext peer)
Constructor. |
Method Summary | |
---|---|
boolean |
add(Object o)
Add a child to this BeanContext. |
boolean |
addAll(Collection c)
Not supported. |
void |
addBeanContextMembershipListener(BeanContextMembershipListener bcml)
Adds the specified BeanContextMembershipListener
to receive BeanContextMembershipEvents from
this BeanContext whenever it adds
or removes a child Component (s). |
boolean |
avoidingGui()
Determines whether this bean is avoiding using a GUI. |
void |
clear()
Not supported. |
boolean |
contains(Object o)
Returns true if this BeanContext contains the specified child. |
boolean |
containsAll(Collection c)
Returns true if this BeanContext contains all of the children in the specified collection. |
void |
dontUseGui()
This method instructs the bean that it should not use the Gui. |
URL |
getResource(String name,
BeanContextChild bcc)
Analagous to java.lang.ClassLoader.getResource() , this
method allows a BeanContext implementation to interpose
behavior between the child Component
and underlying ClassLoader . |
InputStream |
getResourceAsStream(String name,
BeanContextChild bcc)
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()
Init this classes data structures. |
Object |
instantiateChild(String beanName)
Instantiate the javaBean named as a child of this BeanContext . |
boolean |
isDesignTime()
A value of true denotes that JavaBeans should behave in design time mode, a value of false denotes runtime behavior. |
boolean |
isEmpty()
Returns true if this BeanContext has no children. |
Iterator |
iterator()
Returns an iterator over the elements in this collection. |
boolean |
needsGui()
Determines whether this bean needs a GUI. |
void |
okToUseGui()
This method instructs the bean that it is OK to use the Gui. |
void |
propertyChange(PropertyChangeEvent evt)
This method gets called when a bound property is changed. |
void |
readChildren(ObjectInputStream in)
This public api is necessary to allow a bean context with a peer to deserialize its children. |
boolean |
remove(Object o)
Remove the specified child from this BeanContext. |
boolean |
removeAll(Collection c)
Not supported. |
void |
removeBeanContextMembershipListener(BeanContextMembershipListener bcml)
Removes the specified BeanContextMembershipListener
so that it no longer receives BeanContextMembershipEvent s
when the child Component (s) are added or removed. |
boolean |
retainAll(Collection c)
Not supported. |
void |
setDesignTime(boolean designTime)
Sets the "value" of the "designTime" property. |
int |
size()
Returns the number of children in this BeanContext. |
Object[] |
toArray()
Returns an array containing all of the children in this BeanContext. |
Object[] |
toArray(Object[] a)
Returns an array containing all of the children of this BeanContext; the runtime type of the returned array is that of the specified array. |
void |
vetoableChange(PropertyChangeEvent evt)
This method gets called when a constrained property is changed. |
void |
writeChildren(ObjectOutputStream oos)
Necessary for the case of this bean context having a peer. |
Methods inherited from class Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Methods inherited from interface BeanContextChild |
---|
addPropertyChangeListener, addVetoableChangeListener, getBeanContext, removePropertyChangeListener, removeVetoableChangeListener, setBeanContext |
Methods inherited from interface Collection |
---|
equals, hashCode |
Constructor Detail |
---|
public ControlBeanContextSupport()
public ControlBeanContextSupport(BeanContext peer)
peer
- Method Detail |
---|
public Object instantiateChild(String beanName) throws IOException, ClassNotFoundException
BeanContext
.
The implementation of the JavaBean is
derived from the value of the beanName parameter,
and is defined by the
java.beans.Beans.instantiate()
method.
instantiateChild
in interface BeanContext
beanName
- The name of the JavaBean to instantiate
as a child of this BeanContext
IOException
ClassNotFoundException
- if the class identified
by the beanName parameter is not foundpublic InputStream getResourceAsStream(String name, BeanContextChild bcc) throws IllegalArgumentException
java.lang.ClassLoader.getResourceAsStream()
,
this method allows a BeanContext
implementation
to interpose behavior between the child Component
and underlying ClassLoader
.
getResourceAsStream
in interface BeanContext
name
- the resource namebcc
- the specified child
InputStream
for reading the resource,
or null
if the resource could not
be found.
IllegalArgumentException
- if the resource is not validpublic URL getResource(String name, BeanContextChild bcc) throws IllegalArgumentException
java.lang.ClassLoader.getResource()
, this
method allows a BeanContext
implementation to interpose
behavior between the child Component
and underlying ClassLoader
.
getResource
in interface BeanContext
name
- the resource namebcc
- the specified child
URL
for the named
resource for the specified child
IllegalArgumentException
- if the resource is not validpublic void addBeanContextMembershipListener(BeanContextMembershipListener bcml)
BeanContextMembershipListener
to receive BeanContextMembershipEvents
from
this BeanContext
whenever it adds
or removes a child Component
(s).
addBeanContextMembershipListener
in interface BeanContext
bcml
- the BeanContextMembershipListener
to be addedpublic void removeBeanContextMembershipListener(BeanContextMembershipListener bcml)
BeanContextMembershipListener
so that it no longer receives BeanContextMembershipEvent
s
when the child Component
(s) are added or removed.
removeBeanContextMembershipListener
in interface BeanContext
bcml
- the BeanContextMembershipListener
to be removedpublic int size()
size
in interface Collection
public boolean isEmpty()
isEmpty
in interface Collection
public boolean contains(Object o)
contains
in interface Collection
o
- element whose presence in this BeanContext is to be tested.
ClassCastException
- if the type of the specified element
is incompatible with this collection (optional).
NullPointerException
- if the specified element is null and this
collection does not support null elements (optional).public Iterator iterator()
iterator
in interface Iterable
iterator
in interface Collection
public Object[] toArray()
This method acts as bridge between array-based and collection-based APIs.
toArray
in interface Collection
public boolean add(Object o)
add
in interface Collection
o
- element whose presence in this collection is to be ensured.
UnsupportedOperationException
- add is not supported by
this collection.
ClassCastException
- class of the specified element prevents it
from being added to this collection.
NullPointerException
- if the specified element is null and this
collection does not support null elements.
IllegalArgumentException
- some aspect of this element prevents
it from being added to this collection.public boolean remove(Object o)
remove
in interface Collection
o
- element to be removed from this collection, if present.
ClassCastException
- if the type of the specified element
is incompatible with this collection (optional).
NullPointerException
- if the specified element is null and this
collection does not support null elements (optional).
UnsupportedOperationException
- remove is not supported by this
collection.public boolean addAll(Collection c)
addAll
in interface Collection
UnsupportedOperationException
public void clear()
clear
in interface Collection
UnsupportedOperationException
public boolean retainAll(Collection c)
retainAll
in interface Collection
UnsupportedOperationException
public boolean removeAll(Collection c)
removeAll
in interface Collection
UnsupportedOperationException
public boolean containsAll(Collection c)
containsAll
in interface Collection
c
- collection to be checked for containment in this collection.
ClassCastException
- if the types of one or more elements
in the specified collection are incompatible with this
collection (optional).
NullPointerException
- if the specified collection contains one
or more null elements and this collection does not support null
elements (optional).
NullPointerException
- if the specified collection is
null.contains(Object)
public Object[] toArray(Object[] a)
toArray
in interface Collection
a
- the array into which the elements of this collection are to be
stored, if it is big enough; otherwise, a new array of the same
runtime type is allocated for this purpose.
ArrayStoreException
- the runtime type of the specified array is
not a supertype of the runtime type of every element in this
collection.
NullPointerException
- if the specified array is null.public void setDesignTime(boolean designTime)
propertyName
- java.beans.DesignMode.PROPERTYNAME
oldValue
- previous value of "designTime"
newValue
- current value of "designTime"
setDesignTime
in interface DesignMode
designTime
- the current "value" of the "designTime" propertyBeanContext
,
BeanContextMembershipListener
,
PropertyChangeEvent
public boolean isDesignTime()
isDesignTime
in interface DesignMode
public boolean needsGui()
needsGui
in interface Visibility
public void dontUseGui()
dontUseGui
in interface Visibility
public void okToUseGui()
okToUseGui
in interface Visibility
public boolean avoidingGui()
avoidingGui
in interface Visibility
public void propertyChange(PropertyChangeEvent evt)
propertyChange
in interface PropertyChangeListener
evt
- A PropertyChangeEvent object describing the event source
and the property that has changed.public void vetoableChange(PropertyChangeEvent evt) throws PropertyVetoException
vetoableChange
in interface VetoableChangeListener
evt
- a PropertyChangeEvent
object describing the
event source and the property that has changed.
PropertyVetoException
- if the recipient wishes the property
change to be rolled back.protected void initialize()
public final void writeChildren(ObjectOutputStream oos) throws IOException
oos
- ObjectOutputStream
IOException
public final void readChildren(ObjectInputStream in) throws IOException, ClassNotFoundException
in
- ObjectInputStream
IOException
ClassNotFoundException
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |