net.sf.jasperreports.engine
Class JRImageRenderer
java.lang.Object
net.sf.jasperreports.engine.JRAbstractRenderer
net.sf.jasperreports.engine.JRImageRenderer
- All Implemented Interfaces:
- Serializable, JRRenderable, Renderable
- Direct Known Subclasses:
- JRSimpleImageMapRenderer
public class JRImageRenderer
- extends JRAbstractRenderer
- Version:
- $Id: JRImageRenderer.java 5397 2012-05-21 01:10:02Z teodord $
- Author:
- Teodor Danciu (teodord@users.sourceforge.net)
- See Also:
- Serialized Form
| 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, TYPE_IMAGE, TYPE_SVG |
|
Method Summary |
Dimension2D |
getDimension()
Deprecated. Replaced by getDimension(JasperReportsContext). |
Dimension2D |
getDimension(JasperReportsContext jasperReportsContext)
|
Image |
getImage()
Deprecated. Replaced by getImage(JasperReportsContext). |
Image |
getImage(JasperReportsContext jasperReportsContext)
|
byte[] |
getImageData()
Deprecated. Replaced by getImageData(JasperReportsContext). |
byte[] |
getImageData(JasperReportsContext jasperReportsContext)
|
String |
getImageLocation()
|
byte |
getImageType()
Deprecated. Replaced by getImageTypeValue(). |
ImageTypeEnum |
getImageTypeValue()
|
static JRImageRenderer |
getInstance(byte[] imageData)
|
static JRRenderable |
getInstance(File file,
OnErrorTypeEnum onErrorType)
Deprecated. Replaced by RenderableUtil.getRenderable(File, OnErrorTypeEnum). |
static JRRenderable |
getInstance(Image image,
byte imageType,
OnErrorTypeEnum onErrorType)
Deprecated. Replaced by RenderableUtil.getRenderable(Image, ImageTypeEnum, OnErrorTypeEnum). |
static JRRenderable |
getInstance(Image img,
OnErrorTypeEnum onErrorType)
Deprecated. Replaced by RenderableUtil.getRenderable(Image, OnErrorTypeEnum). |
static JRRenderable |
getInstance(InputStream is,
OnErrorTypeEnum onErrorType)
Deprecated. Replaced by RenderableUtil.getRenderable(InputStream, OnErrorTypeEnum). |
static JRRenderable |
getInstance(String imageLocation)
Deprecated. Replaced by RenderableUtil.getRenderable(String). |
static JRRenderable |
getInstance(String imageLocation,
OnErrorTypeEnum onErrorType)
Deprecated. Replaced by RenderableUtil.getRenderable(String, OnErrorTypeEnum). |
static JRRenderable |
getInstance(String imageLocation,
OnErrorTypeEnum onErrorType,
boolean isLazy)
Deprecated. Replaced by RenderableUtil.getRenderable(String, OnErrorTypeEnum, boolean). |
static JRRenderable |
getInstance(String imageLocation,
OnErrorTypeEnum onErrorType,
boolean isLazy,
ClassLoader classLoader,
URLStreamHandlerFactory urlHandlerFactory,
FileResolver fileResolver)
Deprecated. Replaced by getInstance(String, OnErrorTypeEnum, boolean). |
static JRRenderable |
getInstance(URL url,
OnErrorTypeEnum onErrorType)
Deprecated. Replaced by RenderableUtil.getRenderable(URL, OnErrorTypeEnum). |
static JRImageRenderer |
getOnErrorRenderer(OnErrorTypeEnum onErrorType,
JRException e)
|
static JRImageRenderer |
getOnErrorRenderer(OnErrorTypeEnum onErrorType,
JRRuntimeException e)
|
static JRRenderable |
getOnErrorRendererForDimension(JRRenderable renderer,
OnErrorTypeEnum onErrorType)
Deprecated. Replaced by RenderableUtil.getOnErrorRendererForDimension(Renderable, OnErrorTypeEnum). |
static JRImageRenderer |
getOnErrorRendererForImage(JasperReportsContext jasperReportsContext,
JRImageRenderer renderer,
OnErrorTypeEnum onErrorType)
|
static JRImageRenderer |
getOnErrorRendererForImage(JRImageRenderer renderer,
OnErrorTypeEnum onErrorType)
Deprecated. Replaced by getOnErrorRendererForImage(JasperReportsContext, JRImageRenderer, OnErrorTypeEnum). |
static JRRenderable |
getOnErrorRendererForImageData(JRRenderable renderer,
OnErrorTypeEnum onErrorType)
Deprecated. Replaced by RenderableUtil.getOnErrorRendererForImageData(Renderable, OnErrorTypeEnum). |
byte |
getType()
Deprecated. Replaced by getTypeValue(). |
RenderableTypeEnum |
getTypeValue()
|
void |
render(Graphics2D grx,
Rectangle2D rectangle)
Deprecated. Replaced by render(JasperReportsContext, Graphics2D, Rectangle2D). |
void |
render(JasperReportsContext jasperReportsContext,
Graphics2D grx,
Rectangle2D rectangle)
|
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
JRImageRenderer
protected JRImageRenderer(byte[] imageData)
JRImageRenderer
protected JRImageRenderer(String imageLocation)
getInstance
public static JRImageRenderer getInstance(byte[] imageData)
getInstance
public static JRRenderable getInstance(String imageLocation)
throws JRException
- Deprecated. Replaced by
RenderableUtil.getRenderable(String).
- Throws:
JRException
getInstance
public static JRRenderable getInstance(String imageLocation,
OnErrorTypeEnum onErrorType)
throws JRException
- Deprecated. Replaced by
RenderableUtil.getRenderable(String, OnErrorTypeEnum).
- Throws:
JRException
getInstance
public static JRRenderable getInstance(String imageLocation,
OnErrorTypeEnum onErrorType,
boolean isLazy)
throws JRException
- Deprecated. Replaced by
RenderableUtil.getRenderable(String, OnErrorTypeEnum, boolean).
- Throws:
JRException
getInstance
public static JRRenderable getInstance(String imageLocation,
OnErrorTypeEnum onErrorType,
boolean isLazy,
ClassLoader classLoader,
URLStreamHandlerFactory urlHandlerFactory,
FileResolver fileResolver)
throws JRException
- Deprecated. Replaced by
getInstance(String, OnErrorTypeEnum, boolean).
- Throws:
JRException
getInstance
public static JRRenderable getInstance(Image img,
OnErrorTypeEnum onErrorType)
throws JRException
- Deprecated. Replaced by
RenderableUtil.getRenderable(Image, OnErrorTypeEnum).
- Throws:
JRException
getInstance
public static JRRenderable getInstance(Image image,
byte imageType,
OnErrorTypeEnum onErrorType)
throws JRException
- Deprecated. Replaced by
RenderableUtil.getRenderable(Image, ImageTypeEnum, OnErrorTypeEnum).
- 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 JRRenderable interfaceonErrorType - one of the error type constants defined in the OnErrorTypeEnum.
- Returns:
- the image renderer instance
- Throws:
JRException
getInstance
public static JRRenderable getInstance(InputStream is,
OnErrorTypeEnum onErrorType)
throws JRException
- Deprecated. Replaced by
RenderableUtil.getRenderable(InputStream, OnErrorTypeEnum).
- Throws:
JRException
getInstance
public static JRRenderable getInstance(URL url,
OnErrorTypeEnum onErrorType)
throws JRException
- Deprecated. Replaced by
RenderableUtil.getRenderable(URL, OnErrorTypeEnum).
- Throws:
JRException
getInstance
public static JRRenderable getInstance(File file,
OnErrorTypeEnum onErrorType)
throws JRException
- Deprecated. Replaced by
RenderableUtil.getRenderable(File, OnErrorTypeEnum).
- Throws:
JRException
getOnErrorRendererForDimension
public static JRRenderable getOnErrorRendererForDimension(JRRenderable renderer,
OnErrorTypeEnum onErrorType)
throws JRException
- Deprecated. Replaced by
RenderableUtil.getOnErrorRendererForDimension(Renderable, OnErrorTypeEnum).
- Throws:
JRException
getOnErrorRendererForImageData
public static JRRenderable getOnErrorRendererForImageData(JRRenderable renderer,
OnErrorTypeEnum onErrorType)
throws JRException
- Deprecated. Replaced by
RenderableUtil.getOnErrorRendererForImageData(Renderable, OnErrorTypeEnum).
- Throws:
JRException
getOnErrorRendererForImage
public static JRImageRenderer getOnErrorRendererForImage(JasperReportsContext jasperReportsContext,
JRImageRenderer renderer,
OnErrorTypeEnum onErrorType)
throws JRException
- Throws:
JRException
getOnErrorRendererForImage
public static JRImageRenderer getOnErrorRendererForImage(JRImageRenderer renderer,
OnErrorTypeEnum onErrorType)
throws JRException
- Deprecated. Replaced by
getOnErrorRendererForImage(JasperReportsContext, JRImageRenderer, OnErrorTypeEnum).
- Throws:
JRException
getOnErrorRenderer
public static JRImageRenderer getOnErrorRenderer(OnErrorTypeEnum onErrorType,
JRException e)
throws JRException
- Throws:
JRException
getOnErrorRenderer
public static JRImageRenderer getOnErrorRenderer(OnErrorTypeEnum onErrorType,
JRRuntimeException e)
throws JRRuntimeException
- Throws:
JRRuntimeException
getImage
public Image getImage(JasperReportsContext jasperReportsContext)
throws JRException
- Throws:
JRException
getImage
public Image getImage()
throws JRException
- Deprecated. Replaced by
getImage(JasperReportsContext).
- Throws:
JRException
getImageLocation
public String getImageLocation()
getType
public byte getType()
- Deprecated. Replaced by
getTypeValue().
getImageType
public byte getImageType()
- Deprecated. Replaced by
getImageTypeValue().
getTypeValue
public RenderableTypeEnum getTypeValue()
- Specified by:
getTypeValue in interface Renderable- Overrides:
getTypeValue in class JRAbstractRenderer
getImageTypeValue
public ImageTypeEnum getImageTypeValue()
- Specified by:
getImageTypeValue in interface Renderable- Overrides:
getImageTypeValue in class JRAbstractRenderer
getDimension
public Dimension2D getDimension()
throws JRException
- Deprecated. Replaced by
getDimension(JasperReportsContext).
- Throws:
JRException
getDimension
public Dimension2D getDimension(JasperReportsContext jasperReportsContext)
throws JRException
- Specified by:
getDimension in interface Renderable- Overrides:
getDimension in class JRAbstractRenderer
- Throws:
JRException
getImageData
public byte[] getImageData(JasperReportsContext jasperReportsContext)
throws JRException
- Specified by:
getImageData in interface Renderable- Overrides:
getImageData in class JRAbstractRenderer
- Throws:
JRException
getImageData
public byte[] getImageData()
throws JRException
- Deprecated. Replaced by
getImageData(JasperReportsContext).
- Throws:
JRException
render
public void render(Graphics2D grx,
Rectangle2D rectangle)
throws JRException
- Deprecated. Replaced by
render(JasperReportsContext, Graphics2D, Rectangle2D).
- Throws:
JRException
render
public void render(JasperReportsContext jasperReportsContext,
Graphics2D grx,
Rectangle2D rectangle)
throws JRException
- Specified by:
render in interface Renderable- Overrides:
render in class JRAbstractRenderer
- Throws:
JRException
Copyright © 2012. All Rights Reserved.