|
|||||||||
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
RenderedImage
s or RenderableImage
s, a
Collection
of Collection
s that include images.
In other words, this class supports nested Collection
s, 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 WeakReference s 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 String s recognized as names by this
property source. |
String[] |
getPropertyNames(String prefix)
Returns an array of String s 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 |
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
Collection
s 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 WeakReference
s 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.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.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
null
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()
String
s recognized as names by this
property source. If no property names match, null
will be returned.String
s which are the valid
property names or null
if there are none.public String[] getPropertyNames(String prefix)
String
s 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.
String
s 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.Class
expected to be return by a
request for the value of this property or null
.name
is null
.public Object getProperty(String name)
java.awt.Image.UndefinedProperty
.name
is null
.public Object getProperty(String name, Collection collection)
java.awt.Image.UndefinedProperty
.name
is null
.public void setProperty(String name, Object value)
CollectionImage
. Some
CollectionImage
subclasses may ignore attempts to set
properties.name
- a String
containing the property's name.value
- the property, as a general Object
.name
or
value
is null
.public void removeProperty(String name)
CollectionImage
.
Some CollectionImage
subclasses may ignore attempts to
remove properties.public void addPropertyChangeListener(PropertyChangeListener listener)
public void addPropertyChangeListener(String propertyName, PropertyChangeListener listener)
public void removePropertyChangeListener(PropertyChangeListener listener)
public void removePropertyChangeListener(String propertyName, PropertyChangeListener listener)
public int size()
Collection
.public boolean isEmpty()
true
if this Collection
contains no elements.public boolean contains(Object o)
true
if this Collection
contains the specified object.public Iterator iterator()
Iterator
over the elements in this
Collection
.public Object[] toArray()
Collection
.public Object[] toArray(Object[] a)
Collection
.public boolean add(Object o)
Collection
.true
if and only if the parameter is added to the
Collection
.public boolean remove(Object o)
Collection
.true
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
.public boolean addAll(Collection c)
Collection
to this Collection
.true
if this Collection
changed
as a result of the call.public boolean removeAll(Collection c)
Collection
.true
if this Collection
changed
as a result of the call.public boolean retainAll(Collection c)
Collection
that are
contained in the specified Collection
.true
if this Collection
changed
as a result of the call.public void clear()
Collection
.
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |