public interface JRCommonElement extends JRStyleContainer
<reportElement>
tag, which appears in the declaration of all report elements.
getElementByKey(String)
method available at band level. A key value must be
associated with the report element and it must be unique within the overall band for the
lookup to work.
width
and height
attributes are mandatory and represent the size of the report
element measured in pixels. Other element stretching settings may instruct the reporting
engine to ignore the specified element height. Even in this case, the attributes remain
mandatory since even when the height is calculated dynamically, the element will not be
smaller than the originally specified height.
mode
attribute. The default value for this attribute depends on the type of the
report element. Graphic elements like rectangles and lines are opaque by default, while
images are transparent. Both static texts and text fields are transparent by default, and so
are the subreport elements.
forecolor
and backcolor
. The
fore color is for the
text of the text elements and the border of the graphic elements. The background color
fills the background of the specified report element, if it is not transparent.
One can also use the decimal or hexadecimal representation for the desired color. The
preferred way to specify colors in JRXML is using the hexadecimal representation,
because it lets people control the level for each base color of the RGB system. For example,
one can display a text field in red by setting its forecolor
attribute as follows:
forecolor="#FF0000"
The equivalent using the decimal representation would be the following:
forecolor="16711680"
The default fore color is black
and the default background color is white
.Modifier and Type | Method and Description |
---|---|
java.awt.Color |
getBackcolor() |
java.awt.Color |
getForecolor() |
int |
getHeight() |
java.lang.String |
getKey()
Returns the string value that uniquely identifies the element.
|
ModeEnum |
getModeValue()
Returns the element transparency mode.
|
java.awt.Color |
getOwnBackcolor() |
java.awt.Color |
getOwnForecolor() |
ModeEnum |
getOwnModeValue() |
int |
getWidth() |
void |
setBackcolor(java.awt.Color backcolor) |
void |
setForecolor(java.awt.Color forecolor) |
void |
setMode(ModeEnum mode)
Sets the element transparency mode.
|
getDefaultStyleProvider, getStyle, getStyleNameReference
int getWidth()
int getHeight()
java.lang.String getKey()
ModeEnum getModeValue()
ModeEnum getOwnModeValue()
void setMode(ModeEnum mode)
java.awt.Color getForecolor()
java.awt.Color getOwnForecolor()
void setForecolor(java.awt.Color forecolor)
java.awt.Color getBackcolor()
java.awt.Color getOwnBackcolor()
void setBackcolor(java.awt.Color backcolor)
© 2001-2014 TIBCO Software Inc. www.jaspersoft.com