ResourceRenderer
and DataRenderable
.public class BatikRenderer extends JRAbstractSvgRenderer implements ImageMapRenderable, DataRenderable, RenderToImageAwareRenderable
Modifier and Type | Class and Description |
---|---|
protected static class |
BatikRenderer.JRUserAgent
Deprecated.
Replaced by
BatikUserAgent . |
EXCEPTION_MESSAGE_KEY_DIMENSION_MUST_OVERRIDE, EXCEPTION_MESSAGE_KEY_DIMENSION_NULL_NOT_ALLOWED
PROPERTY_IMAGE_DPI
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
Modifier | Constructor and Description |
---|---|
|
BatikRenderer(byte[] svgData,
List<JRPrintImageAreaHyperlink> areaHyperlinks)
Deprecated.
Creates a SVG renderer.
|
protected |
BatikRenderer(List<JRPrintImageAreaHyperlink> areaHyperlinks)
Deprecated.
|
|
BatikRenderer(String svgText,
List<JRPrintImageAreaHyperlink> areaHyperlinks)
Deprecated.
Creates a SVG renderer.
|
Modifier and Type | Method and Description |
---|---|
Graphics2D |
createGraphics(BufferedImage bi)
Deprecated.
|
protected void |
ensureData(JasperReportsContext jasperReportsContext)
Deprecated.
|
protected void |
ensureSvg(JasperReportsContext jasperReportsContext)
Deprecated.
|
byte[] |
getData(JasperReportsContext jasperReportsContext)
Deprecated.
|
Dimension2D |
getDimension(JasperReportsContext jasperReportsContext)
Deprecated.
|
List<JRPrintImageAreaHyperlink> |
getImageAreaHyperlinks(Rectangle2D renderingArea)
Deprecated.
Returns the list of
image map areas . |
int |
getImageDataDPI(JasperReportsContext jasperReportsContext)
Deprecated.
|
static BatikRenderer |
getInstance(byte[] svgData)
Deprecated.
Creates a SVG renderer from binary data.
|
static BatikRenderer |
getInstance(File svgFile)
Deprecated.
Creates a SVG renderer from a file.
|
static BatikRenderer |
getInstance(InputStream svgDataStream)
Deprecated.
Creates a SVG renderer from a data stream.
|
static BatikRenderer |
getInstance(URL svgURL)
Deprecated.
Creates a SVG renderer from a
URL . |
static BatikRenderer |
getInstanceFromLocation(JasperReportsContext jasperReportsContext,
String location)
Deprecated.
Creates a SVG renderer by loading data from a generic location.
|
static BatikRenderer |
getInstanceFromText(String svgText)
Deprecated.
Creates a SVG renderer from SVG text.
|
static BatikRenderer |
getLocationInstance(String location)
Deprecated.
Replaced by
ResourceRenderer . |
int |
getMinDPI()
Deprecated.
|
boolean |
hasImageAreaHyperlinks()
Deprecated.
Indicates whether the renderer actually includes any image map areas.
|
boolean |
isAntiAlias()
Deprecated.
|
void |
render(JasperReportsContext jasperReportsContext,
Graphics2D grx,
Rectangle2D rectangle)
Deprecated.
|
List<JRPrintImageAreaHyperlink> |
renderWithHyperlinks(Graphics2D grx,
Rectangle2D rectangle)
Deprecated.
To be removed.
|
void |
setAntiAlias(boolean antiAlias)
Deprecated.
|
void |
setMinDPI(int minDPI)
Deprecated.
|
protected void |
setSvgDataLocation(String svgDataLocation)
Deprecated.
Replaced by
ResourceRenderer . |
getBackcolor, getDimension, getImageData, getImageData, getImageType, getImageTypeValue, getType, getTypeValue, render
getId
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
getImageData, getImageTypeValue, getTypeValue
getId
getDimension, getId, getImageData, getImageType, getType, render
protected BatikRenderer(List<JRPrintImageAreaHyperlink> areaHyperlinks)
public BatikRenderer(String svgText, List<JRPrintImageAreaHyperlink> areaHyperlinks)
svgText
- the SVG textareaHyperlinks
- a list of area hyperlinks
public BatikRenderer(byte[] svgData, List<JRPrintImageAreaHyperlink> areaHyperlinks)
svgData
- the SVG (binary) dataareaHyperlinks
- a list of area hyperlinks
public void render(JasperReportsContext jasperReportsContext, Graphics2D grx, Rectangle2D rectangle) throws JRException
render
in class JRAbstractRenderer
JRException
public Dimension2D getDimension(JasperReportsContext jasperReportsContext)
getDimension
in class JRAbstractSvgRenderer
public byte[] getData(JasperReportsContext jasperReportsContext) throws JRException
getData
in interface DataRenderable
JRException
protected void ensureData(JasperReportsContext jasperReportsContext) throws JRException
JRException
protected void ensureSvg(JasperReportsContext jasperReportsContext) throws JRException
JRException
public List<JRPrintImageAreaHyperlink> renderWithHyperlinks(Graphics2D grx, Rectangle2D rectangle) throws JRException
JRImageMapRenderer
image map areas
.renderWithHyperlinks
in interface JRImageMapRenderer
rectangle
- the area on which the image would be renderedJRPrintImageAreaHyperlink
instances.JRException
public List<JRPrintImageAreaHyperlink> getImageAreaHyperlinks(Rectangle2D renderingArea) throws JRException
ImageMapRenderable
image map areas
.getImageAreaHyperlinks
in interface ImageMapRenderable
getImageAreaHyperlinks
in interface JRImageMapRenderer
getImageAreaHyperlinks
in interface AreaHyperlinksRenderable
renderingArea
- the area on which the image would be renderedJRPrintImageAreaHyperlink
instances.JRException
public boolean hasImageAreaHyperlinks()
ImageMapRenderable
hasImageAreaHyperlinks
in interface ImageMapRenderable
hasImageAreaHyperlinks
in interface JRImageMapRenderer
hasImageAreaHyperlinks
in interface AreaHyperlinksRenderable
public Graphics2D createGraphics(BufferedImage bi)
createGraphics
in interface RenderToImageAwareRenderable
createGraphics
in class JRAbstractSvgRenderer
protected void setSvgDataLocation(String svgDataLocation)
ResourceRenderer
.public static BatikRenderer getInstance(byte[] svgData)
svgData
- the SVG (binary) datapublic static BatikRenderer getInstance(InputStream svgDataStream) throws JRException
Note: the data stream is exhausted, but not closed.
svgDataStream
- the SVG binary data streamJRException
public static BatikRenderer getInstance(File svgFile) throws JRException
svgFile
- the SVG file to readJRException
public static BatikRenderer getInstance(URL svgURL) throws JRException
URL
.svgURL
- the SVG URLJRException
public static BatikRenderer getInstanceFromText(String svgText) throws JRException
svgText
- the SVG textJRException
public static BatikRenderer getInstanceFromLocation(JasperReportsContext jasperReportsContext, String location) throws JRException
location
- the locationJRException
RepositoryUtil.getBytesFromLocation(String)
public static BatikRenderer getLocationInstance(String location) throws JRException
ResourceRenderer
.
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)
}.
location
- the SVG locationJRException
public int getImageDataDPI(JasperReportsContext jasperReportsContext)
getImageDataDPI
in interface RenderToImageAwareRenderable
getImageDataDPI
in class JRAbstractSvgRenderer
public int getMinDPI()
public void setMinDPI(int minDPI)
public boolean isAntiAlias()
public void setAntiAlias(boolean antiAlias)
Copyright © 2017. All rights reserved.