Package net.sf.jasperreports.engine.base
Class JRBasePen
java.lang.Object
net.sf.jasperreports.engine.base.JRBasePen
- All Implemented Interfaces:
Serializable,Cloneable,Deduplicable,JRChangeEventsSupport,JRPen
- Direct Known Subclasses:
JRBaseBoxPen
public class JRBasePen
extends Object
implements JRPen, Serializable, Cloneable, JRChangeEventsSupport, Deduplicable
This is useful for drawing borders around text elements and images. Boxes can have borders and paddings, which can
have different width and colour on each side of the element.
- Author:
- Teodor Danciu (teodord@users.sourceforge.net)
- See Also:
-
Field Summary
FieldsModifier and TypeFieldDescriptionprotected Colorprotected LineStyleEnumprotected Floatprotected JRPenContainerstatic final Stringstatic final Stringstatic final StringFields inherited from interface net.sf.jasperreports.engine.JRPen
LINE_WIDTH_0, LINE_WIDTH_1 -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionclone(JRPenContainer penContainer) Returns the property change support object for this instance.intReturns a hash code to be used for the deduplicate map.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.protected StyleResolverbooleanisIdentical(Object object) Determines if this instance is identical to another object.voidvoidsetLineColor(Color lineColor) Sets the line color.voidsetLineStyle(LineStyleEnum lineStyle) Specifies the line style.voidsetLineWidth(Float lineWidth) Sets the line width.
-
Field Details
-
PROPERTY_LINE_WIDTH
- See Also:
-
PROPERTY_LINE_STYLE
- See Also:
-
PROPERTY_LINE_COLOR
- See Also:
-
penContainer
-
lineWidth
-
lineStyle
-
lineColor
-
-
Constructor Details
-
JRBasePen
public JRBasePen() -
JRBasePen
-
-
Method Details
-
getPenContainer
- Specified by:
getPenContainerin interfaceJRPen
-
getStyleResolver
-
getLineWidth
Description copied from interface:JRPenGets the line width used for this pen.- Specified by:
getLineWidthin interfaceJRPen- Returns:
- line width
-
getOwnLineWidth
- Specified by:
getOwnLineWidthin interfaceJRPen
-
setLineWidth
Description copied from interface:JRPenSets the line width.- Specified by:
setLineWidthin interfaceJRPen- Parameters:
lineWidth- the line width
-
getLineStyle
Description copied from interface:JRPenIndicates the line style used for this pen.- Specified by:
getLineStylein interfaceJRPen- Returns:
- a value representing one of the line style constants in
LineStyleEnum
-
getOwnLineStyle
Description copied from interface:JRPenIndicates the line style used for this pen.- Specified by:
getOwnLineStylein interfaceJRPen- Returns:
- a value representing one of the line style constants in
LineStyleEnum
-
setLineStyle
Description copied from interface:JRPenSpecifies the line style.- Specified by:
setLineStylein interfaceJRPen- Parameters:
lineStyle- a value representing one of the line style constants inLineStyleEnum
-
getLineColor
Description copied from interface:JRPenGets the line color.- Specified by:
getLineColorin interfaceJRPen
-
getOwnLineColor
- Specified by:
getOwnLineColorin interfaceJRPen
-
setLineColor
Description copied from interface:JRPenSets the line color.- Specified by:
setLineColorin interfaceJRPen
-
getStyleNameReference
-
clone
-
getEventSupport
Description copied from interface:JRChangeEventsSupportReturns the property change support object for this instance.- Specified by:
getEventSupportin interfaceJRChangeEventsSupport- Returns:
- the property change support object for this instance
-
getHashCode
public int getHashCode()Description copied from interface:DeduplicableReturns a hash code to be used for the deduplicate map. The returned hash code should be consitent wiwhDeduplicable.isIdentical(Object), i.e. if two objects are identical they should have the same hash code.- Specified by:
getHashCodein interfaceDeduplicable- Returns:
- deduplication hash code
-
isIdentical
Description copied from interface:DeduplicableDetermines if this instance is identical to another object.- Specified by:
isIdenticalin interfaceDeduplicable- Parameters:
object- the object to compare with this instance- Returns:
trueif the two objects are identical and can be deduplicated
-
populateStyle
public void populateStyle()- Specified by:
populateStylein interfaceJRPen
-