net.sf.jasperreports.engine
Class JasperPrint

java.lang.Object
  extended bynet.sf.jasperreports.engine.JasperPrint
All Implemented Interfaces:
java.io.Serializable

public class JasperPrint
extends java.lang.Object
implements java.io.Serializable

An instance of this class represents a page-oriented document that can be viewed, printed or exported to other formats.

When filling report designs with data, the engine produces instances of this class and these can be transferred over the network, stored in a serialized form on disk or exported to various other formats like PDF, HTML, XLS, CSV or XML.

Version:
$Id: JasperPrint.java,v 1.31 2005/09/07 13:58:26 teodord Exp $
Author:
Teodor Danciu (teodord@users.sourceforge.net)
See Also:
Serialized Form

Constructor Summary
JasperPrint()
          Creates a new empty document.
 
Method Summary
 void addFont(JRReportFont reportFont)
          Adds a new font to the report fonts.
 void addPage(int index, JRPrintPage page)
          Adds a new page to the document, placing it at the specified index.
 void addPage(JRPrintPage page)
          Adds a new page to the document.
 java.util.Map getAnchorIndexes()
           
 JRReportFont getDefaultFont()
          Returns the default report font.
 JRDefaultFontProvider getDefaultFontProvider()
          When we want to virtualize pages, we want a font provider that is not the print object itself.
 JRReportFont[] getFonts()
          Gets an array of report fonts.
 java.util.List getFontsList()
          Gets a list of report fonts.
 java.util.Map getFontsMap()
          Gets a map of report fonts.
 java.lang.String getName()
           
 byte getOrientation()
          Returns the page orientation.
 int getPageHeight()
           
 java.util.List getPages()
          Returns a list of all pages in the filled report.
 int getPageWidth()
           
 JRReportFont removeFont(JRReportFont reportFont)
           
 JRReportFont removeFont(java.lang.String fontName)
           
 JRPrintPage removePage(int index)
          Removes a page from the document.
 void setDefaultFont(JRReportFont font)
          Sets the default report font.
 void setName(java.lang.String name)
          Sets the name of the document.
 void setOrientation(byte orientation)
          Sets the page orientation.
 void setPageHeight(int pageHeight)
          Sets the page height.
 void setPageWidth(int pageWidth)
          Sets the page width.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

JasperPrint

public JasperPrint()
Creates a new empty document.

Method Detail

getName

public java.lang.String getName()
Returns:
Returns the name of the document

setName

public void setName(java.lang.String name)
Sets the name of the document.

Parameters:
name - name of the document

getPageWidth

public int getPageWidth()
Returns:
Returns the page width

setPageWidth

public void setPageWidth(int pageWidth)
Sets the page width.

Parameters:
pageWidth - page width

getPageHeight

public int getPageHeight()
Returns:
Returns the page height.

setPageHeight

public void setPageHeight(int pageHeight)
Sets the page height.

Parameters:
pageHeight - page height

getOrientation

public byte getOrientation()
Returns the page orientation.

See Also:
ORIENTATION_PORTRAIT,, ORIENTATION_LANDSCAPE

setOrientation

public void setOrientation(byte orientation)
Sets the page orientation.

See Also:
ORIENTATION_PORTRAIT,, ORIENTATION_LANDSCAPE

getDefaultFont

public JRReportFont getDefaultFont()
Returns the default report font.


setDefaultFont

public void setDefaultFont(JRReportFont font)
Sets the default report font.


getDefaultFontProvider

public JRDefaultFontProvider getDefaultFontProvider()
When we want to virtualize pages, we want a font provider that is not the print object itself.


getFonts

public JRReportFont[] getFonts()
Gets an array of report fonts.


getFontsList

public java.util.List getFontsList()
Gets a list of report fonts.


getFontsMap

public java.util.Map getFontsMap()
Gets a map of report fonts.


addFont

public void addFont(JRReportFont reportFont)
             throws JRException
Adds a new font to the report fonts.

Throws:
JRException

removeFont

public JRReportFont removeFont(java.lang.String fontName)

removeFont

public JRReportFont removeFont(JRReportFont reportFont)

getPages

public java.util.List getPages()
Returns a list of all pages in the filled report.


addPage

public void addPage(JRPrintPage page)
Adds a new page to the document.


addPage

public void addPage(int index,
                    JRPrintPage page)
Adds a new page to the document, placing it at the specified index.


removePage

public JRPrintPage removePage(int index)
Removes a page from the document.


getAnchorIndexes

public java.util.Map getAnchorIndexes()


© 2001-2005 JasperSoft Corporation www.jaspersoft.com