public class JRTemplatePrintElement extends Object implements JRPrintElement, Serializable, VirtualizationSerializable
JRPrintElement that uses
a JRTemplateElement instance to
store common attributes.| Modifier and Type | Field and Description |
|---|---|
static String |
EXCEPTION_MESSAGE_KEY_TEMPLATE_NOT_FOUND |
protected JRTemplateElement |
template |
UNSET_PRINT_ELEMENT_ID, UNSET_SOURCE_ELEMENT_ID| Modifier | Constructor and Description |
|---|---|
|
JRTemplatePrintElement() |
protected |
JRTemplatePrintElement(JRTemplateElement element)
Deprecated.
provide a source Id via
JRTemplatePrintElement(JRTemplateElement, int) |
protected |
JRTemplatePrintElement(JRTemplateElement element,
int sourceElementId)
Deprecated.
|
protected |
JRTemplatePrintElement(JRTemplateElement element,
PrintElementOriginator originator) |
| Modifier and Type | Method and Description |
|---|---|
<T> void |
accept(PrintElementVisitor<T> visitor,
T arg)
Accepts a print element visitor.
|
Color |
getBackcolor() |
Color |
getDefaultLineColor() |
JRDefaultStyleProvider |
getDefaultStyleProvider() |
Color |
getForecolor() |
int |
getHeight() |
String |
getKey()
Returns a string key that can be used to identify the element.
|
ModeEnum |
getModeValue()
Returns the element transparency mode.
|
JROrigin |
getOrigin() |
Color |
getOwnBackcolor() |
Color |
getOwnForecolor() |
ModeEnum |
getOwnModeValue() |
JRPropertiesHolder |
getParentProperties()
Returns the parent properties holder, whose properties are used as defaults
for this object.
|
int |
getPrintElementId()
Returns a numerical Id that together with
JRPrintElement.getSourceElementId() uniquely identifies a print element. |
JRPropertiesMap |
getPropertiesMap()
Returns this object's properties map.
|
int |
getSourceElementId()
Returns a numerical Id associated to the fill element that generated
this print element.
|
JRStyle |
getStyle()
Returns this object's style.
|
String |
getStyleNameReference()
Returns null as external style references are not allowed for print objects.
|
JRTemplateElement |
getTemplate() |
UUID |
getUUID() |
int |
getWidth() |
int |
getX() |
int |
getY() |
boolean |
hasProperties()
Checks whether the object has any properties.
|
void |
readVirtualized(VirtualizationInput in) |
void |
setBackcolor(Color color) |
void |
setForecolor(Color color) |
void |
setHeight(int height) |
void |
setMode(ModeEnum modeValue)
Sets the element transparency mode.
|
void |
setSourceElementId(int sourceElementId)
Sets the source/fill element Id for the print element.
|
void |
setStyle(JRStyle style) |
void |
setTemplate(JRTemplateElement template) |
void |
setUUID(UUID uuid) |
void |
setWidth(int width) |
void |
setX(int x) |
void |
setY(int y) |
protected void |
updateElementTemplate(JRTemplateElement elementTemplate)
Updates the template used by this element.
|
void |
writeVirtualized(VirtualizationOutput out) |
public static final String EXCEPTION_MESSAGE_KEY_TEMPLATE_NOT_FOUND
protected JRTemplateElement template
public JRTemplatePrintElement()
protected JRTemplatePrintElement(JRTemplateElement element)
JRTemplatePrintElement(JRTemplateElement, int)protected JRTemplatePrintElement(JRTemplateElement element, int sourceElementId)
JRTemplatePrintElement(JRTemplateElement, PrintElementOriginator)element - sourceElementId - the Id of the source elementprotected JRTemplatePrintElement(JRTemplateElement element, PrintElementOriginator originator)
element - originator - protected void updateElementTemplate(JRTemplateElement elementTemplate)
elementTemplate - the new element templatepublic JRDefaultStyleProvider getDefaultStyleProvider()
getDefaultStyleProvider in interface JRStyleContainerpublic UUID getUUID()
getUUID in interface JRIdentifiablepublic void setUUID(UUID uuid)
setUUID in interface JRPrintElementpublic JROrigin getOrigin()
getOrigin in interface JRPrintElementpublic JRStyle getStyle()
JRStyleContainergetStyle in interface JRStyleContainerpublic void setStyle(JRStyle style)
setStyle in interface JRPrintElementpublic ModeEnum getModeValue()
JRCommonElementgetModeValue in interface JRCommonElementpublic ModeEnum getOwnModeValue()
getOwnModeValue in interface JRCommonElementpublic void setMode(ModeEnum modeValue)
JRCommonElementsetMode in interface JRCommonElementpublic int getX()
getX in interface JRPrintElementpublic void setX(int x)
setX in interface JRPrintElementpublic int getY()
getY in interface JRPrintElementpublic void setY(int y)
setY in interface JRPrintElementpublic int getWidth()
getWidth in interface JRCommonElementgetWidth in interface JRPrintElementpublic void setWidth(int width)
setWidth in interface JRPrintElementpublic int getHeight()
getHeight in interface JRCommonElementgetHeight in interface JRPrintElementpublic void setHeight(int height)
setHeight in interface JRPrintElementpublic Color getForecolor()
getForecolor in interface JRCommonElementpublic Color getOwnForecolor()
getOwnForecolor in interface JRCommonElementpublic void setForecolor(Color color)
setForecolor in interface JRCommonElementpublic Color getBackcolor()
getBackcolor in interface JRCommonElementpublic Color getOwnBackcolor()
getOwnBackcolor in interface JRCommonElementpublic void setBackcolor(Color color)
setBackcolor in interface JRCommonElementpublic JRTemplateElement getTemplate()
public void setTemplate(JRTemplateElement template)
public String getKey()
JRPrintElement
When filling a report, the report element key
is copied to all print elements generated by a report element.
Note that this means that multiple elements having the same key can
appear on the same page/filled report.
getKey in interface JRCommonElementgetKey in interface JRPrintElementpublic String getStyleNameReference()
getStyleNameReference in interface JRStyleContainerpublic Color getDefaultLineColor()
public boolean hasProperties()
JRPropertiesHolderhasProperties in interface JRPropertiesHolderpublic JRPropertiesMap getPropertiesMap()
JRPropertiesHoldergetPropertiesMap in interface JRPropertiesHolderpublic JRPropertiesHolder getParentProperties()
JRPropertiesHoldergetParentProperties in interface JRPropertiesHoldernull if no parentpublic <T> void accept(PrintElementVisitor<T> visitor, T arg)
JRPrintElementThe element calls the method that corresponds to the element type on the visitor.
accept in interface JRPrintElementT - the type of the argument passed to the visit operationvisitor - the visitor objectsarg - the argument passed to the visit operationpublic int getSourceElementId()
JRPrintElementgetSourceElementId in interface JRPrintElementpublic int getPrintElementId()
JRPrintElementJRPrintElement.getSourceElementId() uniquely identifies a print element.getPrintElementId in interface JRPrintElementPrintElementIdpublic void setSourceElementId(int sourceElementId)
sourceElementId - getSourceElementId()public void writeVirtualized(VirtualizationOutput out) throws IOException
writeVirtualized in interface VirtualizationSerializableIOExceptionpublic void readVirtualized(VirtualizationInput in) throws IOException
readVirtualized in interface VirtualizationSerializableIOExceptionCopyright © 2017. All rights reserved.