|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object net.sf.jasperreports.engine.JRAbstractRenderer net.sf.jasperreports.engine.JRAbstractSvgRenderer net.sf.jasperreports.renderers.BatikRenderer
public class BatikRenderer
SVG renderer implementation based on Batik.
Nested Class Summary | |
---|---|
protected static class |
BatikRenderer.JRUserAgent
|
Field Summary |
---|
Fields inherited from interface net.sf.jasperreports.engine.JRRenderable |
---|
IMAGE_TYPE_GIF, IMAGE_TYPE_JPEG, IMAGE_TYPE_PNG, IMAGE_TYPE_TIFF, IMAGE_TYPE_UNKNOWN, MIME_TYPE_GIF, MIME_TYPE_JPEG, MIME_TYPE_PNG, MIME_TYPE_TIFF, TYPE_IMAGE, TYPE_SVG |
Constructor Summary | |
---|---|
|
BatikRenderer(byte[] svgData,
java.util.List areaHyperlinks)
Creates a SVG renderer. |
protected |
BatikRenderer(java.util.List areaHyperlinks)
|
|
BatikRenderer(java.lang.String svgText,
java.util.List areaHyperlinks)
Creates a SVG renderer. |
Method Summary | |
---|---|
protected java.awt.Graphics2D |
createGraphics(java.awt.image.BufferedImage bi)
|
protected void |
ensureData()
|
protected void |
ensureSvg()
|
java.awt.geom.Dimension2D |
getDimension()
|
java.util.List |
getImageAreaHyperlinks(java.awt.geom.Rectangle2D renderingArea)
Deprecated. Replaced by renderWithHyperlinks(Graphics2D, Rectangle2D) |
static BatikRenderer |
getInstance(byte[] svgData)
Creates a SVG renderer from binary data. |
static BatikRenderer |
getInstance(java.io.File svgFile)
Creates a SVG renderer from a file. |
static BatikRenderer |
getInstance(java.io.InputStream svgDataStream)
Creates a SVG renderer from a data stream. |
static BatikRenderer |
getInstance(java.net.URL svgURL)
Creates a SVG renderer from a URL . |
static BatikRenderer |
getInstanceFromLocation(java.lang.String location)
Creates a SVG renderer by loading data from a generic location. |
static BatikRenderer |
getInstanceFromLocation(java.lang.String location,
java.lang.ClassLoader classLoader,
java.net.URLStreamHandlerFactory urlHandlerFactory,
FileResolver fileResolver)
Creates a SVG renderer by loading data from a generic location. |
static BatikRenderer |
getInstanceFromText(java.lang.String svgText)
Creates a SVG renderer from SVG text. |
static BatikRenderer |
getLocationInstance(java.lang.String location)
Creates a lazily loaded SVG renderer for a location. |
boolean |
hasImageAreaHyperlinks()
Indicates whether the renderer actually includes any image map areas. |
void |
render(java.awt.Graphics2D grx,
java.awt.geom.Rectangle2D rectangle)
|
java.util.List |
renderWithHyperlinks(java.awt.Graphics2D grx,
java.awt.geom.Rectangle2D rectangle)
Returns the list of image map areas . |
protected void |
setSvgDataLocation(java.lang.String svgDataLocation)
|
Methods inherited from class net.sf.jasperreports.engine.JRAbstractSvgRenderer |
---|
getBackcolor, getImageData, getImageType, getType |
Methods inherited from class net.sf.jasperreports.engine.JRAbstractRenderer |
---|
getId |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Methods inherited from interface net.sf.jasperreports.engine.JRRenderable |
---|
getId, getImageData, getImageType, getType |
Constructor Detail |
---|
protected BatikRenderer(java.util.List areaHyperlinks)
public BatikRenderer(java.lang.String svgText, java.util.List areaHyperlinks)
svgText
- the SVG textareaHyperlinks
- a list of area hyperlinks
public BatikRenderer(byte[] svgData, java.util.List areaHyperlinks)
svgData
- the SVG (binary) dataareaHyperlinks
- a list of area hyperlinks
Method Detail |
---|
public void render(java.awt.Graphics2D grx, java.awt.geom.Rectangle2D rectangle) throws JRException
render
in interface JRRenderable
JRException
public java.awt.geom.Dimension2D getDimension()
getDimension
in interface JRRenderable
getDimension
in class JRAbstractSvgRenderer
protected void ensureData() throws JRException
JRException
protected void ensureSvg() throws JRException
JRException
public java.util.List renderWithHyperlinks(java.awt.Graphics2D grx, java.awt.geom.Rectangle2D rectangle) throws JRException
JRImageMapRenderer
image map areas
.
renderWithHyperlinks
in interface JRImageMapRenderer
rectangle
- the area on which the image would be rendered
JRPrintImageAreaHyperlink
instances.
JRException
public java.util.List getImageAreaHyperlinks(java.awt.geom.Rectangle2D renderingArea) throws JRException
renderWithHyperlinks(Graphics2D, Rectangle2D)
JRImageMapRenderer
image map areas
.
getImageAreaHyperlinks
in interface JRImageMapRenderer
renderingArea
- the area on which the image would be rendered
JRPrintImageAreaHyperlink
instances.
JRException
public boolean hasImageAreaHyperlinks()
JRImageMapRenderer
hasImageAreaHyperlinks
in interface JRImageMapRenderer
protected java.awt.Graphics2D createGraphics(java.awt.image.BufferedImage bi)
createGraphics
in class JRAbstractSvgRenderer
protected void setSvgDataLocation(java.lang.String svgDataLocation)
public static BatikRenderer getInstance(byte[] svgData)
svgData
- the SVG (binary) data
public static BatikRenderer getInstance(java.io.InputStream svgDataStream) throws JRException
Note: the data stream is exhausted, but not closed.
svgDataStream
- the SVG binary data stream
JRException
public static BatikRenderer getInstance(java.io.File svgFile) throws JRException
svgFile
- the SVG file to read
JRException
public static BatikRenderer getInstance(java.net.URL svgURL) throws JRException
URL
.
svgURL
- the SVG URL
JRException
public static BatikRenderer getInstanceFromText(java.lang.String svgText) throws JRException
svgText
- the SVG text
JRException
public static BatikRenderer getInstanceFromLocation(java.lang.String location) throws JRException
location
- the location
JRException
JRLoader.loadBytesFromLocation(String)
public static BatikRenderer getInstanceFromLocation(java.lang.String location, java.lang.ClassLoader classLoader, java.net.URLStreamHandlerFactory urlHandlerFactory, FileResolver fileResolver) throws JRException
location
- the locationclassLoader
- the classloader to be used to resolve resourcesurlHandlerFactory
- the URL handler factory used to resolve URLsfileResolver
- the file resolver
JRException
JRLoader.loadBytesFromLocation(String, ClassLoader, URLStreamHandlerFactory, FileResolver)
public static BatikRenderer getLocationInstance(java.lang.String location) throws JRException
The returned renderer loads the SVG data lazily, i.e. only when the data
is actually required (which is at the first
render(Graphics2D, Rectangle2D)
}.
location
- the SVG location
JRException
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |