Package net.sf.jasperreports.renderers
Class SimpleDataRenderer
- java.lang.Object
-
- net.sf.jasperreports.renderers.AbstractRenderer
-
- net.sf.jasperreports.renderers.SimpleDataRenderer
-
- All Implemented Interfaces:
Serializable
,AreaHyperlinksRenderable
,DataRenderable
,Renderable
public class SimpleDataRenderer extends AbstractRenderer implements DataRenderable, AreaHyperlinksRenderable
The is a default implementation for theDataRenderable
interface that wraps images that come from files or binary image data in JPG, GIF, or PNG format. It can also wrap SVG data, but for better quality when converting to image, theSimpleRenderToImageAwareDataRenderer
implementation is recommended.- 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
SimpleDataRenderer(byte[] data)
SimpleDataRenderer(byte[] data, List<JRPrintImageAreaHyperlink> areaHyperlinks)
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description byte[]
getData(JasperReportsContext jasperReportsContext)
List<JRPrintImageAreaHyperlink>
getImageAreaHyperlinks(Rectangle2D renderingArea)
Returns the list ofimage map areas
.static SimpleDataRenderer
getInstance(byte[] data)
boolean
hasImageAreaHyperlinks()
Indicates whether the renderer actually includes any image map areas.-
Methods inherited from class net.sf.jasperreports.renderers.AbstractRenderer
getId
-
-
-
-
Constructor Detail
-
SimpleDataRenderer
protected SimpleDataRenderer(byte[] data)
-
SimpleDataRenderer
public SimpleDataRenderer(byte[] data, List<JRPrintImageAreaHyperlink> areaHyperlinks)
-
-
Method Detail
-
getInstance
public static SimpleDataRenderer 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
-
-