Package net.sf.jasperreports.renderers
Class SimpleRenderToImageAwareDataRenderer
- java.lang.Object
-
- net.sf.jasperreports.renderers.AbstractRenderer
-
- net.sf.jasperreports.renderers.AbstractRenderToImageAwareRenderer
-
- net.sf.jasperreports.renderers.SimpleRenderToImageAwareDataRenderer
-
- All Implemented Interfaces:
Serializable
,AreaHyperlinksRenderable
,DataRenderable
,Renderable
,RenderToImageAwareRenderable
public class SimpleRenderToImageAwareDataRenderer extends AbstractRenderToImageAwareRenderer implements DataRenderable, AreaHyperlinksRenderable
This class a renderable implementation for wrapping SVG data. It is better suited for SVG data then theSimpleDataRenderer
because it it allows providing additional information about required resolution of the graphic, when converted to and image, as the engine needs to do that for certain document formats at export time.- Author:
- Teodor Danciu (teodord@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
SimpleRenderToImageAwareDataRenderer(byte[] data)
SimpleRenderToImageAwareDataRenderer(byte[] data, List<JRPrintImageAreaHyperlink> areaHyperlinks)
Creates a SVG renderer.
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description Graphics2D
createGraphics(BufferedImage bi)
byte[]
getData(JasperReportsContext jasperReportsContext)
List<JRPrintImageAreaHyperlink>
getImageAreaHyperlinks(Rectangle2D renderingArea)
Returns the list ofimage map areas
.int
getImageDataDPI(JasperReportsContext jasperReportsContext)
static SimpleRenderToImageAwareDataRenderer
getInstance(byte[] data)
int
getMinDPI()
boolean
hasImageAreaHyperlinks()
Indicates whether the renderer actually includes any image map areas.boolean
isAntiAlias()
void
setAntiAlias(boolean antiAlias)
void
setMinDPI(int minDPI)
-
Methods inherited from class net.sf.jasperreports.renderers.AbstractRenderer
getId
-
-
-
-
Constructor Detail
-
SimpleRenderToImageAwareDataRenderer
protected SimpleRenderToImageAwareDataRenderer(byte[] data)
-
SimpleRenderToImageAwareDataRenderer
public SimpleRenderToImageAwareDataRenderer(byte[] data, List<JRPrintImageAreaHyperlink> areaHyperlinks)
Creates a SVG renderer.- Parameters:
areaHyperlinks
- a list ofarea hyperlinks
-
-
Method Detail
-
getInstance
public static SimpleRenderToImageAwareDataRenderer getInstance(byte[] data)
-
getData
public byte[] getData(JasperReportsContext jasperReportsContext) throws JRException
- Specified by:
getData
in interfaceDataRenderable
- 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
-
getImageDataDPI
public int getImageDataDPI(JasperReportsContext jasperReportsContext)
- Specified by:
getImageDataDPI
in interfaceRenderToImageAwareRenderable
- Overrides:
getImageDataDPI
in classAbstractRenderToImageAwareRenderer
-
createGraphics
public Graphics2D createGraphics(BufferedImage bi)
- Specified by:
createGraphics
in interfaceRenderToImageAwareRenderable
- Overrides:
createGraphics
in classAbstractRenderToImageAwareRenderer
-
getMinDPI
public int getMinDPI()
-
setMinDPI
public void setMinDPI(int minDPI)
-
isAntiAlias
public boolean isAntiAlias()
-
setAntiAlias
public void setAntiAlias(boolean antiAlias)
-
-