Package net.sf.jasperreports.renderers
Class AbstractSvgDataToGraphics2DRenderer
- java.lang.Object
-
- net.sf.jasperreports.renderers.AbstractRenderer
-
- net.sf.jasperreports.renderers.AbstractRenderToImageAwareRenderer
-
- net.sf.jasperreports.renderers.AbstractSvgDataToGraphics2DRenderer
-
- All Implemented Interfaces:
Serializable
,AreaHyperlinksRenderable
,DataRenderable
,DimensionRenderable
,Graphics2DRenderable
,Renderable
,RenderToImageAwareRenderable
- Direct Known Subclasses:
WrappingSvgDataToGraphics2DRenderer
public abstract class AbstractSvgDataToGraphics2DRenderer extends AbstractRenderToImageAwareRenderer implements DataRenderable, Graphics2DRenderable, DimensionRenderable, AreaHyperlinksRenderable
SVG renderer implementation based on Batik.- Author:
- Lucian Chirita (lucianc@users.sourceforge.net)
- See Also:
- Serialized Form
-
-
Field Summary
-
Fields inherited from interface net.sf.jasperreports.renderers.Renderable
PROPERTY_IMAGE_DPI
-
-
Constructor Summary
Constructors Modifier Constructor Description protected
AbstractSvgDataToGraphics2DRenderer(List<JRPrintImageAreaHyperlink> areaHyperlinks)
Creates a SVG renderer.
-
Method Summary
All Methods Instance Methods Abstract Methods Concrete Methods Modifier and Type Method Description Graphics2D
createGraphics(BufferedImage bi)
Dimension2D
getDimension(JasperReportsContext jasperReportsContext)
List<JRPrintImageAreaHyperlink>
getImageAreaHyperlinks(Rectangle2D renderingArea)
Returns the list ofimage map areas
.protected org.apache.batik.gvt.GraphicsNode
getRootNode(JasperReportsContext jasperReportsContext)
protected abstract org.w3c.dom.svg.SVGDocument
getSvgDocument(JasperReportsContext jasperReportsContext, org.apache.batik.dom.svg.SVGDocumentFactory documentFactory)
boolean
hasImageAreaHyperlinks()
Indicates whether the renderer actually includes any image map areas.void
render(JasperReportsContext jasperReportsContext, Graphics2D grx, Rectangle2D rectangle)
-
Methods inherited from class net.sf.jasperreports.renderers.AbstractRenderToImageAwareRenderer
getImageDataDPI
-
Methods inherited from class net.sf.jasperreports.renderers.AbstractRenderer
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.renderers.DataRenderable
getData
-
-
-
-
Constructor Detail
-
AbstractSvgDataToGraphics2DRenderer
protected AbstractSvgDataToGraphics2DRenderer(List<JRPrintImageAreaHyperlink> areaHyperlinks)
Creates a SVG renderer.- Parameters:
areaHyperlinks
- a list ofarea hyperlinks
-
-
Method Detail
-
createGraphics
public Graphics2D createGraphics(BufferedImage bi)
- Specified by:
createGraphics
in interfaceRenderToImageAwareRenderable
- Overrides:
createGraphics
in classAbstractRenderToImageAwareRenderer
-
render
public void render(JasperReportsContext jasperReportsContext, Graphics2D grx, Rectangle2D rectangle) throws JRException
- Specified by:
render
in interfaceGraphics2DRenderable
- Throws:
JRException
-
getDimension
public Dimension2D getDimension(JasperReportsContext jasperReportsContext)
- Specified by:
getDimension
in interfaceDimensionRenderable
-
getRootNode
protected org.apache.batik.gvt.GraphicsNode getRootNode(JasperReportsContext jasperReportsContext) throws JRException
- Throws:
JRException
-
getSvgDocument
protected abstract org.w3c.dom.svg.SVGDocument getSvgDocument(JasperReportsContext jasperReportsContext, org.apache.batik.dom.svg.SVGDocumentFactory documentFactory) throws JRException
- Throws:
JRException
-
getImageAreaHyperlinks
public List<JRPrintImageAreaHyperlink> getImageAreaHyperlinks(Rectangle2D renderingArea) throws JRException
Description copied from interface:AreaHyperlinksRenderable
Returns the list ofimage map areas
.- Specified by:
getImageAreaHyperlinks
in interfaceAreaHyperlinksRenderable
- Parameters:
renderingArea
- the area on which the image would be rendered- Returns:
- a list of
JRPrintImageAreaHyperlink
instances. - Throws:
JRException
-
hasImageAreaHyperlinks
public boolean hasImageAreaHyperlinks()
Description copied from interface:AreaHyperlinksRenderable
Indicates whether the renderer actually includes any image map areas.- Specified by:
hasImageAreaHyperlinks
in interfaceAreaHyperlinksRenderable
- Returns:
- whether the renderer actually includes any image map areas
-
-