Style Intelligence v12.0

inetsoft.report.io
Class RTFGenerator

java.lang.Object
  extended by inetsoft.report.io.AbstractGenerator
      extended by inetsoft.report.io.RTFGenerator
All Implemented Interfaces:
Generator

public class RTFGenerator
extends AbstractGenerator

RTFGenerator supports exporting a report to a RTF file. It creates a RTF file closely match the look and feel of the orignal report.


Field Summary
protected  ReportSheet sheet
           
protected  PrintWriter writer
           
 
Fields inherited from class inetsoft.report.io.AbstractGenerator
docInfo
 
Constructor Summary
RTFGenerator(OutputStream output)
          Create a RTFGenerator.
 
Method Summary
 void cancel()
          Cancel the generation if one if on going.
 void generate(ReportSheet sheet)
          Export a report.
 void generate(ReportSheet sheet, Enumeration pages)
          Write a collection of pages to text.
 Dimension getPageSize()
          Deprecated. replaced by ReportSheet.getPageSize().
 void setOutput(OutputStream output)
          Set the output stream of this generator.
 void setPageSize(double w, double h)
          Deprecated. replaced by ReportSheet.setPageSize().
 void setPageSize(Size size)
          Deprecated. replaced by ReportSheet.setPageSize().
 void setResolution(int res)
          Deprecated. page size setting replaced by ReportSheet.setPageSize().
 void write(ReportSheet sheet)
          Deprecated. use generate() method.
 void write(ReportSheet sheet, Enumeration pages)
          Deprecated. use generate() method.
protected  String writeFont(Font font, boolean underline)
           
 
Methods inherited from class inetsoft.report.io.AbstractGenerator
addProgressListener, fireProgressEvent, getCachePages, getOutput, getReportCache, getReportId, removeProgressListener, setDocumentInfo, setReportCache, setReportId
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

writer

protected PrintWriter writer

sheet

protected ReportSheet sheet
Constructor Detail

RTFGenerator

public RTFGenerator(OutputStream output)
Create a RTFGenerator.

Method Detail

setOutput

public void setOutput(OutputStream output)
Set the output stream of this generator.

Specified by:
setOutput in interface Generator
Overrides:
setOutput in class AbstractGenerator

generate

public void generate(ReportSheet sheet)
              throws IOException
Export a report.

Parameters:
sheet - report to export.
Throws:
IOException

generate

public void generate(ReportSheet sheet,
                     Enumeration pages)
              throws IOException
Write a collection of pages to text.

Throws:
IOException

setPageSize

public void setPageSize(double w,
                        double h)
Deprecated. replaced by ReportSheet.setPageSize().

Set the page size for the generated output. This determines how the report is converted to the rtf file.

Parameters:
w - page width in inches.
h - page height in inches.

setPageSize

public void setPageSize(Size size)
Deprecated. replaced by ReportSheet.setPageSize().

Set the page size in inches. Common paper sizes are defined as constants in StyleConstants.

Parameters:
size - Size object in inches.

getPageSize

public Dimension getPageSize()
Deprecated. replaced by ReportSheet.getPageSize().

Get the page size in pixel.


setResolution

public void setResolution(int res)
Deprecated. page size setting replaced by ReportSheet.setPageSize().

Set the page resolution in pixel/inche.

Parameters:
res - resolution.

write

public void write(ReportSheet sheet)
           throws IOException
Deprecated. use generate() method.

Export a report.

Parameters:
sheet - report to export.
Throws:
IOException

write

public void write(ReportSheet sheet,
                  Enumeration pages)
           throws IOException
Deprecated. use generate() method.

Export a report.

Parameters:
sheet - report to export.
pages - StylePage objects that are already generated from report.
Throws:
IOException

cancel

public void cancel()
Cancel the generation if one if on going.


writeFont

protected String writeFont(Font font,
                           boolean underline)

Copyright © 1996-2014 InetSoft Technology Corp. All Rights Reserved.