Package net.sf.jasperreports.engine
Interface JRPen
- All Known Subinterfaces:
JRBoxPen
- All Known Implementing Classes:
JRBaseBoxBottomPen,JRBaseBoxLeftPen,JRBaseBoxPen,JRBaseBoxRightPen,JRBaseBoxTopPen,JRBasePen
public interface JRPen
This interface is used to customize line settings such as width, style and color.
This is useful for drawing graphic elements as well as drawing borders around text elements and images.
Line Width
ThelineWidth attribute represents the width of the line measured in points.
Can be accessed using the getLineWidth() method.
Line Style
ThelineStyle attribute represents the line style and has one of the following predefined values
(see getLineStyle()):
SolidDashedDottedDouble
Line Color
ThelineColor attribute represents the color of the line.
Can be accessed using the getLineColor() method.- Author:
- Teodor Danciu (teodord@users.sourceforge.net)
-
Field Summary
Fields -
Method Summary
Modifier and TypeMethodDescriptionclone(JRPenContainer penContainer) Gets the line color.Indicates the line style used for this pen.Gets the line width used for this pen.Indicates the line style used for this pen.voidvoidsetLineColor(Color color) Sets the line color.voidsetLineStyle(LineStyleEnum lineStyleEnum) Specifies the line style.voidsetLineWidth(Float lineWidth) Sets the line width.
-
Field Details
-
LINE_WIDTH_0
-
LINE_WIDTH_1
-
-
Method Details
-
getPenContainer
JRPenContainer getPenContainer() -
clone
-
populateStyle
void populateStyle() -
getLineWidth
Float getLineWidth()Gets the line width used for this pen.- Returns:
- line width
-
getOwnLineWidth
Float getOwnLineWidth() -
setLineWidth
Sets the line width.- Parameters:
lineWidth- the line width
-
getLineStyle
LineStyleEnum getLineStyle()Indicates the line style used for this pen.- Returns:
- a value representing one of the line style constants in
LineStyleEnum
-
getOwnLineStyle
LineStyleEnum getOwnLineStyle()Indicates the line style used for this pen.- Returns:
- a value representing one of the line style constants in
LineStyleEnum
-
setLineStyle
Specifies the line style.- Parameters:
lineStyleEnum- a value representing one of the line style constants inLineStyleEnum
-
getLineColor
Color getLineColor()Gets the line color. -
getOwnLineColor
Color getOwnLineColor() -
setLineColor
Sets the line color.
-