Class RendererUtil
java.lang.Object
net.sf.jasperreports.renderers.util.RendererUtil
- Author:
- Teodor Danciu (teodord@users.sourceforge.net)
-
Field Summary
Fields -
Method Summary
Modifier and TypeMethodDescriptiongetDataRenderable(Renderable renderer, Dimension dimension, Color backcolor) getImageDataRenderable(RenderersCache renderersCache, Renderable renderer, Dimension dimension, Color backcolor) static RendererUtilgetInstance(JasperReportsContext jasperReportsContext) static RendererUtilgetInstance(RepositoryContext context) getNonLazyRenderable(String resourceLocation, OnErrorTypeEnum onErrorType) getOnErrorRenderer(OnErrorTypeEnum onErrorType, JRException e) getOnErrorRenderer(OnErrorTypeEnum onErrorType, JRRuntimeException e) getRenderable(byte[] data) getRenderable(Image image, ImageTypeEnum imageType, OnErrorTypeEnum onErrorType) Creates and returns an instance of the JRImageRenderer class after encoding the image object using an image encoder that supports the supplied image type.getRenderable(Image img, OnErrorTypeEnum onErrorType) getRenderable(File file, OnErrorTypeEnum onErrorType) getRenderable(InputStream is, OnErrorTypeEnum onErrorType) getRenderable(URL url, OnErrorTypeEnum onErrorType) static StringgetResourceLocation(Renderable renderer) getSvgInfo(byte[] data) handleImageError(Exception error, OnErrorTypeEnum onErrorType) static booleanisLazy(Renderable renderer) booleanisSvgData(byte[] data) booleanisSvgData(DataRenderable dataRenderable) protected booleanisSvgRootElement(String rootElementName)
-
Field Details
-
EXCEPTION_MESSAGE_KEY_IMAGE_ERROR
- See Also:
-
EXCEPTION_MESSAGE_KEY_RENDERABLE_MUST_IMPLEMENT_INTERFACE
- See Also:
-
NO_IMAGE_RENDERER
-
SVG_MIME_TYPE
- See Also:
-
SVG_FILE_EXTENSION
- See Also:
-
SVG_ROOT_ELEMENT
- See Also:
-
SVG_ROOT_ELEMENT_QNAME_SUFFIX
- See Also:
-
-
Method Details
-
getInstance
-
getInstance
-
isSvgData
public boolean isSvgData(byte[] data) -
getSvgInfo
-
isSvgRootElement
-
isSvgData
- Throws:
JRException
-
getSvgDataSniffer
-
getNonLazyRenderable
public Renderable getNonLazyRenderable(String resourceLocation, OnErrorTypeEnum onErrorType) throws JRException - Throws:
JRException
-
getRenderable
- Throws:
JRException
-
getRenderable
public Renderable getRenderable(Image image, ImageTypeEnum imageType, OnErrorTypeEnum onErrorType) throws JRException Creates and returns an instance of the JRImageRenderer class after encoding the image object using an image encoder that supports the supplied image type.- Parameters:
image- the java.awt.Image object to wrap into a JRImageRenderer instanceimageType- the type of the image as specified by one of the constants defined in the ImageTypeEnumonErrorType- one of the error type constants defined in theOnErrorTypeEnum.- Returns:
- the image renderer instance
- Throws:
JRException
-
getRenderable
-
getRenderable
- Throws:
JRException
-
getRenderable
- Throws:
JRException
-
getRenderable
- Throws:
JRException
-
handleImageError
- Throws:
JRException
-
getOnErrorRenderer
- Throws:
JRException
-
getOnErrorRenderer
public Renderable getOnErrorRenderer(OnErrorTypeEnum onErrorType, JRRuntimeException e) throws JRRuntimeException - Throws:
JRRuntimeException
-
isLazy
-
getResourceLocation
-
getDataRenderable
public DataRenderable getDataRenderable(Renderable renderer, Dimension dimension, Color backcolor) throws JRException - Throws:
JRException
-
getImageDataRenderable
public DataRenderable getImageDataRenderable(RenderersCache renderersCache, Renderable renderer, Dimension dimension, Color backcolor) throws JRException - Throws:
JRException
-