org.apache.batik.ext.awt.image.renderable

Class AbstractRable

public abstract class AbstractRable extends Object implements Filter

This is an abstract base class that takes care of most of the normal issues surrounding the implementation of the RenderableImage interface. It tries to make no assumptions about the subclass implementation.
Field Summary
protected Mapprops
protected Vectorsrcs
protected longstamp
Constructor Summary
protected AbstractRable()
void constructor.
protected AbstractRable(Filter src)
Construct an Abstract Rable from src.
protected AbstractRable(Filter src, Map props)
Construct an Abstract Rable from src and props.
protected AbstractRable(List srcs)
Construct an Abstract Rable from a list of sources.
protected AbstractRable(List srcs, Map props)
Construct an Abstract Rable from a list of sources, and bounds.
Method Summary
RenderedImagecreateDefaultRendering()
RenderedImagecreateScaledRendering(int w, int h, RenderingHints hints)
Rectangle2DgetBounds2D()
ShapegetDependencyRegion(int srcIndex, Rectangle2D outputRgn)
ShapegetDirtyRegion(int srcIndex, Rectangle2D inputRgn)
floatgetHeight()
floatgetMinX()
floatgetMinY()
ObjectgetProperty(String name)
String[]getPropertyNames()
VectorgetSources()
longgetTimeStamp()
Returns the current modification timestamp on this Renderable node.
floatgetWidth()
protected voidinit(Filter src)
Initialize an Abstract Rable from src, bounds and props.
protected voidinit(Filter src, Map props)
Initialize an Abstract Rable from src, bounds and props.
protected voidinit(List srcs)
Initialize an Abstract Rable from a list of sources, and possibly a bounds.
protected voidinit(List srcs, Map props)
Initialize an Abstract Rable from a list of sources, and possibly a bounds.
booleanisDynamic()
voidtouch()
Increments the time stamp.

Field Detail

props

protected Map props

srcs

protected Vector srcs

stamp

protected long stamp

Constructor Detail

AbstractRable

protected AbstractRable()
void constructor. The subclass must call one of the flavors of init before the object becomes usable. This is useful when the proper parameters to the init method need to be computed in the subclasses constructor.

AbstractRable

protected AbstractRable(Filter src)
Construct an Abstract Rable from src.

Parameters: src will be the first (and only) member of the srcs Vector. The bounds of src are also used to set the bounds of this renderable.

AbstractRable

protected AbstractRable(Filter src, Map props)
Construct an Abstract Rable from src and props.

Parameters: src will also be set as the first (and only) member of the srcs Vector. props use to initialize the properties on this renderable image.

AbstractRable

protected AbstractRable(List srcs)
Construct an Abstract Rable from a list of sources.

Parameters: srcs This is used to initialize the srcs Vector. The bounds of this renderable will be the union of the bounds of all the sources in srcs. All the members of srcs must be CacheableRable otherwise an error will be thrown.

AbstractRable

protected AbstractRable(List srcs, Map props)
Construct an Abstract Rable from a list of sources, and bounds.

Parameters: srcs This is used to initialize the srcs Vector. All the members of srcs must be CacheableRable otherwise an error will be thrown. props use to initialize the properties on this renderable image.

Method Detail

createDefaultRendering

public RenderedImage createDefaultRendering()

createScaledRendering

public RenderedImage createScaledRendering(int w, int h, RenderingHints hints)

getBounds2D

public Rectangle2D getBounds2D()

getDependencyRegion

public Shape getDependencyRegion(int srcIndex, Rectangle2D outputRgn)

getDirtyRegion

public Shape getDirtyRegion(int srcIndex, Rectangle2D inputRgn)

getHeight

public float getHeight()

getMinX

public float getMinX()

getMinY

public float getMinY()

getProperty

public Object getProperty(String name)

getPropertyNames

public String[] getPropertyNames()

getSources

public Vector getSources()

getTimeStamp

public long getTimeStamp()
Returns the current modification timestamp on this Renderable node. This value will change whenever cached output data becomes invalid.

Returns: Current modification timestamp value.

getWidth

public float getWidth()

init

protected void init(Filter src)
Initialize an Abstract Rable from src, bounds and props. This can be called long after the object is constructed to reset the state of the Renderable.

Parameters: src will become the first (and only) member of the srcs Vector.

init

protected void init(Filter src, Map props)
Initialize an Abstract Rable from src, bounds and props. This can be called long after the object is constructed to reset the state of the Renderable.

Parameters: src will also be set as the first (and only) member of the srcs Vector. props use to set the properties on this renderable image. Always clears the current properties (even if null).

init

protected void init(List srcs)
Initialize an Abstract Rable from a list of sources, and possibly a bounds. This can be called long after the object is constructed to reset the state of the Renderable.

Parameters: srcs Used the create a new srcs Vector (old sources are dropped).

init

protected void init(List srcs, Map props)
Initialize an Abstract Rable from a list of sources, and possibly a bounds. This can be called long after the object is constructed to reset the state of the Renderable.

Parameters: srcs Used the create a new srcs Vector (old sources are dropped). props use to set the properties on this renderable image. Always clears the current properties (even if null).

isDynamic

public boolean isDynamic()

touch

public final void touch()
Increments the time stamp. This should be called when ever the image changes in such a way that cached output should be discarded.
Copyright B) 2008 Apache Software Foundation. All Rights Reserved.