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 TypeMethodDescriptionvoidaddBookmark(PrintBookmark bookmark) Adds a new page to the document.voidAdds a new style to the report origins.voidaddPage(int index, JRPrintPage page) Adds a new page to the document, placing it at the specified index.voidaddPage(JRPrintPage page) Adds a new page to the document.voidAdds a new part to the document.voidAdds a new style to the report styles.voidAdds 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 theFormatFactoryinterface to use with this document.Returns the code of the defaultjava.util.Localeto 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.intgetPages()Returns a list of all pages in the filled report.intReturns 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 theIDof the defaultjava.util.TimeZoneto be used for the elements of this print object.booleanChecks 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.voidremoveProperty(String propName) removeStyle(String styleName) removeStyle(JRStyle style) voidsetBookmarks(List<PrintBookmark> bookmarks) voidsetBottomMargin(Integer bottomMargin) Sets the bottom page margin.voidsetDefaultStyle(JRStyle style) Sets the default report style.voidsetFormatFactoryClass(String formatFactoryClass) Sets the name of the class implementing theFormatFactoryinterface to use with this document.voidsetLeftMargin(Integer leftMargin) Sets the left page margin.voidsetLocaleCode(String localeCode) Sets the the code of the defaultjava.util.Localeto be used for this object.voidSets the name of the document.voidsetOrientation(OrientationEnum orientation) Sets the page orientation.voidsetPageHeight(int pageHeight) Sets the page height.voidsetPageWidth(int pageWidth) Sets the page width.voidsetProperty(String propName, String value) voidsetRightMargin(Integer rightMargin) Sets the right page margin.voidsetTimeZoneId(String timeZoneId) Sets the theIDof the defaultjava.util.TimeZoneto be used for this object.voidsetTopMargin(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:
getNamein classJasperPrint- Returns:
- Returns the name of the document
-
setName
Description copied from class:JasperPrintSets the name of the document.- Overrides:
setNamein classJasperPrint- Parameters:
name- name of the document
-
getPageWidth
public int getPageWidth()- Overrides:
getPageWidthin classJasperPrint- Returns:
- Returns the page width
-
setPageWidth
public void setPageWidth(int pageWidth) Description copied from class:JasperPrintSets the page width.- Overrides:
setPageWidthin classJasperPrint- Parameters:
pageWidth- page width
-
getPageHeight
public int getPageHeight()- Overrides:
getPageHeightin classJasperPrint- Returns:
- Returns the page height.
-
setPageHeight
public void setPageHeight(int pageHeight) Description copied from class:JasperPrintSets the page height.- Overrides:
setPageHeightin classJasperPrint- Parameters:
pageHeight- page height
-
getTopMargin
- Overrides:
getTopMarginin classJasperPrint- Returns:
- Returns the top page margin
-
setTopMargin
Description copied from class:JasperPrintSets the top page margin.- Overrides:
setTopMarginin classJasperPrint- Parameters:
topMargin- top page margin
-
getLeftMargin
- Overrides:
getLeftMarginin classJasperPrint- Returns:
- Returns the left page margin
-
setLeftMargin
Description copied from class:JasperPrintSets the left page margin.- Overrides:
setLeftMarginin classJasperPrint- Parameters:
leftMargin- left page margin
-
getBottomMargin
- Overrides:
getBottomMarginin classJasperPrint- Returns:
- Returns the bottom page margin
-
setBottomMargin
Description copied from class:JasperPrintSets the bottom page margin.- Overrides:
setBottomMarginin classJasperPrint- Parameters:
bottomMargin- bottom page margin
-
getRightMargin
- Overrides:
getRightMarginin classJasperPrint- Returns:
- Returns the right page margin
-
setRightMargin
Description copied from class:JasperPrintSets the right page margin.- Overrides:
setRightMarginin classJasperPrint- Parameters:
rightMargin- right page margin
-
getOrientation
Description copied from class:JasperPrintReturns the page orientation.- Overrides:
getOrientationin classJasperPrint- See Also:
-
setOrientation
Description copied from class:JasperPrintSets the page orientation.- Overrides:
setOrientationin classJasperPrint- See Also:
-
hasProperties
public boolean hasProperties()Description copied from interface:JRPropertiesHolderChecks whether the object has any properties.- Specified by:
hasPropertiesin interfaceJRPropertiesHolder- Overrides:
hasPropertiesin classJasperPrint- Returns:
- whether the object has any properties
-
getPropertiesMap
Description copied from interface:JRPropertiesHolderReturns this object's properties map.- Specified by:
getPropertiesMapin interfaceJRPropertiesHolder- Overrides:
getPropertiesMapin classJasperPrint- Returns:
- this object's properties map
-
getParentProperties
Description copied from interface:JRPropertiesHolderReturns the parent properties holder, whose properties are used as defaults for this object.- Specified by:
getParentPropertiesin interfaceJRPropertiesHolder- Overrides:
getParentPropertiesin classJasperPrint- Returns:
- the parent properties holder, or
nullif no parent
-
getPropertyNames
- Overrides:
getPropertyNamesin classJasperPrint
-
getProperty
- Overrides:
getPropertyin classJasperPrint
-
setProperty
- Overrides:
setPropertyin classJasperPrint
-
removeProperty
- Overrides:
removePropertyin classJasperPrint
-
getDefaultStyle
Description copied from class:JasperPrintReturns the default report style.- Overrides:
getDefaultStylein classJasperPrint
-
setDefaultStyle
Description copied from class:JasperPrintSets the default report style.- Overrides:
setDefaultStylein classJasperPrint
-
getDefaultStyleProvider
Description copied from class:JasperPrintWhen we want to virtualize pages, we want a style provider that is not the print object itself.- Overrides:
getDefaultStyleProviderin classJasperPrint
-
getStyles
Description copied from class:JasperPrintGets an array of report styles.- Overrides:
getStylesin classJasperPrint
-
getStylesList
Description copied from class:JasperPrintGets a list of report styles.- Overrides:
getStylesListin classJasperPrint
-
getStylesMap
Description copied from class:JasperPrintGets a map of report styles.- Overrides:
getStylesMapin classJasperPrint
-
addStyle
Description copied from class:JasperPrintAdds a new style to the report styles.- Overrides:
addStylein classJasperPrint- Throws:
JRException
-
addStyle
Description copied from class:JasperPrintAdds a new style to the report styles.- Overrides:
addStylein classJasperPrint- Throws:
JRException
-
removeStyle
- Overrides:
removeStylein classJasperPrint
-
removeStyle
- Overrides:
removeStylein classJasperPrint
-
getOrigins
Description copied from class:JasperPrintGets an array of report origins.- Overrides:
getOriginsin classJasperPrint
-
getOriginsList
Description copied from class:JasperPrintGets a list of report origins.- Overrides:
getOriginsListin classJasperPrint
-
getOriginsMap
Description copied from class:JasperPrintGets a map of report origins.- Overrides:
getOriginsMapin classJasperPrint
-
addOrigin
Description copied from class:JasperPrintAdds a new style to the report origins.- Overrides:
addOriginin classJasperPrint
-
removeOrigin
- Overrides:
removeOriginin classJasperPrint
-
getParts
Description copied from class:JasperPrintReturns a list of all parts in the filled report.- Overrides:
getPartsin classJasperPrint
-
addPart
Description copied from class:JasperPrintAdds a new part to the document.- Overrides:
addPartin classJasperPrint
-
removePart
Description copied from class:JasperPrintRemoves a part from the document.- Overrides:
removePartin classJasperPrint
-
getPages
Description copied from class:JasperPrintReturns a list of all pages in the filled report.- Overrides:
getPagesin classJasperPrint
-
addPage
Description copied from class:JasperPrintAdds a new page to the document.- Overrides:
addPagein classJasperPrint
-
addPage
Description copied from class:JasperPrintAdds a new page to the document, placing it at the specified index.- Overrides:
addPagein classJasperPrint
-
removePage
Description copied from class:JasperPrintRemoves a page from the document.- Overrides:
removePagein classJasperPrint
-
getBookmarks
- Overrides:
getBookmarksin classJasperPrint
-
addBookmark
Description copied from class:JasperPrintAdds a new page to the document.- Overrides:
addBookmarkin classJasperPrint
-
setBookmarks
- Overrides:
setBookmarksin classJasperPrint
-
getAnchorIndexes
- Overrides:
getAnchorIndexesin classJasperPrint
-
getFormatFactoryClass
Description copied from class:JasperPrintReturns the name of the class implementing theFormatFactoryinterface to use with this document.- Overrides:
getFormatFactoryClassin classJasperPrint
-
setFormatFactoryClass
Description copied from class:JasperPrintSets the name of the class implementing theFormatFactoryinterface to use with this document.- Overrides:
setFormatFactoryClassin classJasperPrint
-
getLocaleCode
Description copied from class:JasperPrintReturns the code of the defaultjava.util.Localeto be used for the elements of this print object.When filling a report, the value of the
REPORT_LOCALEparameter (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:
getLocaleCodein classJasperPrint- Returns:
- the code of the default
java.util.Localefor this object - See Also:
-
setLocaleCode
Description copied from class:JasperPrintSets the the code of the defaultjava.util.Localeto be used for this object.- Overrides:
setLocaleCodein classJasperPrint- Parameters:
localeCode- the locale code, using thejava.util.Locale.toString()convention.- See Also:
-
getTimeZoneId
Description copied from class:JasperPrintReturns theIDof the defaultjava.util.TimeZoneto be used for the elements of this print object.When filling a report, the value of the
REPORT_TIME_ZONEparameter (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:
getTimeZoneIdin classJasperPrint- Returns:
- the ID of the default
java.util.TimeZonefor this object - See Also:
-
setTimeZoneId
Description copied from class:JasperPrintSets the theIDof the defaultjava.util.TimeZoneto be used for this object.- Overrides:
setTimeZoneIdin classJasperPrint- Parameters:
timeZoneId- the time zone ID- See Also:
-