|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object | +--javax.media.jai.RenderableImageAdapter
An adapter class for externally-generated RenderableImages. All methods are simply forwarded to the image being adapted. The purpose of this class is simply to ensure that the PropertySource interface is available for all JAI RenderableImages.
The set of properties available on the image will be a combination of
those defined locally via setProperty()
and those defined
on the source image with the local properties taking precedence. No
PropertySourceChangeEvent
will be generated as a result of
changes to the property set of the source image.
Fields inherited from interface java.awt.image.renderable.RenderableImage |
HINTS_OBSERVED |
Constructor Summary | |
RenderableImageAdapter(RenderableImage im)
Constructs a RenderableImageAdapter from a RenderableImage. |
Method Summary | |
void |
addPropertyChangeListener(PropertyChangeListener listener)
Add a PropertyChangeListener to the listener list. |
void |
addPropertyChangeListener(String propertyName,
PropertyChangeListener listener)
Add a PropertyChangeListener for a specific property. |
RenderedImage |
createDefaultRendering()
Gets a RenderedImage instance of this image with a default width and height in pixels. |
RenderedImage |
createRendering(RenderContext renderContext)
Gets a RenderedImage instance of this image from a RenderContext. |
RenderedImage |
createScaledRendering(int w,
int h,
RenderingHints hints)
Gets a RenderedImage instance of this image with width w, and height h in pixels. |
float |
getHeight()
Gets the height in user coordinate space. |
float |
getMinX()
Gets the minimum X coordinate of the rendering-independent image. |
float |
getMinY()
Gets the minimum Y coordinate of the rendering-independent image. |
Object |
getProperty(String name)
Gets a property from the property set of this image. |
Class |
getPropertyClass(String name)
Returns the class expected to be returned by a request for the property with the specified name. |
String[] |
getPropertyNames()
Returns a list of the properties recognized by this image. |
String[] |
getPropertyNames(String prefix)
Returns an array of String s recognized as names by
this property source that begin with the supplied prefix. |
Vector |
getSources()
|
float |
getWidth()
Gets the width in user coordinate space. |
RenderableImage |
getWrappedImage()
Returns the reference to the external RenderableImage
originally supplied to the constructor. |
boolean |
isDynamic()
Returns true if successive renderings (that is, calls to createRendering() or createScaledRendering()) with the same arguments may produce different results. |
void |
removeProperty(String name)
Removes the named property from the RenderableImageAdapter . |
void |
removePropertyChangeListener(PropertyChangeListener listener)
Remove a PropertyChangeListener from the listener list. |
void |
removePropertyChangeListener(String propertyName,
PropertyChangeListener listener)
Remove a PropertyChangeListener for a specific property. |
void |
setProperty(String name,
Object value)
Sets a property on a RenderableImageAdapter . |
static RenderableImageAdapter |
wrapRenderableImage(RenderableImage im)
Adapts a RenderableImage into a RenderableImageAdapter. |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
public RenderableImageAdapter(RenderableImage im)
IllegalArgumentException
- if im
is null
.Method Detail |
public static RenderableImageAdapter wrapRenderableImage(RenderableImage im)
im
- a RenderableImage.IllegalArgumentException
- if im
is null
.public final RenderableImage getWrappedImage()
RenderableImage
originally supplied to the constructor.public final Vector getSources()
getSources
in interface RenderableImage
public final Object getProperty(String name)
getProperty
in interface RenderableImage
name
- the name of the property to get, as a String.IllegalArgumentException
- if name
is
null
.public Class getPropertyClass(String name)
null
will be returned.getPropertyClass
in interface PropertySource
Class
expected to be return by a
request for the value of this property or null
.IllegalArgumentException
- if name
is
null
.public final String[] getPropertyNames()
null
will be
returned.getPropertyNames
in interface RenderableImage
String
s representing valid
property names.public String[] getPropertyNames(String prefix)
String
s recognized as names by
this property source that begin with the supplied prefix. If
no property names match, null
will be returned.
The comparison is done in a case-independent manner.getPropertyNames
in interface PropertySource
String
s giving the valid
property names.IllegalArgumentException
- if prefix
is
null
.public void setProperty(String name, Object value)
RenderableImageAdapter
.setProperty
in interface WritablePropertySource
name
- 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)
RenderableImageAdapter
.removeProperty
in interface WritablePropertySource
IllegalArgumentException
- if name
is
null
.public void addPropertyChangeListener(PropertyChangeListener listener)
addPropertyChangeListener
in interface PropertyChangeEmitter
public void addPropertyChangeListener(String propertyName, PropertyChangeListener listener)
addPropertyChangeListener
in interface PropertyChangeEmitter
public void removePropertyChangeListener(PropertyChangeListener listener)
removePropertyChangeListener
in interface PropertyChangeEmitter
public void removePropertyChangeListener(String propertyName, PropertyChangeListener listener)
removePropertyChangeListener
in interface PropertyChangeEmitter
public final float getWidth()
getWidth
in interface RenderableImage
public final float getHeight()
getHeight
in interface RenderableImage
public final float getMinX()
getMinX
in interface RenderableImage
public final float getMinY()
getMinY
in interface RenderableImage
public final boolean isDynamic()
isDynamic
in interface RenderableImage
public final RenderedImage createScaledRendering(int w, int h, RenderingHints hints)
createScaledRendering
in interface RenderableImage
w
- the width of rendered image in pixels.h
- the height of rendered image in pixels.hints
- a RenderingHints object containing rendering hints.public final RenderedImage createDefaultRendering()
createDefaultRendering
in interface RenderableImage
public final RenderedImage createRendering(RenderContext renderContext)
createRendering
in interface RenderableImage
renderContext
- the RenderContext to use to produce the rendering.
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |