Package net.sf.jasperreports.export
Class ReadOnlyPartJasperPrint
java.lang.Object
net.sf.jasperreports.engine.JasperPrint
net.sf.jasperreports.export.ReadOnlyPartJasperPrint
- All Implemented Interfaces:
Serializable
,JRChangeEventsSupport
,JRPropertiesHolder
- Author:
- Teodor Danciu (teodord@users.sourceforge.net)
- See Also:
-
Field Summary
Fields inherited from class net.sf.jasperreports.engine.JasperPrint
EXCEPTION_MESSAGE_KEY_DUPLICATE_STYLE, PROPERTIES_PRINT_TRANSFER_PREFIX, PROPERTY_BOOKMARKS, PROPERTY_BOTTOM_MARGIN, PROPERTY_COLLAPSE_MISSING_BOOKMARK_LEVELS, PROPERTY_CREATE_BOOKMARKS, PROPERTY_FORMAT_FACTORY_CLASS, PROPERTY_LEFT_MARGIN, PROPERTY_LOCALE_CODE, PROPERTY_NAME, PROPERTY_ORIENTATION, PROPERTY_ORIGINS, PROPERTY_PAGE_HEIGHT, PROPERTY_PAGE_WIDTH, PROPERTY_PAGES, PROPERTY_PARTS, PROPERTY_RIGHT_MARGIN, PROPERTY_STYLES, PROPERTY_TIME_ZONE_ID, PROPERTY_TOP_MARGIN
-
Constructor Summary
ConstructorsConstructorDescriptionReadOnlyPartJasperPrint
(JasperPrint jasperPrint, PrintPart part, int startPageIndex, int endPageIndex) -
Method Summary
Modifier and TypeMethodDescriptionvoid
addBookmark
(PrintBookmark bookmark) Adds a new page to the document.void
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
Adds a new part to the document.void
Adds a new style to the report styles.void
Adds a new style to the report styles.Returns the default report style.When we want to virtualize pages, we want a style provider that is not the print object itself.Returns the name of the class implementing theFormatFactory
interface to use with this document.Returns the code of the defaultjava.util.Locale
to be used for the elements of this print object.getName()
Returns the page orientation.JROrigin[]
Gets an array of report origins.Gets a list of report origins.Gets a map of report origins.int
getPages()
Returns a list of all pages in the filled report.int
Returns the parent properties holder, whose properties are used as defaults for this object.getParts()
Returns a list of all parts in the filled report.Returns this object's properties map.getProperty
(String propName) String[]
JRStyle[]
Gets an array of report styles.Gets a list of report styles.Gets a map of report styles.Returns theID
of the defaultjava.util.TimeZone
to be used for the elements of this print object.boolean
Checks whether the object has any properties.removeOrigin
(JROrigin origin) removePage
(int index) Removes a page from the document.removePart
(int pageIndex) Removes a part from the document.void
removeProperty
(String propName) removeStyle
(String styleName) removeStyle
(JRStyle style) 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 theFormatFactory
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 defaultjava.util.Locale
to be used for this object.void
Sets the name of the document.void
setOrientation
(OrientationEnum orientation) 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 theID
of the defaultjava.util.TimeZone
to be used for this object.void
setTopMargin
(Integer topMargin) Sets the top page margin.Methods inherited from class net.sf.jasperreports.engine.JasperPrint
collectAnchors, copyFrom, getEventSupport, getPageFormat, getPageFormat, hasEventSupport, hasParts, setJasperReportsContext
-
Constructor Details
-
ReadOnlyPartJasperPrint
public ReadOnlyPartJasperPrint(JasperPrint jasperPrint, PrintPart part, int startPageIndex, int endPageIndex)
-
-
Method Details
-
getName
- Overrides:
getName
in classJasperPrint
- Returns:
- Returns the name of the document
-
setName
Description copied from class:JasperPrint
Sets the name of the document.- Overrides:
setName
in classJasperPrint
- Parameters:
name
- name of the document
-
getPageWidth
public int getPageWidth()- Overrides:
getPageWidth
in classJasperPrint
- Returns:
- Returns the page width
-
setPageWidth
public void setPageWidth(int pageWidth) Description copied from class:JasperPrint
Sets the page width.- Overrides:
setPageWidth
in classJasperPrint
- Parameters:
pageWidth
- page width
-
getPageHeight
public int getPageHeight()- Overrides:
getPageHeight
in classJasperPrint
- Returns:
- Returns the page height.
-
setPageHeight
public void setPageHeight(int pageHeight) Description copied from class:JasperPrint
Sets the page height.- Overrides:
setPageHeight
in classJasperPrint
- Parameters:
pageHeight
- page height
-
getTopMargin
- Overrides:
getTopMargin
in classJasperPrint
- Returns:
- Returns the top page margin
-
setTopMargin
Description copied from class:JasperPrint
Sets the top page margin.- Overrides:
setTopMargin
in classJasperPrint
- Parameters:
topMargin
- top page margin
-
getLeftMargin
- Overrides:
getLeftMargin
in classJasperPrint
- Returns:
- Returns the left page margin
-
setLeftMargin
Description copied from class:JasperPrint
Sets the left page margin.- Overrides:
setLeftMargin
in classJasperPrint
- Parameters:
leftMargin
- left page margin
-
getBottomMargin
- Overrides:
getBottomMargin
in classJasperPrint
- Returns:
- Returns the bottom page margin
-
setBottomMargin
Description copied from class:JasperPrint
Sets the bottom page margin.- Overrides:
setBottomMargin
in classJasperPrint
- Parameters:
bottomMargin
- bottom page margin
-
getRightMargin
- Overrides:
getRightMargin
in classJasperPrint
- Returns:
- Returns the right page margin
-
setRightMargin
Description copied from class:JasperPrint
Sets the right page margin.- Overrides:
setRightMargin
in classJasperPrint
- Parameters:
rightMargin
- right page margin
-
getOrientation
Description copied from class:JasperPrint
Returns the page orientation.- Overrides:
getOrientation
in classJasperPrint
- See Also:
-
setOrientation
Description copied from class:JasperPrint
Sets the page orientation.- Overrides:
setOrientation
in classJasperPrint
- See Also:
-
hasProperties
public boolean hasProperties()Description copied from interface:JRPropertiesHolder
Checks whether the object has any properties.- Specified by:
hasProperties
in interfaceJRPropertiesHolder
- Overrides:
hasProperties
in classJasperPrint
- Returns:
- whether the object has any properties
-
getPropertiesMap
Description copied from interface:JRPropertiesHolder
Returns this object's properties map.- Specified by:
getPropertiesMap
in interfaceJRPropertiesHolder
- Overrides:
getPropertiesMap
in classJasperPrint
- Returns:
- this object's properties map
-
getParentProperties
Description copied from interface:JRPropertiesHolder
Returns the parent properties holder, whose properties are used as defaults for this object.- Specified by:
getParentProperties
in interfaceJRPropertiesHolder
- Overrides:
getParentProperties
in classJasperPrint
- Returns:
- the parent properties holder, or
null
if no parent
-
getPropertyNames
- Overrides:
getPropertyNames
in classJasperPrint
-
getProperty
- Overrides:
getProperty
in classJasperPrint
-
setProperty
- Overrides:
setProperty
in classJasperPrint
-
removeProperty
- Overrides:
removeProperty
in classJasperPrint
-
getDefaultStyle
Description copied from class:JasperPrint
Returns the default report style.- Overrides:
getDefaultStyle
in classJasperPrint
-
setDefaultStyle
Description copied from class:JasperPrint
Sets the default report style.- Overrides:
setDefaultStyle
in classJasperPrint
-
getDefaultStyleProvider
Description copied from class:JasperPrint
When we want to virtualize pages, we want a style provider that is not the print object itself.- Overrides:
getDefaultStyleProvider
in classJasperPrint
-
getStyles
Description copied from class:JasperPrint
Gets an array of report styles.- Overrides:
getStyles
in classJasperPrint
-
getStylesList
Description copied from class:JasperPrint
Gets a list of report styles.- Overrides:
getStylesList
in classJasperPrint
-
getStylesMap
Description copied from class:JasperPrint
Gets a map of report styles.- Overrides:
getStylesMap
in classJasperPrint
-
addStyle
Description copied from class:JasperPrint
Adds a new style to the report styles.- Overrides:
addStyle
in classJasperPrint
- Throws:
JRException
-
addStyle
Description copied from class:JasperPrint
Adds a new style to the report styles.- Overrides:
addStyle
in classJasperPrint
- Throws:
JRException
-
removeStyle
- Overrides:
removeStyle
in classJasperPrint
-
removeStyle
- Overrides:
removeStyle
in classJasperPrint
-
getOrigins
Description copied from class:JasperPrint
Gets an array of report origins.- Overrides:
getOrigins
in classJasperPrint
-
getOriginsList
Description copied from class:JasperPrint
Gets a list of report origins.- Overrides:
getOriginsList
in classJasperPrint
-
getOriginsMap
Description copied from class:JasperPrint
Gets a map of report origins.- Overrides:
getOriginsMap
in classJasperPrint
-
addOrigin
Description copied from class:JasperPrint
Adds a new style to the report origins.- Overrides:
addOrigin
in classJasperPrint
-
removeOrigin
- Overrides:
removeOrigin
in classJasperPrint
-
getParts
Description copied from class:JasperPrint
Returns a list of all parts in the filled report.- Overrides:
getParts
in classJasperPrint
-
addPart
Description copied from class:JasperPrint
Adds a new part to the document.- Overrides:
addPart
in classJasperPrint
-
removePart
Description copied from class:JasperPrint
Removes a part from the document.- Overrides:
removePart
in classJasperPrint
-
getPages
Description copied from class:JasperPrint
Returns a list of all pages in the filled report.- Overrides:
getPages
in classJasperPrint
-
addPage
Description copied from class:JasperPrint
Adds a new page to the document.- Overrides:
addPage
in classJasperPrint
-
addPage
Description copied from class:JasperPrint
Adds a new page to the document, placing it at the specified index.- Overrides:
addPage
in classJasperPrint
-
removePage
Description copied from class:JasperPrint
Removes a page from the document.- Overrides:
removePage
in classJasperPrint
-
getBookmarks
- Overrides:
getBookmarks
in classJasperPrint
-
addBookmark
Description copied from class:JasperPrint
Adds a new page to the document.- Overrides:
addBookmark
in classJasperPrint
-
setBookmarks
- Overrides:
setBookmarks
in classJasperPrint
-
getAnchorIndexes
- Overrides:
getAnchorIndexes
in classJasperPrint
-
getFormatFactoryClass
Description copied from class:JasperPrint
Returns the name of the class implementing theFormatFactory
interface to use with this document.- Overrides:
getFormatFactoryClass
in classJasperPrint
-
setFormatFactoryClass
Description copied from class:JasperPrint
Sets the name of the class implementing theFormatFactory
interface to use with this document.- Overrides:
setFormatFactoryClass
in classJasperPrint
-
getLocaleCode
Description copied from class:JasperPrint
Returns the code of the defaultjava.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.- Overrides:
getLocaleCode
in classJasperPrint
- Returns:
- the code of the default
java.util.Locale
for this object - See Also:
-
setLocaleCode
Description copied from class:JasperPrint
Sets the the code of the defaultjava.util.Locale
to be used for this object.- Overrides:
setLocaleCode
in classJasperPrint
- Parameters:
localeCode
- the locale code, using thejava.util.Locale.toString()
convention.- See Also:
-
getTimeZoneId
Description copied from class:JasperPrint
Returns theID
of the defaultjava.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.- Overrides:
getTimeZoneId
in classJasperPrint
- Returns:
- the ID of the default
java.util.TimeZone
for this object - See Also:
-
setTimeZoneId
Description copied from class:JasperPrint
Sets the theID
of the defaultjava.util.TimeZone
to be used for this object.- Overrides:
setTimeZoneId
in classJasperPrint
- Parameters:
timeZoneId
- the time zone ID- See Also:
-