Package net.sf.jasperreports.renderers
Class BatikRenderer
- java.lang.Object
-
- net.sf.jasperreports.engine.JRAbstractRenderer
-
- net.sf.jasperreports.engine.JRAbstractSvgRenderer
-
- net.sf.jasperreports.renderers.BatikRenderer
-
- All Implemented Interfaces:
Serializable,ImageMapRenderable,JRImageMapRenderer,JRRenderable,Renderable,AreaHyperlinksRenderable,DataRenderable,Renderable,RenderToImageAwareRenderable
public class BatikRenderer extends JRAbstractSvgRenderer implements ImageMapRenderable, DataRenderable, RenderToImageAwareRenderable
Deprecated.Replaced byResourceRendererandDataRenderable.SVG renderer implementation based on Batik.- Author:
- Lucian Chirita (lucianc@users.sourceforge.net)
- See Also:
- Serialized Form
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description protected static classBatikRenderer.JRUserAgentDeprecated.Replaced byBatikUserAgent.
-
Field Summary
-
Fields inherited from class net.sf.jasperreports.engine.JRAbstractSvgRenderer
EXCEPTION_MESSAGE_KEY_DIMENSION_MUST_OVERRIDE, EXCEPTION_MESSAGE_KEY_DIMENSION_NULL_NOT_ALLOWED
-
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, PROPERTY_IMAGE_DPI, TYPE_IMAGE, TYPE_SVG
-
Fields inherited from interface net.sf.jasperreports.engine.Renderable
PROPERTY_IMAGE_DPI
-
-
Constructor Summary
Constructors Modifier Constructor Description BatikRenderer(byte[] svgData, List<JRPrintImageAreaHyperlink> areaHyperlinks)Deprecated.Creates a SVG renderer.BatikRenderer(String svgText, List<JRPrintImageAreaHyperlink> areaHyperlinks)Deprecated.Creates a SVG renderer.protectedBatikRenderer(List<JRPrintImageAreaHyperlink> areaHyperlinks)Deprecated.
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Deprecated Methods Modifier and Type Method Description Graphics2DcreateGraphics(BufferedImage bi)Deprecated.protected voidensureData(JasperReportsContext jasperReportsContext)Deprecated.protected voidensureSvg(JasperReportsContext jasperReportsContext)Deprecated.byte[]getData(JasperReportsContext jasperReportsContext)Deprecated.Dimension2DgetDimension(JasperReportsContext jasperReportsContext)Deprecated.List<JRPrintImageAreaHyperlink>getImageAreaHyperlinks(Rectangle2D renderingArea)Deprecated.Returns the list ofimage map areas.intgetImageDataDPI(JasperReportsContext jasperReportsContext)Deprecated.static BatikRenderergetInstance(byte[] svgData)Deprecated.Creates a SVG renderer from binary data.static BatikRenderergetInstance(File svgFile)Deprecated.Creates a SVG renderer from a file.static BatikRenderergetInstance(InputStream svgDataStream)Deprecated.Creates a SVG renderer from a data stream.static BatikRenderergetInstance(URL svgURL)Deprecated.Creates a SVG renderer from aURL.static BatikRenderergetInstanceFromLocation(JasperReportsContext jasperReportsContext, String location)Deprecated.Creates a SVG renderer by loading data from a generic location.static BatikRenderergetInstanceFromText(String svgText)Deprecated.Creates a SVG renderer from SVG text.static BatikRenderergetLocationInstance(String location)Deprecated.Replaced byResourceRenderer.intgetMinDPI()Deprecated.booleanhasImageAreaHyperlinks()Deprecated.Indicates whether the renderer actually includes any image map areas.booleanisAntiAlias()Deprecated.voidrender(JasperReportsContext jasperReportsContext, Graphics2D grx, Rectangle2D rectangle)Deprecated.List<JRPrintImageAreaHyperlink>renderWithHyperlinks(Graphics2D grx, Rectangle2D rectangle)Deprecated.To be removed.voidsetAntiAlias(boolean antiAlias)Deprecated.voidsetMinDPI(int minDPI)Deprecated.protected voidsetSvgDataLocation(String svgDataLocation)Deprecated.Replaced byResourceRenderer.-
Methods inherited from class net.sf.jasperreports.engine.JRAbstractSvgRenderer
getBackcolor, getDimension, getImageData, getImageData, getImageType, getImageTypeValue, getType, getTypeValue, render
-
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
getDimension, getId, getImageData, getImageType, getType, render
-
Methods inherited from interface net.sf.jasperreports.engine.Renderable
getImageData, getImageTypeValue, getTypeValue
-
Methods inherited from interface net.sf.jasperreports.renderers.Renderable
getId
-
-
-
-
Constructor Detail
-
BatikRenderer
protected BatikRenderer(List<JRPrintImageAreaHyperlink> areaHyperlinks)
Deprecated.
-
BatikRenderer
public BatikRenderer(String svgText, List<JRPrintImageAreaHyperlink> areaHyperlinks)
Deprecated.Creates a SVG renderer.- Parameters:
svgText- the SVG textareaHyperlinks- a list ofarea hyperlinks
-
BatikRenderer
public BatikRenderer(byte[] svgData, List<JRPrintImageAreaHyperlink> areaHyperlinks)Deprecated.Creates a SVG renderer.- Parameters:
svgData- the SVG (binary) dataareaHyperlinks- a list ofarea hyperlinks
-
-
Method Detail
-
render
public void render(JasperReportsContext jasperReportsContext, Graphics2D grx, Rectangle2D rectangle) throws JRException
Deprecated.- Specified by:
renderin interfaceRenderable- Overrides:
renderin classJRAbstractRenderer- Throws:
JRException
-
getDimension
public Dimension2D getDimension(JasperReportsContext jasperReportsContext)
Deprecated.- Specified by:
getDimensionin interfaceRenderable- Overrides:
getDimensionin classJRAbstractSvgRenderer
-
getData
public byte[] getData(JasperReportsContext jasperReportsContext) throws JRException
Deprecated.- Specified by:
getDatain interfaceDataRenderable- Throws:
JRException
-
ensureData
protected void ensureData(JasperReportsContext jasperReportsContext) throws JRException
Deprecated.- Throws:
JRException
-
ensureSvg
protected void ensureSvg(JasperReportsContext jasperReportsContext) throws JRException
Deprecated.- Throws:
JRException
-
renderWithHyperlinks
public List<JRPrintImageAreaHyperlink> renderWithHyperlinks(Graphics2D grx, Rectangle2D rectangle) throws JRException
Deprecated.To be removed.Description copied from interface:JRImageMapRendererReturns the list ofimage map areas.- Specified by:
renderWithHyperlinksin interfaceJRImageMapRendererrectangle- the area on which the image would be rendered- Returns:
- a list of
JRPrintImageAreaHyperlinkinstances. - Throws:
JRException
-
getImageAreaHyperlinks
public List<JRPrintImageAreaHyperlink> getImageAreaHyperlinks(Rectangle2D renderingArea) throws JRException
Deprecated.Description copied from interface:ImageMapRenderableReturns the list ofimage map areas.- Specified by:
getImageAreaHyperlinksin interfaceAreaHyperlinksRenderable- Specified by:
getImageAreaHyperlinksin interfaceImageMapRenderable- Specified by:
getImageAreaHyperlinksin interfaceJRImageMapRenderer- Parameters:
renderingArea- the area on which the image would be rendered- Returns:
- a list of
JRPrintImageAreaHyperlinkinstances. - Throws:
JRException
-
hasImageAreaHyperlinks
public boolean hasImageAreaHyperlinks()
Deprecated.Description copied from interface:ImageMapRenderableIndicates whether the renderer actually includes any image map areas.- Specified by:
hasImageAreaHyperlinksin interfaceAreaHyperlinksRenderable- Specified by:
hasImageAreaHyperlinksin interfaceImageMapRenderable- Specified by:
hasImageAreaHyperlinksin interfaceJRImageMapRenderer- Returns:
- whether the renderer actually includes any image map areas
-
createGraphics
public Graphics2D createGraphics(BufferedImage bi)
Deprecated.- Specified by:
createGraphicsin interfaceRenderToImageAwareRenderable- Overrides:
createGraphicsin classJRAbstractSvgRenderer
-
setSvgDataLocation
protected void setSvgDataLocation(String svgDataLocation)
Deprecated.Replaced byResourceRenderer.
-
getInstance
public static BatikRenderer getInstance(byte[] svgData)
Deprecated.Creates a SVG renderer from binary data.- Parameters:
svgData- the SVG (binary) data- Returns:
- a SVG renderer
-
getInstance
public static BatikRenderer getInstance(InputStream svgDataStream) throws JRException
Deprecated.Creates a SVG renderer from a data stream.Note: the data stream is exhausted, but not closed.
- Parameters:
svgDataStream- the SVG binary data stream- Returns:
- a SVG renderer
- Throws:
JRException
-
getInstance
public static BatikRenderer getInstance(File svgFile) throws JRException
Deprecated.Creates a SVG renderer from a file.- Parameters:
svgFile- the SVG file to read- Returns:
- a SVG renderer
- Throws:
JRException
-
getInstance
public static BatikRenderer getInstance(URL svgURL) throws JRException
Deprecated.Creates a SVG renderer from aURL.- Parameters:
svgURL- the SVG URL- Returns:
- a SVG renderer
- Throws:
JRException
-
getInstanceFromText
public static BatikRenderer getInstanceFromText(String svgText) throws JRException
Deprecated.Creates a SVG renderer from SVG text.- Parameters:
svgText- the SVG text- Returns:
- a SVG renderer
- Throws:
JRException
-
getInstanceFromLocation
public static BatikRenderer getInstanceFromLocation(JasperReportsContext jasperReportsContext, String location) throws JRException
Deprecated.Creates a SVG renderer by loading data from a generic location.- Parameters:
location- the location- Returns:
- a SVG renderer
- Throws:
JRException- See Also:
RepositoryUtil.getBytesFromLocation(String)
-
getLocationInstance
public static BatikRenderer getLocationInstance(String location) throws JRException
Deprecated.Replaced byResourceRenderer.Creates a lazily loaded SVG renderer for a location.The returned renderer loads the SVG data lazily, i.e. only when the data is actually required (which is at the first
render(JasperReportsContext, Graphics2D, Rectangle2D)}.- Parameters:
location- the SVG location- Throws:
JRException
-
getImageDataDPI
public int getImageDataDPI(JasperReportsContext jasperReportsContext)
Deprecated.- Specified by:
getImageDataDPIin interfaceRenderToImageAwareRenderable- Overrides:
getImageDataDPIin classJRAbstractSvgRenderer
-
getMinDPI
public int getMinDPI()
Deprecated.
-
setMinDPI
public void setMinDPI(int minDPI)
Deprecated.
-
isAntiAlias
public boolean isAntiAlias()
Deprecated.
-
setAntiAlias
public void setAntiAlias(boolean antiAlias)
Deprecated.
-
-