Class JRVirtualPrintPage
- java.lang.Object
-
- net.sf.jasperreports.engine.base.JRVirtualPrintPage
-
- All Implemented Interfaces:
Serializable
,JRPrintElementListContainer
,JRPrintPage
public class JRVirtualPrintPage extends Object implements JRPrintPage, Serializable
A print page that can be virtualized to free heap memory.- Author:
- John Bindel
- See Also:
- Serialized Form
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description static class
JRVirtualPrintPage.JRIdHolderRenderer
Dummy image renderer that only stores the ID of a cached renderer.static class
JRVirtualPrintPage.JRIdHolderTemplateElement
-
Field Summary
Fields Modifier and Type Field Description protected VirtualizableElementList
elements
protected static org.apache.commons.logging.Log
log
static String
PROPERTY_VIRTUAL_PAGE_ELEMENT_SIZE
Property that determines how many print elements will make up a virtual page handled as a unit by the virtualizer.
-
Constructor Summary
Constructors Modifier Constructor Description protected
JRVirtualPrintPage()
JRVirtualPrintPage(JRVirtualizationContext virtualizationContext)
Constructs a virtualizable page.JRVirtualPrintPage(JasperPrint printObject, JRVirtualizationContext virtualizationContext)
Deprecated.replaced byJRVirtualPrintPage(JRVirtualizationContext)
JRVirtualPrintPage(JasperPrint printObject, JRVirtualizer virtualizer, JRVirtualizationContext virtualizationContext)
Deprecated.the virtualizer should be passed as part of the virtualization context, useJRVirtualPrintPage(JasperPrint, JRVirtualizationContext)
instead
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description void
addElement(JRPrintElement element)
Adds an element to the container.void
dispose()
Disposes this page's data.List<JRPrintElement>
getElements()
Returns the list ofelements
of the container.JRVirtualizationContext
getVirtualizationContext()
void
setElements(List<JRPrintElement> elements)
-
-
-
Field Detail
-
log
protected static final org.apache.commons.logging.Log log
-
PROPERTY_VIRTUAL_PAGE_ELEMENT_SIZE
public static final String PROPERTY_VIRTUAL_PAGE_ELEMENT_SIZE
Property that determines how many print elements will make up a virtual page handled as a unit by the virtualizer.For most paginated reports, a virtual page corresponds to a report page. But for non-paginated reports and for reports having very large pages, a report page is broken into several virtual pages which are handled individually by the virtualizer.
This property provides the size of a virtual page in print elements. Note that virtual page sizes will actually vary around the configured size since there are cases when fewer elements remain on a report page and cases when the configured size is exceeded due to print frames being included at the end of virtual page.
If set to 0 or negative, report pages will not be broken into several virtual pages.
The property can be set at report and global levels or sent as a parameter value (as an integer, using the property name as parameter name). The default value is 2000.
- See Also:
- Constant Field Values
-
elements
protected VirtualizableElementList elements
-
-
Constructor Detail
-
JRVirtualPrintPage
public JRVirtualPrintPage(JasperPrint printObject, JRVirtualizer virtualizer, JRVirtualizationContext virtualizationContext)
Deprecated.the virtualizer should be passed as part of the virtualization context, useJRVirtualPrintPage(JasperPrint, JRVirtualizationContext)
insteadConstructs a virtualizable page.
-
JRVirtualPrintPage
@Deprecated public JRVirtualPrintPage(JasperPrint printObject, JRVirtualizationContext virtualizationContext)
Deprecated.replaced byJRVirtualPrintPage(JRVirtualizationContext)
Constructs a virtualizable page.- Parameters:
printObject
-virtualizationContext
-
-
JRVirtualPrintPage
public JRVirtualPrintPage(JRVirtualizationContext virtualizationContext)
Constructs a virtualizable page.
-
JRVirtualPrintPage
protected JRVirtualPrintPage()
-
-
Method Detail
-
getElements
public List<JRPrintElement> getElements()
Description copied from interface:JRPrintElementListContainer
Returns the list ofelements
of the container.- Specified by:
getElements
in interfaceJRPrintElementListContainer
- Returns:
- the list of elements
-
setElements
public void setElements(List<JRPrintElement> elements)
- Specified by:
setElements
in interfaceJRPrintPage
-
addElement
public void addElement(JRPrintElement element)
Description copied from interface:JRPrintElementListContainer
Adds an element to the container.- Specified by:
addElement
in interfaceJRPrintElementListContainer
- Parameters:
element
- the element to add
-
dispose
public void dispose()
Disposes this page's data.
-
getVirtualizationContext
public JRVirtualizationContext getVirtualizationContext()
-
-