|
|||||||||
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 String s 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.Method Detail |
public Vector getSources()
public String[] getPropertyNames()
null
, i.e.,
no property names are recognized.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.prefix
- the supplied prefix for the property source.String
s giving the valid
property names.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
- the name of the property to get, as a String.name
is null
.public void setProperty(String name, Object value)
MultiResolutionRenderableImage
.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)
MultiResolutionRenderableImage
.java.awt.Image.UndefinedProperty
if it was
not present in the property set.name
is null
.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 float getWidth()
public float getHeight()
public float getMinX()
public float getMaxX()
public float getMinY()
public float getMaxY()
public boolean isDynamic()
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.
width
- the width of the rendering in pixels.height
- the height of the rendering in pixels.hints
- a Hashtable of rendering hints.public RenderedImage createDefaultRendering()
public 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.
renderContext
- a RenderContext describing the transform
rendering hints.
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |