|
|||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectnet.sf.jasperreports.engine.JRAbstractExporter
net.sf.jasperreports.engine.export.JRRtfExporter
Exports a JasperReports document to RTF format. It has binary output type and exports the document to a free-form layout. It uses the RTF Specification 1.6 (compatible with MS Word 6.0, 2003 and XP).
Since classic AWT fonts can be sometimes very different from system fonts (which are used by RTF viewers),
a font mapping feature was added. By using the JRExporterParameter.FONT_MAP
parameter, a logical
font like "sansserif" can be mapped to a system specific font, like "Comic Sans MS". Both map keys and values are strings.
Field Summary | |
protected java.util.List |
colors
|
protected java.io.File |
destFile
|
protected java.util.List |
fonts
|
protected JRExportProgressMonitor |
progressMonitor
|
protected int |
reportIndex
|
protected java.io.Writer |
writer
|
Fields inherited from class net.sf.jasperreports.engine.JRAbstractExporter |
classLoader, defaultFont, endPageIndex, globalOffsetX, globalOffsetY, isModeBatch, jasperPrint, jasperPrintList, parameters, startPageIndex, styledTextParser |
Constructor Summary | |
JRRtfExporter()
|
Method Summary | |
protected void |
createColorAndFontEntries()
Create color and font entries for the header of .rtf file. |
protected void |
exportElements(java.util.Collection elements,
int offsetx,
int offsety)
|
protected void |
exportEllipse(JRPrintEllipse ellipse,
int offsetx,
int offsety)
Draw a ellipse object |
protected void |
exportFrame(JRPrintFrame frame,
int offsetx,
int offsety)
|
protected void |
exportImage(JRPrintImage printImage,
int offsetx,
int offsety)
Export a image object |
protected void |
exportLine(JRPrintLine line,
int offsetx,
int offsety)
Draw a line object |
protected void |
exportPage(JRPrintPage page,
boolean lastPage)
Exports a report page |
protected void |
exportRectangle(JRPrintRectangle rect,
int offsetx,
int offsety)
Draw a rectangle |
void |
exportReport()
Export report in .rtf format |
protected java.lang.StringBuffer |
exportReportToBuffer()
Export report in .rtf format |
protected void |
exportReportToFile()
Export report to a file in the .rtf format |
protected void |
exportReportToStream()
Export report in .rtf format to a stream |
protected void |
exportText(JRPrintText text,
int offsetx,
int offsety)
Draw a text box |
protected int |
getAdjustment(byte pen)
Get border adjustment for graphic elements depending on pen width used |
Methods inherited from class net.sf.jasperreports.engine.JRAbstractExporter |
getBox, getDefaultFont, getOffsetX, getOffsetY, getParameter, getParameters, getStyledText, getStyledText, resetClassLoader, restoreElementOffsets, setClassLoader, setFrameElementsOffset, setInput, setOffset, setOutput, setPageRange, setParameter, setParameters |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
protected JRExportProgressMonitor progressMonitor
protected java.io.Writer writer
protected java.io.File destFile
protected int reportIndex
protected java.util.List colors
protected java.util.List fonts
Constructor Detail |
public JRRtfExporter()
Method Detail |
public void exportReport() throws JRException
exportReport
in interface JRExporter
exportReport
in class JRAbstractExporter
JRException
protected java.lang.StringBuffer exportReportToBuffer() throws JRException
JRException
protected void exportReportToStream() throws JRException, java.io.IOException
JRException
java.io.IOException
protected void exportReportToFile() throws JRException
JRException
protected void createColorAndFontEntries() throws JRException
JRException
protected void exportPage(JRPrintPage page, boolean lastPage) throws JRException, java.io.IOException
page
- Page that will be exported
JRException
java.io.IOException
protected int getAdjustment(byte pen)
pen
- protected void exportLine(JRPrintLine line, int offsetx, int offsety) throws java.io.IOException
line
- JasperReports line object - JRPrintLineoffsetx
- If the object is in a frame this parameter represents the x offset of the elementoffsety
- If the object is in a frame this parameter represents the y offset of the element
java.io.IOException
protected void exportRectangle(JRPrintRectangle rect, int offsetx, int offsety) throws java.io.IOException
rect
- JasperReports rectangle object (JRPrintRectangle)offsetx
- If the object is in a frame this parameter represents the x offset of the elementoffsety
- If the object is in a frame this parameter represents the y offset of the element
java.io.IOException
protected void exportEllipse(JRPrintEllipse ellipse, int offsetx, int offsety) throws java.io.IOException
ellipse
- JasperReports ellipse object (JRPrintElipse)offsetx
- If the object is in a frame this parameter represents the x offset of the elementoffsety
- If the object is in a frame this parameter represents the y offset of the element
java.io.IOException
protected void exportText(JRPrintText text, int offsetx, int offsety) throws java.io.IOException, JRException
text
- JasperReports text object (JRPrintText)offsetx
- If the object is in a frame this parameter represents the x offset of the elementoffsety
- If the object is in a frame this parameter represents the y offset of the element
JRException
java.io.IOException
protected void exportImage(JRPrintImage printImage, int offsetx, int offsety) throws JRException, java.io.IOException
printImage
- JasperReports image object (JRPrintImage)offsetx
- If the object is in a frame this parameter represents the x offset of the elementoffsety
- If the object is in a frame this parameter represents the y offset of the element
JRException
java.io.IOException
protected void exportFrame(JRPrintFrame frame, int offsetx, int offsety) throws JRException, java.io.IOException
frame
-
JRException
java.io.IOException
protected void exportElements(java.util.Collection elements, int offsetx, int offsety) throws JRException, java.io.IOException
JRException
java.io.IOException
|
|||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |