Package net.sf.jasperreports.engine
Interface JRLineBox
- All Superinterfaces:
JRPenContainer
,JRStyleContainer
- All Known Implementing Classes:
CachingLineBox
,JRBaseLineBox
This is useful for drawing borders around text elements and images. Boxes can have borders and paddings, which can
have different width and color on each side of the element.
Text elements, images, and charts are considered "box elements" because one can
surround them by a border that's customizable on each side. When defining the border
around such a box element, the user can control the width, style, and color of each of the
four sides of the element, as well as the padding (the amount of blank space to reserve
between the border of the element and its actual content).These properties are grouped
into the
<box>
tag.
Border Line Settings
Border line settings such as line width, line style and the line color can be accessed using thegetPen()
method and are grouped into the pen
tag.
The attributes for specifying the border style for each side of the box are grouped into topPen
,
leftPen
, bottomPen
, and rightPen
tag. These can be used for overriding the
border style specified by the pen
element mentioned previously. There is a getter method for each side
pen element.
Box Padding
The amount of space to be left blank as margins within the bounds of a box element can be controlled using either thepadding
attribute (providing the same amount of padding
on all four sides) or the individual attributes for each side: topPadding
,
leftPadding
, bottomPadding
, and rightPadding
. Each padding
attribute is accessed with a corresponding getter method.- Author:
- Teodor Danciu (teodord@users.sourceforge.net)
- See Also:
-
Method Summary
Modifier and TypeMethodDescriptionclone
(JRBoxContainer boxContainer) void
copyBottomPen
(JRBoxPen bottomPen) void
copyLeftPen
(JRBoxPen leftPen) void
void
copyRightPen
(JRBoxPen rightPen) void
copyTopPen
(JRBoxPen topPen) Gets the pen properties for the bottom border.Gets the pen properties for the left border.Gets the default padding in pixels (can be overwritten by individual settings).getPen()
Gets the pen properties for the border.Gets the pen properties for the right border.Gets the pen properties for the top border.void
void
setBottomPadding
(Integer padding) void
setLeftPadding
(Integer padding) void
setPadding
(Integer padding) Sets the default padding in pixels (can be overwritten by individual settings).void
setRightPadding
(Integer padding) void
setTopPadding
(Integer padding) Methods inherited from interface net.sf.jasperreports.engine.JRPenContainer
getDefaultLineColor, getDefaultLineWidth
Methods inherited from interface net.sf.jasperreports.engine.JRStyleContainer
getDefaultStyleProvider, getStyle, getStyleName, getStyleNameReference
-
Method Details
-
getBoxContainer
JRBoxContainer getBoxContainer() -
clone
-
populateStyle
void populateStyle() -
getPen
JRBoxPen getPen()Gets the pen properties for the border. -
copyPen
-
getTopPen
JRBoxPen getTopPen()Gets the pen properties for the top border. -
copyTopPen
-
getLeftPen
JRBoxPen getLeftPen()Gets the pen properties for the left border. -
copyLeftPen
-
getBottomPen
JRBoxPen getBottomPen()Gets the pen properties for the bottom border. -
copyBottomPen
-
getRightPen
JRBoxPen getRightPen()Gets the pen properties for the right border. -
copyRightPen
-
getPadding
Integer getPadding()Gets the default padding in pixels (can be overwritten by individual settings). -
getOwnPadding
Integer getOwnPadding() -
setPadding
Sets the default padding in pixels (can be overwritten by individual settings). -
getTopPadding
Integer getTopPadding() -
getOwnTopPadding
Integer getOwnTopPadding() -
setTopPadding
-
getLeftPadding
Integer getLeftPadding() -
getOwnLeftPadding
Integer getOwnLeftPadding() -
setLeftPadding
-
getBottomPadding
Integer getBottomPadding() -
getOwnBottomPadding
Integer getOwnBottomPadding() -
setBottomPadding
-
getRightPadding
Integer getRightPadding() -
getOwnRightPadding
Integer getOwnRightPadding() -
setRightPadding
-