|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||
java.lang.Object | +--javax.media.jai.CollectionImage
An abstract superclass for classes representing a Collection
of images. It may be a Collection of
RenderedImages or RenderableImages, a
Collection of Collections that include images.
In other words, this class supports nested Collections, but
at the very bottom, there must be images associated with the
Collection objects.
| Field Summary | |
protected PropertyChangeSupportJAI |
eventManager
A helper object to manage firing events. |
protected Collection |
imageCollection
A Collection of objects. |
protected CollectionImageFactory |
imageFactory
The CollectionImageFactory which created this
CollectionImage; may be null which
implies that the CollectionImage was not created
by a CollectionImageFactory. |
protected WritablePropertySourceImpl |
properties
A helper object to manage the image properties. |
protected Set |
sinks
A Set of WeakReferences to the
sinks of this CollectionImage. |
| Constructor Summary | |
protected |
CollectionImage()
Default constructor. |
|
CollectionImage(Collection collection)
Constructs a class that contains an image Collection. |
| Method Summary | |
boolean |
add(Object o)
Adds the specified object to this Collection. |
boolean |
addAll(Collection c)
Adds all of the elements in the specified Collection
to this Collection. |
void |
addPropertyChangeListener(PropertyChangeListener listener)
Add a PropertyChangeListener to the listener list. |
void |
addPropertyChangeListener(String propertyName,
PropertyChangeListener listener)
Add a PropertyChangeListener for a specific property. |
boolean |
addSink(Object sink)
Adds a sink to the set of sinks. |
void |
clear()
Removes all of the elements from this Collection. |
boolean |
contains(Object o)
Returns true if this Collection
contains the specified object. |
boolean |
containsAll(Collection c)
Returns true if this Collection contains
all of the elements in the specified Collection. |
Object |
get(int index)
Returns the element at the given index in imageCollection. |
CollectionImageFactory |
getImageFactory()
If this CollectionImage was created by a
CollectionImageFactory then return a reference to
that factory; otherwise return null. |
Object |
getProperty(String name)
Returns the specified property. |
Object |
getProperty(String name,
Collection collection)
Deprecated. as of JAI 1.1. |
Class |
getPropertyClass(String name)
Returns the class expected to be returned by a request for the property with the specified name. |
String[] |
getPropertyNames()
Returns an array of Strings recognized as names by this
property source. |
String[] |
getPropertyNames(String prefix)
Returns an array of Strings recognized as names by
this property source that begin with the supplied prefix. |
Set |
getSinks()
Retrieves the set of sinks or null if
there are none. |
boolean |
isEmpty()
Returns true if this Collection
contains no elements. |
Iterator |
iterator()
Returns an Iterator over the elements in this
Collection. |
boolean |
remove(Object o)
Removes the specified object from this Collection. |
boolean |
removeAll(Collection c)
Removes all this collection's elements that are also contained in the specified Collection. |
void |
removeProperty(String name)
Removes the named property from the CollectionImage. |
void |
removePropertyChangeListener(PropertyChangeListener listener)
Remove a PropertyChangeListener from the listener list. |
void |
removePropertyChangeListener(String propertyName,
PropertyChangeListener listener)
Remove a PropertyChangeListener for a specific property. |
boolean |
removeSink(Object sink)
Removes a sink from the set of sinks. |
void |
removeSinks()
Removes all sinks from the set of sinks. |
boolean |
retainAll(Collection c)
Retains only the elements in this Collection that are
contained in the specified Collection. |
void |
setImageFactory(CollectionImageFactory imageFactory)
Sets the imageFactory instance variable to the supplied
value. |
void |
setProperty(String name,
Object value)
Sets a property on a CollectionImage. |
int |
size()
Returns the number of elements in this Collection. |
Object[] |
toArray()
Returns an array containing all of the elements in this Collection. |
Object[] |
toArray(Object[] a)
Returns an array containing all of the elements in this collection whose runtime type is that of the specified array. |
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Methods inherited from interface java.util.Collection |
equals, hashCode |
| Field Detail |
protected Collection imageCollection
Collection of objects. It may be a
Collection of images of the same type, a
Collection of objects of the same type, each
containing an image, or a Collection of
Collections whose leaf objects are images
or objects that contain images.protected CollectionImageFactory imageFactory
CollectionImageFactory which created this
CollectionImage; may be null which
implies that the CollectionImage was not created
by a CollectionImageFactory.protected PropertyChangeSupportJAI eventManager
protected WritablePropertySourceImpl properties
protected Set sinks
Set of WeakReferences to the
sinks of this CollectionImage.| Constructor Detail |
protected CollectionImage()
imageCollection parameter is
null. Subclasses that use this constructor must either
set the imageCollection parameter themselves, or override
the methods defined in the Collection interface.
Otherwise, a NullPointerException may be thrown at a later
time when methods which use to the imageCollection
instance variable are invoked.public CollectionImage(Collection collection)
Collection.collection - A Collection of objects that
include images.IllegalArgumentException - if collection is
null.| Method Detail |
public Object get(int index)
imageCollection.
If imageCollection is a List then the call is
forwarded to imageCollection; otherwise an array is created
by applying toArray() to imageCollection and
the indicated element of that array is returned. Note that in the
latter case no guarantee as to element ordering beyond that stated in
the specification of Collection.toArray().index - The index of the desired element.IndexOutOfBoundsException - if the index is out of range
(index < 0 || index ≥
imageCollection.size()).public void setImageFactory(CollectionImageFactory imageFactory)
imageFactory instance variable to the supplied
value. The parameter may be null. It is recommended
that this method be invoked as soon as the CollectionImage
is constructed.imageFactory - The creating CollectionImageFactory or
nullIllegalStateException - if the corresponding instance variable
was already set.public CollectionImageFactory getImageFactory()
CollectionImage was created by a
CollectionImageFactory then return a reference to
that factory; otherwise return null.public boolean addSink(Object sink)
public boolean removeSink(Object sink)
true if and only if the set of sinks
changed as a result of the call.public Set getSinks()
null if
there are none.public void removeSinks()
public String[] getPropertyNames()
Strings recognized as names by this
property source. If no property names match, null
will be returned.getPropertyNames in interface PropertySourceStrings which are the valid
property names or null if there are none.public String[] getPropertyNames(String prefix)
Strings recognized as names by
this property source that begin with the supplied prefix. If
no property names are recognized, or no property names match,
null will be returned.
The comparison is done in a case-independent manner.
The default implementation calls
getPropertyNames() and searches the list of names
for matches.
getPropertyNames in interface PropertySourceStrings giving the valid
property names or null if there are none.IllegalArgumentException - if prefix
is null.public Class getPropertyClass(String name)
null will be returned.getPropertyClass in interface PropertySourceClass expected to be return by a
request for the value of this property or null.IllegalArgumentException - if name
is null.public Object getProperty(String name)
java.awt.Image.UndefinedProperty.getProperty in interface PropertySourceIllegalArgumentException - if name
is null.
public Object getProperty(String name,
Collection collection)
java.awt.Image.UndefinedProperty.IllegalArgumentException - if name
is null.
public void setProperty(String name,
Object value)
CollectionImage. Some
CollectionImage subclasses may ignore attempts to set
properties.setProperty in interface WritablePropertySourcename - a String containing the property's name.value - the property, as a general Object.IllegalArgumentException - If name or
value is null.public void removeProperty(String name)
CollectionImage.
Some CollectionImage subclasses may ignore attempts to
remove properties.removeProperty in interface WritablePropertySourcepublic void addPropertyChangeListener(PropertyChangeListener listener)
addPropertyChangeListener in interface PropertyChangeEmitter
public void addPropertyChangeListener(String propertyName,
PropertyChangeListener listener)
addPropertyChangeListener in interface PropertyChangeEmitterpublic void removePropertyChangeListener(PropertyChangeListener listener)
removePropertyChangeListener in interface PropertyChangeEmitter
public void removePropertyChangeListener(String propertyName,
PropertyChangeListener listener)
removePropertyChangeListener in interface PropertyChangeEmitterpublic int size()
Collection.size in interface Collectionpublic boolean isEmpty()
true if this Collection
contains no elements.isEmpty in interface Collectionpublic boolean contains(Object o)
true if this Collection
contains the specified object.contains in interface Collectionpublic Iterator iterator()
Iterator over the elements in this
Collection.iterator in interface Collectionpublic Object[] toArray()
Collection.toArray in interface Collectionpublic Object[] toArray(Object[] a)
toArray in interface CollectionArrayStoreException - if the runtime type of the specified array
is not a supertype of the runtime type of every element in this
Collection.public boolean add(Object o)
Collection.add in interface Collectiontrue if and only if the parameter is added to the
Collection.public boolean remove(Object o)
Collection.remove in interface Collectiontrue if and only if the parameter is removed
from the Collection.public boolean containsAll(Collection c)
true if this Collection contains
all of the elements in the specified Collection.containsAll in interface Collectionpublic boolean addAll(Collection c)
Collection
to this Collection.addAll in interface Collectiontrue if this Collection changed
as a result of the call.public boolean removeAll(Collection c)
Collection.removeAll in interface Collectiontrue if this Collection changed
as a result of the call.public boolean retainAll(Collection c)
Collection that are
contained in the specified Collection.retainAll in interface Collectiontrue if this Collection changed
as a result of the call.public void clear()
Collection.clear in interface Collection
|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||