public class RendererUtil extends Object
| Modifier and Type | Field and Description |
|---|---|
static String |
EXCEPTION_MESSAGE_KEY_IMAGE_ERROR |
static String |
EXCEPTION_MESSAGE_KEY_RENDERABLE_MUST_IMPLEMENT_INTERFACE |
static Renderable |
NO_IMAGE_RENDERER |
static String |
SVG_FILE_EXTENSION |
static String |
SVG_MIME_TYPE |
public static final String EXCEPTION_MESSAGE_KEY_IMAGE_ERROR
public static final String EXCEPTION_MESSAGE_KEY_RENDERABLE_MUST_IMPLEMENT_INTERFACE
public static final Renderable NO_IMAGE_RENDERER
public static final String SVG_MIME_TYPE
public static final String SVG_FILE_EXTENSION
public static RendererUtil getInstance(JasperReportsContext jasperReportsContext)
public boolean isSvgData(byte[] data)
public boolean isSvgData(DataRenderable dataRenderable) throws JRException
JRExceptionpublic SvgDataSniffer getSvgDataSniffer()
public Renderable getNonLazyRenderable(String resourceLocation, OnErrorTypeEnum onErrorType) throws JRException
JRExceptionpublic Renderable getRenderable(Image img, OnErrorTypeEnum onErrorType) throws JRException
JRExceptionpublic Renderable getRenderable(Image image, ImageTypeEnum imageType, OnErrorTypeEnum onErrorType) throws JRException
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 JRRenderable interfaceonErrorType - one of the error type constants defined in the OnErrorTypeEnum.JRExceptionpublic Renderable getRenderable(InputStream is, OnErrorTypeEnum onErrorType) throws JRException
JRExceptionpublic Renderable getRenderable(URL url, OnErrorTypeEnum onErrorType) throws JRException
JRExceptionpublic Renderable getRenderable(File file, OnErrorTypeEnum onErrorType) throws JRException
JRExceptionpublic Renderable handleImageError(Exception error, OnErrorTypeEnum onErrorType) throws JRException
JRExceptionpublic Renderable getOnErrorRenderer(OnErrorTypeEnum onErrorType, JRException e) throws JRException
JRExceptionpublic Renderable getOnErrorRenderer(OnErrorTypeEnum onErrorType, JRRuntimeException e) throws JRRuntimeException
JRRuntimeExceptionpublic static boolean isLazy(Renderable renderer)
public static String getResourceLocation(Renderable renderer)
public DataRenderable getDataRenderable(Renderable renderer, Dimension dimension, Color backcolor) throws JRException
JRExceptionpublic DataRenderable getImageDataRenderable(RenderersCache renderersCache, Renderable renderer, Dimension dimension, Color backcolor) throws JRException
JRExceptionCopyright © 2017. All rights reserved.