| java.lang.Object javax.media.jai.MultiResolutionRenderableImage
MultiResolutionRenderableImage | public class MultiResolutionRenderableImage implements WritablePropertySource,RenderableImage,Serializable(Code) | | 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 transient RenderedImage[] | renderedSource An array of RenderedImage sources. | protected float | width The width in Renderable coordinates. |
Constructor Summary | |
public | 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 | |
public void | addPropertyChangeListener(PropertyChangeListener listener) Add a PropertyChangeListener to the listener list. | public void | addPropertyChangeListener(String propertyName, PropertyChangeListener listener) Add a PropertyChangeListener for a specific property. | public RenderedImage | createDefaultRendering() Returns the full resolution source RenderedImage
with no rendering hints. | public RenderedImage | createRendering(RenderContext renderContext) Returns a rendering based on a 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. | public RenderedImage | createScaledRendering(int width, int height, RenderingHints hints) Returns a rendering with a given width, height, and rendering
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. | public float | getHeight() Returns the floating-point height of the RenderableImage. | public float | getMaxX() Returns the floating-point max X coordinate of the
RenderableImage. | public float | getMaxY() Returns the floating-point max Y coordinate of the
RenderableImage. | public float | getMinX() Returns the floating-point min X coordinate of the
RenderableImage. | public float | getMinY() Returns the floating-point min Y coordinate of the
RenderableImage. | public Object | getProperty(String name) Gets a property from the property set of this image.
If the property name is not recognized, java.awt.Image.UndefinedProperty
will be returned. | public Class | getPropertyClass(String name) Returns the class expected to be returned by a request for
the property with the specified name. | public String[] | getPropertyNames() Returns a list of the properties recognized by this image. | public String[] | getPropertyNames(String prefix) Returns an array of String s recognized as names by
this property source that begin with the supplied prefix. | public Vector | getSources() Returns an empty Vector, indicating that this RenderableImage
has no Renderable sources. | public float | getWidth() Returns the floating-point width of the RenderableImage. | public boolean | isDynamic() Returns false since successive renderings (that is, calls to
createRendering() or createScaledRendering()) with the same
arguments will never produce different results. | public void | removeProperty(String name) Removes the named property from the
MultiResolutionRenderableImage . | public void | removePropertyChangeListener(PropertyChangeListener listener) Remove a PropertyChangeListener from the listener list. | public void | removePropertyChangeListener(String propertyName, PropertyChangeListener listener) Remove a PropertyChangeListener for a specific property. | public void | setProperty(String name, Object value) Sets a property on a MultiResolutionRenderableImage . |
aspect | protected float aspect(Code) | | The aspect ratio, derived from the highest-resolution source.
|
height | protected float height(Code) | | The height in Renderable coordinates.
|
minX | protected float minX(Code) | | The min X coordinate in Renderable coordinates.
|
minY | protected float minY(Code) | | The min Y coordinate in Renderable coordinates.
|
renderedSource | protected transient RenderedImage[] renderedSource(Code) | | An array of RenderedImage sources.
|
width | protected float width(Code) | | The width in Renderable coordinates.
|
MultiResolutionRenderableImage | public MultiResolutionRenderableImage(Vector renderedSources, float minX, float minY, float height)(Code) | | Constructs a MultiResolutionRenderableImage with
given dimensions from a Vector of progressively
lower resolution versions of a RenderedImage.
Parameters: renderedSources - a Vector of RenderedImages. Parameters: minX - the minimum X coordinate of the Renderable,as a float. Parameters: minY - the minimum Y coordinate of the Renderable,as a float. Parameters: height - the height of the Renderable, as a float. throws: IllegalArgumentException - if the supplied height isnon-positive. |
addPropertyChangeListener | public void addPropertyChangeListener(PropertyChangeListener listener)(Code) | | Add a PropertyChangeListener to the listener list. The
listener is registered for all properties.
since: JAI 1.1 |
addPropertyChangeListener | public void addPropertyChangeListener(String propertyName, PropertyChangeListener listener)(Code) | | Add a PropertyChangeListener for a specific property. The
listener will be invoked only when a call on
firePropertyChange names that specific property. The case of
the name is ignored.
since: JAI 1.1 |
createDefaultRendering | public RenderedImage createDefaultRendering()(Code) | | Returns the full resolution source RenderedImage
with no rendering hints.
|
createRendering | public RenderedImage createRendering(RenderContext renderContext)(Code) | | Returns a rendering based on a 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.
Parameters: renderContext - a RenderContext describing the transformrendering hints. throws: IllegalArgumentException - if renderContext is null. |
createScaledRendering | public RenderedImage createScaledRendering(int width, int height, RenderingHints hints)(Code) | | Returns a rendering with a given width, height, and rendering
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.
Parameters: width - the width of the rendering in pixels. Parameters: height - the height of the rendering in pixels. Parameters: hints - a Hashtable of rendering hints. throws: IllegalArgumentException - if width or height are non-positive. |
getHeight | public float getHeight()(Code) | | Returns the floating-point height of the RenderableImage.
|
getMaxX | public float getMaxX()(Code) | | Returns the floating-point max X coordinate of the
RenderableImage.
|
getMaxY | public float getMaxY()(Code) | | Returns the floating-point max Y coordinate of the
RenderableImage.
|
getMinX | public float getMinX()(Code) | | Returns the floating-point min X coordinate of the
RenderableImage.
|
getMinY | public float getMinY()(Code) | | Returns the floating-point min Y coordinate of the
RenderableImage.
|
getProperty | public Object getProperty(String name)(Code) | | Gets a property from the property set of this image.
If the property name is not recognized, java.awt.Image.UndefinedProperty
will be returned. The default implementation returns
java.awt.Image.UndefinedProperty .
Parameters: name - the name of the property to get, as a String. a reference to the property Object, or the valuejava.awt.Image.UndefinedProperty. exception: IllegalArgumentException - if name is null . |
getPropertyClass | public Class getPropertyClass(String name)(Code) | | Returns the class expected to be returned by a request for
the property with the specified name. If this information
is unavailable, null will be returned.
The Class expected to be return by arequest for the value of this property or null . exception: IllegalArgumentException - if name is null . since: JAI 1.1 |
getPropertyNames | public String[] getPropertyNames()(Code) | | Returns a list of the properties recognized by this image.
If no properties are recognized by this image, null will be returned.
The default implementation returns null , i.e.,
no property names are recognized.
an array of Strings representing valid property names. since: JAI 1.1 |
getPropertyNames | public String[] getPropertyNames(String prefix)(Code) | | Returns an array of 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.
An array of String s giving the validproperty names. Parameters: prefix - the supplied prefix for the property source. throws: IllegalArgumentException - if prefix isnull . |
getSources | public Vector getSources()(Code) | | Returns an empty Vector, indicating that this RenderableImage
has no Renderable sources.
an empty Vector. |
getWidth | public float getWidth()(Code) | | Returns the floating-point width of the RenderableImage.
|
isDynamic | public boolean isDynamic()(Code) | | Returns false since successive renderings (that is, calls to
createRendering() or createScaledRendering()) with the same
arguments will never produce different results.
|
removeProperty | public void removeProperty(String name)(Code) | | Removes the named property from the
MultiResolutionRenderableImage .
The value of the property removed orjava.awt.Image.UndefinedProperty if it wasnot present in the property set. exception: IllegalArgumentException - if name is null . since: JAI 1.1 |
removePropertyChangeListener | public void removePropertyChangeListener(PropertyChangeListener listener)(Code) | | Remove a PropertyChangeListener from the listener list. This
removes a PropertyChangeListener that was registered for all
properties.
since: JAI 1.1 |
removePropertyChangeListener | public void removePropertyChangeListener(String propertyName, PropertyChangeListener listener)(Code) | | Remove a PropertyChangeListener for a specific property. The case
of the name is ignored.
since: JAI 1.1 |
setProperty | public void setProperty(String name, Object value)(Code) | | Sets a property on a MultiResolutionRenderableImage .
Parameters: name - a String containing the property's name. Parameters: value - the property, as a general Object . throws: IllegalArgumentException - If name orvalue is null . since: JAI 1.1 |
|
|