Package net.sf.jasperreports.engine.fill
Class JRTemplatePrintFrame
- java.lang.Object
-
- net.sf.jasperreports.engine.fill.JRTemplatePrintElement
-
- net.sf.jasperreports.engine.fill.JRTemplatePrintFrame
-
- All Implemented Interfaces:
Serializable
,JRBoxContainer
,JRCommonElement
,JRIdentifiable
,JRPrintElement
,JRPrintElementContainer
,JRPrintElementListContainer
,JRPrintFrame
,JRPropertiesHolder
,JRStyleContainer
,VirtualizationSerializable
public class JRTemplatePrintFrame extends JRTemplatePrintElement implements JRPrintFrame, JRPrintElementContainer
Implementation ofJRPrintFrame
that usestemplate frames
to store common attributes.- Author:
- Lucian Chirita (lucianc@users.sourceforge.net)
- See Also:
- Serialized Form
-
-
Field Summary
-
Fields inherited from class net.sf.jasperreports.engine.fill.JRTemplatePrintElement
EXCEPTION_MESSAGE_KEY_TEMPLATE_NOT_FOUND, template
-
Fields inherited from interface net.sf.jasperreports.engine.JRPrintElement
UNSET_PRINT_ELEMENT_ID, UNSET_SOURCE_ELEMENT_ID
-
-
Constructor Summary
Constructors Constructor Description JRTemplatePrintFrame()
JRTemplatePrintFrame(JRTemplateFrame templateFrame, PrintElementOriginator originator)
Creates a print frame element.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description <T> void
accept(PrintElementVisitor<T> visitor, T arg)
Accepts a print element visitor.void
addElement(JRPrintElement element)
Adds an element to the container.void
addElements(Collection<? extends JRPrintElement> elements)
Color
getDefaultLineColor()
List<JRPrintElement>
getElements()
Returns the list of print elements contained in the frame.JRLineBox
getLineBox()
void
readVirtualized(VirtualizationInput in)
protected void
setElementsList(List<JRPrintElement> elements)
void
writeVirtualized(VirtualizationOutput out)
-
Methods inherited from class net.sf.jasperreports.engine.fill.JRTemplatePrintElement
getBackcolor, getDefaultStyleProvider, getForecolor, getHeight, getKey, getMode, getOrigin, getOwnBackcolor, getOwnForecolor, getOwnMode, getParentProperties, getPrintElementId, getPropertiesMap, getSourceElementId, getStyle, getStyleNameReference, getTemplate, getUUID, getWidth, getX, getY, hasProperties, setBackcolor, setForecolor, setHeight, setMode, setSourceElementId, setStyle, setTemplate, setUUID, setWidth, setX, setY, updateElementTemplate
-
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
-
Methods inherited from interface net.sf.jasperreports.engine.JRCommonElement
getBackcolor, getForecolor, getMode, getOwnBackcolor, getOwnForecolor, getOwnMode, setBackcolor, setForecolor, setMode
-
Methods inherited from interface net.sf.jasperreports.engine.JRIdentifiable
getUUID
-
Methods inherited from interface net.sf.jasperreports.engine.JRPrintElement
getHeight, getKey, getOrigin, getPrintElementId, getSourceElementId, getWidth, getX, getY, setHeight, setStyle, setUUID, setWidth, setX, setY
-
Methods inherited from interface net.sf.jasperreports.engine.JRPrintElementContainer
getHeight, setContentsWidth, setHeight
-
Methods inherited from interface net.sf.jasperreports.engine.JRPropertiesHolder
getParentProperties, getPropertiesMap, hasProperties
-
Methods inherited from interface net.sf.jasperreports.engine.JRStyleContainer
getDefaultStyleProvider, getStyle, getStyleName, getStyleNameReference
-
-
-
-
Constructor Detail
-
JRTemplatePrintFrame
public JRTemplatePrintFrame()
-
JRTemplatePrintFrame
public JRTemplatePrintFrame(JRTemplateFrame templateFrame, PrintElementOriginator originator)
Creates a print frame element.- Parameters:
templateFrame
- the template frame that the element will useoriginator
-
-
-
Method Detail
-
setElementsList
protected void setElementsList(List<JRPrintElement> elements)
-
getElements
public List<JRPrintElement> getElements()
Description copied from interface:JRPrintFrame
Returns the list of print elements contained in the frame.- Specified by:
getElements
in interfaceJRPrintElementListContainer
- Specified by:
getElements
in interfaceJRPrintFrame
- Returns:
- the list of sub print elements
-
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
-
addElements
public void addElements(Collection<? extends JRPrintElement> elements)
-
getLineBox
public JRLineBox getLineBox()
- Specified by:
getLineBox
in interfaceJRBoxContainer
-
getDefaultLineColor
public Color getDefaultLineColor()
- Specified by:
getDefaultLineColor
in interfaceJRBoxContainer
- Overrides:
getDefaultLineColor
in classJRTemplatePrintElement
-
accept
public <T> void accept(PrintElementVisitor<T> visitor, T arg)
Description copied from interface:JRPrintElement
Accepts a print element visitor.The element calls the method that corresponds to the element type on the visitor.
- Specified by:
accept
in interfaceJRPrintElement
- Overrides:
accept
in classJRTemplatePrintElement
- Type Parameters:
T
- the type of the argument passed to the visit operation- Parameters:
visitor
- the visitor objectsarg
- the argument passed to the visit operation
-
writeVirtualized
public void writeVirtualized(VirtualizationOutput out) throws IOException
- Specified by:
writeVirtualized
in interfaceVirtualizationSerializable
- Overrides:
writeVirtualized
in classJRTemplatePrintElement
- Throws:
IOException
-
readVirtualized
public void readVirtualized(VirtualizationInput in) throws IOException
- Specified by:
readVirtualized
in interfaceVirtualizationSerializable
- Overrides:
readVirtualized
in classJRTemplatePrintElement
- Throws:
IOException
-
-