public class JRBasePrintElement extends Object implements JRPrintElement, Serializable
Modifier and Type | Field and Description |
---|---|
protected Color |
backcolor |
protected JRDefaultStyleProvider |
defaultStyleProvider |
protected Color |
forecolor |
protected int |
height |
protected String |
key |
protected ModeEnum |
modeValue |
protected JROrigin |
origin |
protected JRStyle |
style |
protected UUID |
uuid |
protected int |
width |
protected int |
x |
protected int |
y |
UNSET_PRINT_ELEMENT_ID, UNSET_SOURCE_ELEMENT_ID
Constructor and Description |
---|
JRBasePrintElement(JRDefaultStyleProvider defaultStyleProvider) |
Modifier and Type | Method and Description |
---|---|
<T> void |
accept(PrintElementVisitor<T> visitor,
T arg)
Accepts a print element visitor.
|
Color |
getBackcolor() |
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.
|
protected StyleResolver |
getStyleResolver() |
UUID |
getUUID() |
int |
getWidth() |
int |
getX() |
int |
getY() |
boolean |
hasProperties()
Checks whether the object has any properties.
|
void |
setBackcolor(Color backcolor) |
void |
setForecolor(Color forecolor) |
void |
setHeight(int height) |
void |
setKey(String key)
Sets the print element key.
|
void |
setMode(ModeEnum modeValue)
Sets the element transparency mode.
|
void |
setOrigin(JROrigin origin) |
void |
setPrintElementId(int printElementId)
Sets the print Id for this element.
|
void |
setSourceElementId(int sourceElementId)
Sets the source/fill element Id for the print element.
|
void |
setStyle(JRStyle style) |
void |
setUUID(UUID uuid) |
void |
setWidth(int width) |
void |
setX(int x) |
void |
setY(int y) |
protected UUID uuid
protected JROrigin origin
protected String key
protected ModeEnum modeValue
protected int x
protected int y
protected int width
protected int height
protected Color forecolor
protected Color backcolor
protected JRDefaultStyleProvider defaultStyleProvider
protected JRStyle style
public JRBasePrintElement(JRDefaultStyleProvider defaultStyleProvider)
public JRDefaultStyleProvider getDefaultStyleProvider()
getDefaultStyleProvider
in interface JRStyleContainer
protected StyleResolver getStyleResolver()
public UUID getUUID()
getUUID
in interface JRIdentifiable
public void setUUID(UUID uuid)
setUUID
in interface JRPrintElement
public JROrigin getOrigin()
getOrigin
in interface JRPrintElement
public void setOrigin(JROrigin origin)
public JRStyle getStyle()
JRStyleContainer
getStyle
in interface JRStyleContainer
public void setStyle(JRStyle style)
setStyle
in interface JRPrintElement
public ModeEnum getModeValue()
JRCommonElement
getModeValue
in interface JRCommonElement
public ModeEnum getOwnModeValue()
getOwnModeValue
in interface JRCommonElement
public void setMode(ModeEnum modeValue)
JRCommonElement
setMode
in interface JRCommonElement
public int getX()
getX
in interface JRPrintElement
public void setX(int x)
setX
in interface JRPrintElement
public int getY()
getY
in interface JRPrintElement
public void setY(int y)
setY
in interface JRPrintElement
public int getWidth()
getWidth
in interface JRCommonElement
getWidth
in interface JRPrintElement
public void setWidth(int width)
setWidth
in interface JRPrintElement
public int getHeight()
getHeight
in interface JRCommonElement
getHeight
in interface JRPrintElement
public void setHeight(int height)
setHeight
in interface JRPrintElement
public Color getForecolor()
getForecolor
in interface JRCommonElement
public Color getOwnForecolor()
getOwnForecolor
in interface JRCommonElement
public void setForecolor(Color forecolor)
setForecolor
in interface JRCommonElement
public Color getBackcolor()
getBackcolor
in interface JRCommonElement
public Color getOwnBackcolor()
getOwnBackcolor
in interface JRCommonElement
public void setBackcolor(Color backcolor)
setBackcolor
in interface JRCommonElement
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 JRCommonElement
getKey
in interface JRPrintElement
public void setKey(String key)
key
- the element keygetKey()
public String getStyleNameReference()
getStyleNameReference
in interface JRStyleContainer
public boolean hasProperties()
JRPropertiesHolder
hasProperties
in interface JRPropertiesHolder
public JRPropertiesMap getPropertiesMap()
JRPropertiesHolder
getPropertiesMap
in interface JRPropertiesHolder
public JRPropertiesHolder getParentProperties()
JRPropertiesHolder
getParentProperties
in interface JRPropertiesHolder
null
if no parentpublic <T> void accept(PrintElementVisitor<T> visitor, T arg)
JRPrintElement
The element calls the method that corresponds to the element type on the visitor.
accept
in interface JRPrintElement
T
- the type of the argument passed to the visit operationvisitor
- the visitor objectsarg
- the argument passed to the visit operationpublic int getSourceElementId()
JRPrintElement
getSourceElementId
in interface JRPrintElement
public void setSourceElementId(int sourceElementId)
sourceElementId
- getSourceElementId()
public int getPrintElementId()
JRPrintElement
JRPrintElement.getSourceElementId()
uniquely identifies a print element.getPrintElementId
in interface JRPrintElement
PrintElementId
public void setPrintElementId(int printElementId)
printElementId
- the print IdgetPrintElementId()
Copyright © 2016. All rights reserved.