Package net.sf.jasperreports.engine.base
Class JRBasePrintElement
java.lang.Object
net.sf.jasperreports.engine.base.JRBasePrintElement
- All Implemented Interfaces:
Serializable
,JRCommonElement
,JRIdentifiable
,JRPrintElement
,JRPropertiesHolder
,JRStyleContainer
- Direct Known Subclasses:
JRBaseGenericPrintElement
,JRBasePrintFrame
,JRBasePrintGraphicElement
,JRBasePrintText
- Author:
- Teodor Danciu (teodord@users.sourceforge.net)
- See Also:
-
Field Summary
FieldsModifier and TypeFieldDescriptionprotected Color
protected JRDefaultStyleProvider
protected Color
protected int
protected String
protected ModeEnum
protected JROrigin
protected JRStyle
protected UUID
protected int
protected int
protected int
Fields inherited from interface net.sf.jasperreports.engine.JRPrintElement
UNSET_PRINT_ELEMENT_ID, UNSET_SOURCE_ELEMENT_ID
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescription<T> void
accept
(PrintElementVisitor<T> visitor, T arg) Accepts a print element visitor.int
getKey()
Returns a string key that can be used to identify the element.getMode()
Returns the element transparency mode.Returns the parent properties holder, whose properties are used as defaults for this object.int
Returns a numerical Id that together withJRPrintElement.getSourceElementId()
uniquely identifies a print element.Returns this object's properties map.int
Returns a numerical Id associated to the fill element that generated this print element.getStyle()
Returns this object's style.Returns null as external style references are not allowed for print objects.protected StyleResolver
getUUID()
int
getWidth()
int
getX()
int
getY()
boolean
Checks whether the object has any properties.void
setBackcolor
(Color backcolor) void
setForecolor
(Color forecolor) void
setHeight
(int height) void
Sets the print element key.void
Sets the element transparency mode.void
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
void
void
setWidth
(int width) void
setX
(int x) void
setY
(int y) 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.JRStyleContainer
getStyleName
-
Field Details
-
uuid
-
origin
-
key
-
mode
-
x
protected int x -
y
protected int y -
width
protected int width -
height
protected int height -
forecolor
-
backcolor
-
defaultStyleProvider
-
style
-
-
Constructor Details
-
JRBasePrintElement
-
-
Method Details
-
getDefaultStyleProvider
- Specified by:
getDefaultStyleProvider
in interfaceJRStyleContainer
-
getStyleResolver
-
getUUID
- Specified by:
getUUID
in interfaceJRIdentifiable
-
setUUID
- Specified by:
setUUID
in interfaceJRPrintElement
-
getOrigin
- Specified by:
getOrigin
in interfaceJRPrintElement
-
setOrigin
-
getStyle
Description copied from interface:JRStyleContainer
Returns this object's style.- Specified by:
getStyle
in interfaceJRStyleContainer
- Returns:
- this object's style
-
setStyle
- Specified by:
setStyle
in interfaceJRPrintElement
-
getMode
Description copied from interface:JRCommonElement
Returns the element transparency mode. The default value depends on the type of the report element. Graphic elements like rectangles and lines are opaque by default, but the images are transparent. Both static texts and text fields are transparent by default, and so are the subreport elements.- Specified by:
getMode
in interfaceJRCommonElement
-
getOwnMode
- Specified by:
getOwnMode
in interfaceJRCommonElement
-
setMode
Description copied from interface:JRCommonElement
Sets the element transparency mode.- Specified by:
setMode
in interfaceJRCommonElement
-
getX
public int getX()- Specified by:
getX
in interfaceJRPrintElement
-
setX
public void setX(int x) - Specified by:
setX
in interfaceJRPrintElement
-
getY
public int getY()- Specified by:
getY
in interfaceJRPrintElement
-
setY
public void setY(int y) - Specified by:
setY
in interfaceJRPrintElement
-
getWidth
public int getWidth()- Specified by:
getWidth
in interfaceJRCommonElement
- Specified by:
getWidth
in interfaceJRPrintElement
-
setWidth
public void setWidth(int width) - Specified by:
setWidth
in interfaceJRPrintElement
-
getHeight
public int getHeight()- Specified by:
getHeight
in interfaceJRCommonElement
- Specified by:
getHeight
in interfaceJRPrintElement
-
setHeight
public void setHeight(int height) - Specified by:
setHeight
in interfaceJRPrintElement
-
getForecolor
- Specified by:
getForecolor
in interfaceJRCommonElement
-
getOwnForecolor
- Specified by:
getOwnForecolor
in interfaceJRCommonElement
-
setForecolor
- Specified by:
setForecolor
in interfaceJRCommonElement
-
getBackcolor
- Specified by:
getBackcolor
in interfaceJRCommonElement
-
getOwnBackcolor
- Specified by:
getOwnBackcolor
in interfaceJRCommonElement
-
setBackcolor
- Specified by:
setBackcolor
in interfaceJRCommonElement
-
getKey
Description copied from interface:JRPrintElement
Returns a string key that can be used to identify the element.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.- Specified by:
getKey
in interfaceJRCommonElement
- Specified by:
getKey
in interfaceJRPrintElement
-
setKey
Sets the print element key.- Parameters:
key
- the element key- See Also:
-
getStyleNameReference
Returns null as external style references are not allowed for print objects.- Specified by:
getStyleNameReference
in interfaceJRStyleContainer
- Returns:
- the name of an external style
-
hasProperties
public boolean hasProperties()Description copied from interface:JRPropertiesHolder
Checks whether the object has any properties.- Specified by:
hasProperties
in interfaceJRPropertiesHolder
- Returns:
- whether the object has any properties
-
getPropertiesMap
Description copied from interface:JRPropertiesHolder
Returns this object's properties map.- Specified by:
getPropertiesMap
in interfaceJRPropertiesHolder
- Returns:
- this object's properties map
-
getParentProperties
Description copied from interface:JRPropertiesHolder
Returns the parent properties holder, whose properties are used as defaults for this object.- Specified by:
getParentProperties
in interfaceJRPropertiesHolder
- Returns:
- the parent properties holder, or
null
if no parent
-
accept
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
- 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
-
getSourceElementId
public int getSourceElementId()Description copied from interface:JRPrintElement
Returns a numerical Id associated to the fill element that generated this print element.- Specified by:
getSourceElementId
in interfaceJRPrintElement
- Returns:
- the Id of the fill element that generated this element
-
setSourceElementId
public void setSourceElementId(int sourceElementId) Sets the source/fill element Id for the print element.- Parameters:
sourceElementId
-- See Also:
-
getPrintElementId
public int getPrintElementId()Description copied from interface:JRPrintElement
Returns a numerical Id that together withJRPrintElement.getSourceElementId()
uniquely identifies a print element.- Specified by:
getPrintElementId
in interfaceJRPrintElement
- Returns:
- a print Id for the element
- See Also:
-
setPrintElementId
public void setPrintElementId(int printElementId) Sets the print Id for this element.- Parameters:
printElementId
- the print Id- See Also:
-