|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectnet.sf.jasperreports.engine.JasperPrint
public class JasperPrint
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.
Field Summary | |
---|---|
static java.lang.String |
PROPERTIES_PRINT_TRANSFER_PREFIX
Prefix for JasperReports properties that specify properties to be transfered from report templates to print objects. |
Constructor Summary | |
---|---|
JasperPrint()
Creates a new empty document. |
Method Summary | |
---|---|
void |
addFont(JRReportFont reportFont)
Deprecated. |
void |
addFont(JRReportFont reportFont,
boolean isIgnoreDuplicate)
Deprecated. |
void |
addOrigin(JROrigin origin)
Adds a new style to the report origins. |
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. |
void |
addStyle(JRStyle style)
Adds a new style to the report styles. |
void |
addStyle(JRStyle style,
boolean isIgnoreDuplicate)
Adds a new style to the report styles. |
protected void |
collectAnchors(java.util.Collection elements,
int pageIndex,
int offsetX,
int offsetY)
|
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. |
JRStyle |
getDefaultStyle()
Returns the default report style. |
JRDefaultStyleProvider |
getDefaultStyleProvider()
When we want to virtualize pages, we want a style provider that is not the print object itself. |
JRReportFont[] |
getFonts()
Deprecated. |
java.util.List |
getFontsList()
Deprecated. |
java.util.Map |
getFontsMap()
Deprecated. |
java.lang.String |
getFormatFactoryClass()
Returns the name of the class implementing the FormatFactory
interface to use with this document. |
java.lang.String |
getLocaleCode()
Returns the code of the default java.util.Locale to be used for the
elements of this print object. |
java.lang.String |
getName()
|
byte |
getOrientation()
Returns the page orientation. |
JROrigin[] |
getOrigins()
Gets an array of report origins. |
java.util.List |
getOriginsList()
Gets a list of report origins. |
java.util.Map |
getOriginsMap()
Gets a map of report origins. |
int |
getPageHeight()
|
java.util.List |
getPages()
Returns a list of all pages in the filled report. |
int |
getPageWidth()
|
JRPropertiesHolder |
getParentProperties()
Returns the parent properties holder, whose properties are used as defaults for this object. |
JRPropertiesMap |
getPropertiesMap()
Returns this object's properties map. |
java.lang.String |
getProperty(java.lang.String propName)
|
java.lang.String[] |
getPropertyNames()
|
JRStyle[] |
getStyles()
Gets an array of report styles. |
java.util.List |
getStylesList()
Gets a list of report styles. |
java.util.Map |
getStylesMap()
Gets a map of report styles. |
java.lang.String |
getTimeZoneId()
Returns the ID of the default java.util.TimeZone
to be used for the elements of this print object. |
boolean |
hasProperties()
Checks whether the object has any properties. |
JRReportFont |
removeFont(JRReportFont reportFont)
Deprecated. |
JRReportFont |
removeFont(java.lang.String fontName)
Deprecated. |
JROrigin |
removeOrigin(JROrigin origin)
|
JRPrintPage |
removePage(int index)
Removes a page from the document. |
void |
removeProperty(java.lang.String propName)
|
JRStyle |
removeStyle(JRStyle style)
|
JRStyle |
removeStyle(java.lang.String styleName)
|
void |
setDefaultFont(JRReportFont font)
Sets the default report font. |
void |
setDefaultStyle(JRStyle style)
Sets the default report style. |
void |
setFormatFactoryClass(java.lang.String formatFactoryClass)
Sets the name of the class implementing the FormatFactory
interface to use with this document. |
void |
setLocaleCode(java.lang.String localeCode)
Sets the the code of the default java.util.Locale to be used for this object. |
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. |
void |
setProperty(java.lang.String propName,
java.lang.String value)
|
void |
setTimeZoneId(java.lang.String timeZoneId)
Sets the the ID of the default java.util.TimeZone
to be used for this object. |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
---|
public static final java.lang.String PROPERTIES_PRINT_TRANSFER_PREFIX
JRProperties.transferProperties(JRPropertiesHolder, JRPropertiesHolder, String)
,
Constant Field ValuesConstructor Detail |
---|
public JasperPrint()
Method Detail |
---|
public java.lang.String getName()
public void setName(java.lang.String name)
name
- name of the documentpublic int getPageWidth()
public void setPageWidth(int pageWidth)
pageWidth
- page widthpublic int getPageHeight()
public void setPageHeight(int pageHeight)
pageHeight
- page heightpublic byte getOrientation()
ORIENTATION_PORTRAIT,
,
ORIENTATION_LANDSCAPE
public void setOrientation(byte orientation)
ORIENTATION_PORTRAIT,
,
ORIENTATION_LANDSCAPE
public boolean hasProperties()
JRPropertiesHolder
hasProperties
in interface JRPropertiesHolder
public JRPropertiesMap getPropertiesMap()
JRPropertiesHolder
getPropertiesMap
in interface JRPropertiesHolder
public JRPropertiesHolder getParentProperties()
JRPropertiesHolder
getParentProperties
in interface JRPropertiesHolder
null
if no parentpublic java.lang.String[] getPropertyNames()
public java.lang.String getProperty(java.lang.String propName)
public void setProperty(java.lang.String propName, java.lang.String value)
public void removeProperty(java.lang.String propName)
public JRReportFont getDefaultFont()
public void setDefaultFont(JRReportFont font)
public JRDefaultFontProvider getDefaultFontProvider()
public JRReportFont[] getFonts()
public java.util.List getFontsList()
public java.util.Map getFontsMap()
public void addFont(JRReportFont reportFont) throws JRException
JRException
public void addFont(JRReportFont reportFont, boolean isIgnoreDuplicate) throws JRException
JRException
public JRReportFont removeFont(java.lang.String fontName)
public JRReportFont removeFont(JRReportFont reportFont)
public JRStyle getDefaultStyle()
public void setDefaultStyle(JRStyle style)
public JRDefaultStyleProvider getDefaultStyleProvider()
public JRStyle[] getStyles()
public java.util.List getStylesList()
public java.util.Map getStylesMap()
public void addStyle(JRStyle style) throws JRException
JRException
public void addStyle(JRStyle style, boolean isIgnoreDuplicate) throws JRException
JRException
public JRStyle removeStyle(java.lang.String styleName)
public JRStyle removeStyle(JRStyle style)
public JROrigin[] getOrigins()
public java.util.List getOriginsList()
public java.util.Map getOriginsMap()
public void addOrigin(JROrigin origin)
public JROrigin removeOrigin(JROrigin origin)
public java.util.List getPages()
public void addPage(JRPrintPage page)
public void addPage(int index, JRPrintPage page)
public JRPrintPage removePage(int index)
public java.util.Map getAnchorIndexes()
protected void collectAnchors(java.util.Collection elements, int pageIndex, int offsetX, int offsetY)
public java.lang.String getFormatFactoryClass()
FormatFactory
interface to use with this document.
public void setFormatFactoryClass(java.lang.String formatFactoryClass)
FormatFactory
interface to use with this document.
public java.lang.String getLocaleCode()
java.util.Locale
to be used for the
elements of this print object.
When filling a report, the value of the REPORT_LOCALE
parameter
(or the default locale if the parameter has no explicit value)
is saved using this attribute. Some elements (e.g. elements rendered by a subreport)
in the print object can override this default locale.
java.util.Locale
for this objectJRPrintText.getLocaleCode()
public void setLocaleCode(java.lang.String localeCode)
java.util.Locale
to be used for this object.
localeCode
- the locale code, using the java.util.Locale.toString()
convention.getLocaleCode()
,
Locale.toString()
public java.lang.String getTimeZoneId()
ID
of the default java.util.TimeZone
to be used for the elements of this print object.
When filling a report, the value of the REPORT_TIME_ZONE
parameter
(or the default time zine if the parameter has no explicit value)
is saved using this attribute. Some elements (e.g. elements rendered by a subreport)
in the print object can override this default time zone.
java.util.TimeZone
for this objectJRPrintText.getTimeZoneId()
public void setTimeZoneId(java.lang.String timeZoneId)
ID
of the default java.util.TimeZone
to be used for this object.
timeZoneId
- the time zone IDgetTimeZoneId()
,
TimeZone.getID()
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |