|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||
java.lang.Object | +--javax.media.jai.MultiResolutionRenderableImage
A RenderableImage that produces renderings based on a set of supplied RenderedImages at various resolutions.
| Field Summary | |
protected float |
aspect
The aspect ratio, derived from the highest-resolution source. |
protected PropertyChangeSupportJAI |
eventManager
A helper object to manage firing events. |
protected float |
height
The height in Renderable coordinates. |
protected float |
minX
The min X coordinate in Renderable coordinates. |
protected float |
minY
The min Y coordinate in Renderable coordinates. |
protected WritablePropertySourceImpl |
properties
A helper object to manage the image properties. |
protected RenderedImage[] |
renderedSource
An array of RenderedImage sources. |
protected float |
width
The width in Renderable coordinates. |
| Fields inherited from interface java.awt.image.renderable.RenderableImage |
HINTS_OBSERVED |
| Constructor Summary | |
MultiResolutionRenderableImage(Vector renderedSources,
float minX,
float minY,
float height)
Constructs a MultiResolutionRenderableImage with given dimensions from a Vector of progressively lower resolution versions of a RenderedImage. |
|
| 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()
Returns the full resolution source RenderedImage with no rendering hints. |
RenderedImage |
createRendering(RenderContext renderContext)
Returns a rendering based on a RenderContext. |
RenderedImage |
createScaledRendering(int width,
int height,
RenderingHints hints)
Returns a rendering with a given width, height, and rendering hints. |
float |
getHeight()
Returns the floating-point height of the RenderableImage. |
float |
getMaxX()
Returns the floating-point max X coordinate of the RenderableImage. |
float |
getMaxY()
Returns the floating-point max Y coordinate of the RenderableImage. |
float |
getMinX()
Returns the floating-point min X coordinate of the RenderableImage. |
float |
getMinY()
Returns the floating-point min Y coordinate of the RenderableImage. |
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 Strings recognized as names by
this property source that begin with the supplied prefix. |
Vector |
getSources()
Returns an empty Vector, indicating that this RenderableImage has no Renderable sources. |
float |
getWidth()
Returns the floating-point width of the RenderableImage. |
boolean |
isDynamic()
Returns false since successive renderings (that is, calls to createRendering() or createScaledRendering()) with the same arguments will never produce different results. |
void |
removeProperty(String name)
Removes the named property from the MultiResolutionRenderableImage. |
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 MultiResolutionRenderableImage. |
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Field Detail |
protected transient RenderedImage[] renderedSource
protected float aspect
protected float minX
protected float minY
protected float width
protected float height
protected PropertyChangeSupportJAI eventManager
protected WritablePropertySourceImpl properties
| Constructor Detail |
public MultiResolutionRenderableImage(Vector renderedSources,
float minX,
float minY,
float height)
renderedSources - a Vector of RenderedImages.minX - the minimum X coordinate of the Renderable,
as a float.minY - the minimum Y coordinate of the Renderable,
as a float.height - the height of the Renderable, as a float.IllegalArgumentException - if the supplied height is
non-positive.| Method Detail |
public Vector getSources()
getSources in interface RenderableImagepublic String[] getPropertyNames()
null, i.e.,
no property names are recognized.getPropertyNames in interface PropertySourcepublic 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.getPropertyNames in interface PropertySourceprefix - the supplied prefix for the property source.Strings giving the valid
property names.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 PropertySourcename - the name of the property to get, as a String.IllegalArgumentException - if name
is null.
public void setProperty(String name,
Object value)
MultiResolutionRenderableImage.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)
MultiResolutionRenderableImage.removeProperty in interface WritablePropertySourcejava.awt.Image.UndefinedProperty if it was
not present in the property set.IllegalArgumentException - if name
is null.public 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 float getWidth()
getWidth in interface RenderableImagepublic float getHeight()
getHeight in interface RenderableImagepublic float getMinX()
getMinX in interface RenderableImagepublic float getMaxX()
public float getMinY()
getMinY in interface RenderableImagepublic float getMaxY()
public boolean isDynamic()
isDynamic in interface RenderableImage
public RenderedImage createScaledRendering(int width,
int height,
RenderingHints hints)
If a JAI rendering hint named
JAI.KEY_INTERPOLATION is provided, its
corresponding Interpolation object is used as an
argument to the JAI operator used to scale the image. If no
such hint is present, an instance of
InterpolationNearest is used.
createScaledRendering in interface RenderableImagewidth - the width of the rendering in pixels.height - the height of the rendering in pixels.hints - a Hashtable of rendering hints.IllegalArgumentException - if width or height are non-positive.public RenderedImage createDefaultRendering()
createDefaultRendering in interface RenderableImagepublic RenderedImage createRendering(RenderContext renderContext)
If a JAI rendering hint named
JAI.KEY_INTERPOLATION is provided, its
corresponding Interpolation object is used as an
argument to the JAI operator used to transform the image. If
no such hint is present, an instance of
InterpolationNearest is used.
The RenderContext may contain a Shape
that represents the area-of-interest (aoi). If the aoi is specifed,
it is still legal to return an image that's larger than this aoi.
Therefore, by default, the aoi, if specified, is ignored at the
rendering.
createRendering in interface RenderableImagerenderContext - a RenderContext describing the transform
rendering hints.IllegalArgumentException - if renderContext is null.
|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||