public final class JRImageResource extends JRResource
org.apache.wicket.request.resource.AbstractResource.ContentRangeType, org.apache.wicket.request.resource.AbstractResource.ResourceResponse, org.apache.wicket.request.resource.AbstractResource.WriteCallback
Constructor and Description |
---|
JRImageResource()
Construct without a report.
|
JRImageResource(File report)
Construct.
|
JRImageResource(InputStream report)
Construct.
|
JRImageResource(URL report)
Construct.
|
Modifier and Type | Method and Description |
---|---|
String |
getContentType() |
protected byte[] |
getExporterData(net.sf.jasperreports.engine.JasperPrint print,
net.sf.jasperreports.engine.JRAbstractExporter exporter) |
String |
getExtension()
Returns the extension for the resource's file.
|
String |
getFormat()
Gets the image type.
|
int |
getType()
Gets type of image (one of BufferedImage.TYPE_*).
|
float |
getZoomRatio()
Gets the zoom ratio.
|
net.sf.jasperreports.engine.JRAbstractExporter |
newExporter()
Called by getData to obtain an exporter instance.
|
void |
setFormat(String format)
Sets the image type.
|
void |
setType(int type)
Sets type of image (one of BufferedImage.TYPE_*).
|
void |
setZoomRatio(float ratio)
Sets the zoom ratio.
|
protected byte[] |
toImageData(BufferedImage image) |
getConnectionProvider, getContentDisposition, getFileName, getJasperReport, getReportDataSource, getReportParameters, newJasperPrint, newResourceResponse, setConnectionProvider, setFileName, setJasperReport, setReportDataSource, setReportParameters
public JRImageResource()
public JRImageResource(InputStream report)
report
- the report input streampublic JRImageResource(URL report)
report
- the report input streampublic JRImageResource(File report)
report
- the report input streampublic final net.sf.jasperreports.engine.JRAbstractExporter newExporter()
JRResource
newExporter
in class JRResource
JRResource.newExporter()
protected byte[] getExporterData(net.sf.jasperreports.engine.JasperPrint print, net.sf.jasperreports.engine.JRAbstractExporter exporter) throws net.sf.jasperreports.engine.JRException
getExporterData
in class JRResource
net.sf.jasperreports.engine.JRException
protected byte[] toImageData(BufferedImage image)
image
- The image to turn into datapublic String getContentType()
getContentType
in class JRResource
JRResource.getContentType()
public float getZoomRatio()
public void setZoomRatio(float ratio)
ratio
- the zoom ratio used for the export. The default value is 1public String getFormat()
public void setFormat(String format)
format
- the image type. The default value is 'png'public int getType()
public void setType(int type)
type
- type of imagepublic String getExtension()
JRResource
getExtension
in class JRResource
JRResource.getExtension()
Copyright © 2015. All rights reserved.