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
JRException
public SvgDataSniffer getSvgDataSniffer()
public Renderable getNonLazyRenderable(String resourceLocation, OnErrorTypeEnum onErrorType) throws JRException
JRException
public Renderable getRenderable(Image img, OnErrorTypeEnum onErrorType) throws JRException
JRException
public 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
.JRException
public Renderable getRenderable(InputStream is, OnErrorTypeEnum onErrorType) throws JRException
JRException
public Renderable getRenderable(URL url, OnErrorTypeEnum onErrorType) throws JRException
JRException
public Renderable getRenderable(File file, OnErrorTypeEnum onErrorType) throws JRException
JRException
public Renderable handleImageError(Exception error, OnErrorTypeEnum onErrorType) throws JRException
JRException
public Renderable getOnErrorRenderer(OnErrorTypeEnum onErrorType, JRException e) throws JRException
JRException
public Renderable getOnErrorRenderer(OnErrorTypeEnum onErrorType, JRRuntimeException e) throws JRRuntimeException
JRRuntimeException
public static boolean isLazy(Renderable renderer)
public static String getResourceLocation(Renderable renderer)
public DataRenderable getDataRenderable(Renderable renderer, Dimension dimension, Color backcolor) throws JRException
JRException
public DataRenderable getImageDataRenderable(RenderersCache renderersCache, Renderable renderer, Dimension dimension, Color backcolor) throws JRException
JRException
Copyright © 2017. All rights reserved.