public class ReadOnlyPartJasperPrint extends JasperPrint
PROPERTIES_PRINT_TRANSFER_PREFIX, PROPERTY_COLLAPSE_MISSING_BOOKMARK_LEVELS, PROPERTY_CREATE_BOOKMARKS
Constructor and Description |
---|
ReadOnlyPartJasperPrint(JasperPrint jasperPrint,
PrintPart part,
int startPageIndex,
int endPageIndex) |
Modifier and Type | Method and Description |
---|---|
void |
addBookmark(PrintBookmark bookmark)
Adds a new page to the document.
|
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 |
addPart(int pageIndex,
PrintPart part)
Adds a new part 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.
|
Map<String,JRPrintAnchorIndex> |
getAnchorIndexes() |
List<PrintBookmark> |
getBookmarks() |
Integer |
getBottomMargin() |
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.
|
String |
getFormatFactoryClass()
Returns the name of the class implementing the
FormatFactory
interface to use with this document. |
Integer |
getLeftMargin() |
String |
getLocaleCode()
Returns the code of the default
java.util.Locale to be used for the
elements of this print object. |
String |
getName() |
OrientationEnum |
getOrientationValue()
Returns the page orientation.
|
JROrigin[] |
getOrigins()
Gets an array of report origins.
|
List<JROrigin> |
getOriginsList()
Gets a list of report origins.
|
Map<JROrigin,Integer> |
getOriginsMap()
Gets a map of report origins.
|
int |
getPageHeight() |
List<JRPrintPage> |
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.
|
PrintParts |
getParts()
Returns a list of all parts in the filled report.
|
JRPropertiesMap |
getPropertiesMap()
Returns this object's properties map.
|
String |
getProperty(String propName) |
String[] |
getPropertyNames() |
Integer |
getRightMargin() |
JRStyle[] |
getStyles()
Gets an array of report styles.
|
List<JRStyle> |
getStylesList()
Gets a list of report styles.
|
Map<String,JRStyle> |
getStylesMap()
Gets a map of report styles.
|
String |
getTimeZoneId()
Returns the
ID of the default java.util.TimeZone
to be used for the elements of this print object. |
Integer |
getTopMargin() |
boolean |
hasProperties()
Checks whether the object has any properties.
|
JROrigin |
removeOrigin(JROrigin origin) |
JRPrintPage |
removePage(int index)
Removes a page from the document.
|
PrintPart |
removePart(int pageIndex)
Removes a part from the document.
|
void |
removeProperty(String propName) |
JRStyle |
removeStyle(JRStyle style) |
JRStyle |
removeStyle(String styleName) |
void |
setBookmarks(List<PrintBookmark> bookmarks) |
void |
setBottomMargin(Integer bottomMargin)
Sets the bottom page margin.
|
void |
setDefaultStyle(JRStyle style)
Sets the default report style.
|
void |
setFormatFactoryClass(String formatFactoryClass)
Sets the name of the class implementing the
FormatFactory
interface to use with this document. |
void |
setLeftMargin(Integer leftMargin)
Sets the left page margin.
|
void |
setLocaleCode(String localeCode)
Sets the the code of the default
java.util.Locale to be used for this object. |
void |
setName(String name)
Sets the name of the document.
|
void |
setOrientation(OrientationEnum orientationValue)
Sets the page orientation.
|
void |
setPageHeight(int pageHeight)
Sets the page height.
|
void |
setPageWidth(int pageWidth)
Sets the page width.
|
void |
setProperty(String propName,
String value) |
void |
setRightMargin(Integer rightMargin)
Sets the right page margin.
|
void |
setTimeZoneId(String timeZoneId)
Sets the the
ID of the default java.util.TimeZone
to be used for this object. |
void |
setTopMargin(Integer topMargin)
Sets the top page margin.
|
collectAnchors, getPageFormat, hasParts
public ReadOnlyPartJasperPrint(JasperPrint jasperPrint, PrintPart part, int startPageIndex, int endPageIndex)
public String getName()
getName
in class JasperPrint
public void setName(String name)
JasperPrint
setName
in class JasperPrint
name
- name of the documentpublic int getPageWidth()
getPageWidth
in class JasperPrint
public void setPageWidth(int pageWidth)
JasperPrint
setPageWidth
in class JasperPrint
pageWidth
- page widthpublic int getPageHeight()
getPageHeight
in class JasperPrint
public void setPageHeight(int pageHeight)
JasperPrint
setPageHeight
in class JasperPrint
pageHeight
- page heightpublic Integer getTopMargin()
getTopMargin
in class JasperPrint
public void setTopMargin(Integer topMargin)
JasperPrint
setTopMargin
in class JasperPrint
topMargin
- top page marginpublic Integer getLeftMargin()
getLeftMargin
in class JasperPrint
public void setLeftMargin(Integer leftMargin)
JasperPrint
setLeftMargin
in class JasperPrint
leftMargin
- left page marginpublic Integer getBottomMargin()
getBottomMargin
in class JasperPrint
public void setBottomMargin(Integer bottomMargin)
JasperPrint
setBottomMargin
in class JasperPrint
bottomMargin
- bottom page marginpublic Integer getRightMargin()
getRightMargin
in class JasperPrint
public void setRightMargin(Integer rightMargin)
JasperPrint
setRightMargin
in class JasperPrint
rightMargin
- right page marginpublic OrientationEnum getOrientationValue()
JasperPrint
getOrientationValue
in class JasperPrint
PORTRAIT,
,
LANDSCAPE
public void setOrientation(OrientationEnum orientationValue)
JasperPrint
setOrientation
in class JasperPrint
PORTRAIT,
,
LANDSCAPE
public boolean hasProperties()
JRPropertiesHolder
hasProperties
in interface JRPropertiesHolder
hasProperties
in class JasperPrint
public JRPropertiesMap getPropertiesMap()
JRPropertiesHolder
getPropertiesMap
in interface JRPropertiesHolder
getPropertiesMap
in class JasperPrint
public JRPropertiesHolder getParentProperties()
JRPropertiesHolder
getParentProperties
in interface JRPropertiesHolder
getParentProperties
in class JasperPrint
null
if no parentpublic String[] getPropertyNames()
getPropertyNames
in class JasperPrint
public String getProperty(String propName)
getProperty
in class JasperPrint
public void setProperty(String propName, String value)
setProperty
in class JasperPrint
public void removeProperty(String propName)
removeProperty
in class JasperPrint
public JRStyle getDefaultStyle()
JasperPrint
getDefaultStyle
in class JasperPrint
public void setDefaultStyle(JRStyle style)
JasperPrint
setDefaultStyle
in class JasperPrint
public JRDefaultStyleProvider getDefaultStyleProvider()
JasperPrint
getDefaultStyleProvider
in class JasperPrint
public JRStyle[] getStyles()
JasperPrint
getStyles
in class JasperPrint
public List<JRStyle> getStylesList()
JasperPrint
getStylesList
in class JasperPrint
public Map<String,JRStyle> getStylesMap()
JasperPrint
getStylesMap
in class JasperPrint
public void addStyle(JRStyle style) throws JRException
JasperPrint
addStyle
in class JasperPrint
JRException
public void addStyle(JRStyle style, boolean isIgnoreDuplicate) throws JRException
JasperPrint
addStyle
in class JasperPrint
JRException
public JRStyle removeStyle(String styleName)
removeStyle
in class JasperPrint
public JRStyle removeStyle(JRStyle style)
removeStyle
in class JasperPrint
public JROrigin[] getOrigins()
JasperPrint
getOrigins
in class JasperPrint
public List<JROrigin> getOriginsList()
JasperPrint
getOriginsList
in class JasperPrint
public Map<JROrigin,Integer> getOriginsMap()
JasperPrint
getOriginsMap
in class JasperPrint
public void addOrigin(JROrigin origin)
JasperPrint
addOrigin
in class JasperPrint
public JROrigin removeOrigin(JROrigin origin)
removeOrigin
in class JasperPrint
public PrintParts getParts()
JasperPrint
getParts
in class JasperPrint
public void addPart(int pageIndex, PrintPart part)
JasperPrint
addPart
in class JasperPrint
public PrintPart removePart(int pageIndex)
JasperPrint
removePart
in class JasperPrint
public List<JRPrintPage> getPages()
JasperPrint
getPages
in class JasperPrint
public void addPage(JRPrintPage page)
JasperPrint
addPage
in class JasperPrint
public void addPage(int index, JRPrintPage page)
JasperPrint
addPage
in class JasperPrint
public JRPrintPage removePage(int index)
JasperPrint
removePage
in class JasperPrint
public List<PrintBookmark> getBookmarks()
getBookmarks
in class JasperPrint
public void addBookmark(PrintBookmark bookmark)
JasperPrint
addBookmark
in class JasperPrint
public void setBookmarks(List<PrintBookmark> bookmarks)
setBookmarks
in class JasperPrint
public Map<String,JRPrintAnchorIndex> getAnchorIndexes()
getAnchorIndexes
in class JasperPrint
public String getFormatFactoryClass()
JasperPrint
FormatFactory
interface to use with this document.getFormatFactoryClass
in class JasperPrint
public void setFormatFactoryClass(String formatFactoryClass)
JasperPrint
FormatFactory
interface to use with this document.setFormatFactoryClass
in class JasperPrint
public String getLocaleCode()
JasperPrint
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.
getLocaleCode
in class JasperPrint
java.util.Locale
for this objectJRPrintText.getLocaleCode()
public void setLocaleCode(String localeCode)
JasperPrint
java.util.Locale
to be used for this object.setLocaleCode
in class JasperPrint
localeCode
- the locale code, using the java.util.Locale.toString()
convention.JasperPrint.getLocaleCode()
,
Locale.toString()
public String getTimeZoneId()
JasperPrint
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.
getTimeZoneId
in class JasperPrint
java.util.TimeZone
for this objectJRPrintText.getTimeZoneId()
public void setTimeZoneId(String timeZoneId)
JasperPrint
ID
of the default java.util.TimeZone
to be used for this object.setTimeZoneId
in class JasperPrint
timeZoneId
- the time zone IDJasperPrint.getTimeZoneId()
,
TimeZone.getID()
Copyright © 2015. All rights reserved.