Package net.sf.jasperreports.engine.base
Class ElementsBlock
- java.lang.Object
-
- net.sf.jasperreports.engine.base.ElementsBlock
-
- All Implemented Interfaces:
Serializable
,ElementStore
,VirtualizablePageElements
,JRVirtualizable<VirtualElementsData>
public class ElementsBlock extends Object implements JRVirtualizable<VirtualElementsData>, ElementStore, Serializable
- Author:
- Lucian Chirita (lucianc@users.sourceforge.net)
- See Also:
- Serialized Form
-
-
Constructor Summary
Constructors Constructor Description ElementsBlock(JRVirtualizationContext context, JRVirtualPrintPage page)
ElementsBlock(JRVirtualizationContext context, JRVirtualPrintPage page, String uid, int size)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description boolean
add(int index, JRPrintElement element)
boolean
add(int index, JRPrintElement element, boolean force)
boolean
add(JRPrintElement element)
boolean
add(JRPrintElement element, boolean force)
void
afterExternalization()
Called by the virtualizer after the object's data is externalized, but before the virtual data isremoved
.void
afterInternalization()
Called by the virtualizer after the object's data was made available to the object.void
beforeExternalization()
Called by the virtualizer before the object's data is externalized.int
deepSize()
void
dispose()
void
ensureVirtualData()
Ensure that the virtual data is set to the object.JRPrintElement
get(int index)
JRVirtualizationContext
getContext()
Returns the virtualization context this object belongs to.JRVirtualPrintPage
getPage()
String
getUID()
Used by the virtualizer to identify the data for this object.VirtualElementsData
getVirtualData()
Used by the virtualizer to get data.boolean
isEmpty()
protected boolean
preAdd(JRPrintElement element, boolean force)
JRPrintElement
remove(int index)
void
removeVirtualData()
Used by the virtualizer to remove the data from the object in memory so that it may be garbage collected.JRPrintElement
set(int index, JRPrintElement element)
void
setVirtualData(VirtualElementsData virtualData)
Used by the virtualizer to set data.int
size()
void
transferElements(Consumer<JRPrintElement> consumer)
void
updateContext(JRVirtualizationContext context, JRVirtualPrintPage page)
void
updatePage(JRVirtualPrintPage page)
-
-
-
Constructor Detail
-
ElementsBlock
public ElementsBlock(JRVirtualizationContext context, JRVirtualPrintPage page)
-
ElementsBlock
public ElementsBlock(JRVirtualizationContext context, JRVirtualPrintPage page, String uid, int size)
-
-
Method Detail
-
updatePage
public void updatePage(JRVirtualPrintPage page)
- Specified by:
updatePage
in interfaceElementStore
-
updateContext
public void updateContext(JRVirtualizationContext context, JRVirtualPrintPage page)
- Specified by:
updateContext
in interfaceElementStore
-
size
public int size()
- Specified by:
size
in interfaceElementStore
-
deepSize
public int deepSize()
- Specified by:
deepSize
in interfaceElementStore
-
isEmpty
public boolean isEmpty()
-
get
public JRPrintElement get(int index)
- Specified by:
get
in interfaceElementStore
-
preAdd
protected boolean preAdd(JRPrintElement element, boolean force)
-
add
public boolean add(JRPrintElement element, boolean force)
-
add
public boolean add(JRPrintElement element)
- Specified by:
add
in interfaceElementStore
-
add
public boolean add(int index, JRPrintElement element, boolean force)
-
add
public boolean add(int index, JRPrintElement element)
- Specified by:
add
in interfaceElementStore
-
set
public JRPrintElement set(int index, JRPrintElement element)
- Specified by:
set
in interfaceElementStore
-
remove
public JRPrintElement remove(int index)
- Specified by:
remove
in interfaceElementStore
-
getUID
public String getUID()
Description copied from interface:JRVirtualizable
Used by the virtualizer to identify the data for this object.- Specified by:
getUID
in interfaceJRVirtualizable<VirtualElementsData>
-
ensureVirtualData
public void ensureVirtualData()
Description copied from interface:JRVirtualizable
Ensure that the virtual data is set to the object.- Specified by:
ensureVirtualData
in interfaceJRVirtualizable<VirtualElementsData>
-
setVirtualData
public void setVirtualData(VirtualElementsData virtualData)
Description copied from interface:JRVirtualizable
Used by the virtualizer to set data.- Specified by:
setVirtualData
in interfaceJRVirtualizable<VirtualElementsData>
-
getVirtualData
public VirtualElementsData getVirtualData()
Description copied from interface:JRVirtualizable
Used by the virtualizer to get data.- Specified by:
getVirtualData
in interfaceJRVirtualizable<VirtualElementsData>
-
removeVirtualData
public void removeVirtualData()
Description copied from interface:JRVirtualizable
Used by the virtualizer to remove the data from the object in memory so that it may be garbage collected.- Specified by:
removeVirtualData
in interfaceJRVirtualizable<VirtualElementsData>
-
beforeExternalization
public void beforeExternalization()
Description copied from interface:JRVirtualizable
Called by the virtualizer before the object's data is externalized.- Specified by:
beforeExternalization
in interfaceJRVirtualizable<VirtualElementsData>
-
afterExternalization
public void afterExternalization()
Description copied from interface:JRVirtualizable
Called by the virtualizer after the object's data is externalized, but before the virtual data isremoved
.- Specified by:
afterExternalization
in interfaceJRVirtualizable<VirtualElementsData>
-
afterInternalization
public void afterInternalization()
Description copied from interface:JRVirtualizable
Called by the virtualizer after the object's data was made available to the object.- Specified by:
afterInternalization
in interfaceJRVirtualizable<VirtualElementsData>
-
getContext
public JRVirtualizationContext getContext()
Description copied from interface:JRVirtualizable
Returns the virtualization context this object belongs to.- Specified by:
getContext
in interfaceJRVirtualizable<VirtualElementsData>
- Returns:
- the virtualization context this object belongs to
-
dispose
public void dispose()
- Specified by:
dispose
in interfaceElementStore
-
getPage
public JRVirtualPrintPage getPage()
- Specified by:
getPage
in interfaceVirtualizablePageElements
-
transferElements
public void transferElements(Consumer<JRPrintElement> consumer)
- Specified by:
transferElements
in interfaceElementStore
-
-