Package net.sf.jasperreports.engine.base
Class JRBasePen
- java.lang.Object
-
- net.sf.jasperreports.engine.base.JRBasePen
-
- All Implemented Interfaces:
java.io.Serializable,java.lang.Cloneable,Deduplicable,JRChangeEventsSupport,JRPen
- Direct Known Subclasses:
JRBaseBoxPen
public class JRBasePen extends java.lang.Object implements JRPen, java.io.Serializable, java.lang.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:
- Serialized Form
-
-
Field Summary
Fields Modifier and Type Field Description protected java.awt.ColorlineColorprotected LineStyleEnumlineStyleValueprotected java.lang.FloatlineWidthprotected JRPenContainerpenContainerstatic java.lang.StringPROPERTY_LINE_COLORstatic java.lang.StringPROPERTY_LINE_STYLEstatic java.lang.StringPROPERTY_LINE_WIDTH-
Fields inherited from interface net.sf.jasperreports.engine.JRPen
LINE_WIDTH_0, LINE_WIDTH_1
-
-
Constructor Summary
Constructors Constructor Description JRBasePen(JRPenContainer penContainer)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description JRPenclone(JRPenContainer penContainer)JRPropertyChangeSupportgetEventSupport()Returns the property change support object for this instance.intgetHashCode()Returns a hash code to be used for the deduplicate map.java.awt.ColorgetLineColor()Gets the line color.LineStyleEnumgetLineStyleValue()Indicates the line style used for this pen.java.lang.FloatgetLineWidth()Gets the line width used for this pen.java.awt.ColorgetOwnLineColor()LineStyleEnumgetOwnLineStyleValue()Indicates the line style used for this pen.java.lang.FloatgetOwnLineWidth()JRPenContainergetPenContainer()java.lang.StringgetStyleNameReference()protected StyleResolvergetStyleResolver()booleanisIdentical(java.lang.Object object)Determines if this instance is identical to another object.voidpopulateStyle()voidsetLineColor(java.awt.Color lineColor)Sets the line color.voidsetLineStyle(LineStyleEnum lineStyleValue)Specifies the line style.voidsetLineWidth(java.lang.Float lineWidth)Sets the line width.
-
-
-
Field Detail
-
PROPERTY_LINE_WIDTH
public static final java.lang.String PROPERTY_LINE_WIDTH
- See Also:
- Constant Field Values
-
PROPERTY_LINE_STYLE
public static final java.lang.String PROPERTY_LINE_STYLE
- See Also:
- Constant Field Values
-
PROPERTY_LINE_COLOR
public static final java.lang.String PROPERTY_LINE_COLOR
- See Also:
- Constant Field Values
-
penContainer
protected JRPenContainer penContainer
-
lineWidth
protected java.lang.Float lineWidth
-
lineStyleValue
protected LineStyleEnum lineStyleValue
-
lineColor
protected java.awt.Color lineColor
-
-
Constructor Detail
-
JRBasePen
public JRBasePen(JRPenContainer penContainer)
-
-
Method Detail
-
getPenContainer
public JRPenContainer getPenContainer()
- Specified by:
getPenContainerin interfaceJRPen
-
getStyleResolver
protected StyleResolver getStyleResolver()
-
getLineWidth
public java.lang.Float getLineWidth()
Description copied from interface:JRPenGets the line width used for this pen.- Specified by:
getLineWidthin interfaceJRPen- Returns:
- line width
-
getOwnLineWidth
public java.lang.Float getOwnLineWidth()
- Specified by:
getOwnLineWidthin interfaceJRPen
-
setLineWidth
public void setLineWidth(java.lang.Float lineWidth)
Description copied from interface:JRPenSets the line width.- Specified by:
setLineWidthin interfaceJRPen- Parameters:
lineWidth- the line width
-
getLineStyleValue
public LineStyleEnum getLineStyleValue()
Description copied from interface:JRPenIndicates the line style used for this pen.- Specified by:
getLineStyleValuein interfaceJRPen- Returns:
- a value representing one of the line style constants in
LineStyleEnum
-
getOwnLineStyleValue
public LineStyleEnum getOwnLineStyleValue()
Description copied from interface:JRPenIndicates the line style used for this pen.- Specified by:
getOwnLineStyleValuein interfaceJRPen- Returns:
- a value representing one of the line style constants in
LineStyleEnum
-
setLineStyle
public void setLineStyle(LineStyleEnum lineStyleValue)
Description copied from interface:JRPenSpecifies the line style.- Specified by:
setLineStylein interfaceJRPen- Parameters:
lineStyleValue- a value representing one of the line style constants inLineStyleEnum
-
getLineColor
public java.awt.Color getLineColor()
Description copied from interface:JRPenGets the line color.- Specified by:
getLineColorin interfaceJRPen
-
getOwnLineColor
public java.awt.Color getOwnLineColor()
- Specified by:
getOwnLineColorin interfaceJRPen
-
setLineColor
public void setLineColor(java.awt.Color lineColor)
Description copied from interface:JRPenSets the line color.- Specified by:
setLineColorin interfaceJRPen
-
getStyleNameReference
public java.lang.String getStyleNameReference()
-
clone
public JRPen clone(JRPenContainer penContainer)
-
getEventSupport
public JRPropertyChangeSupport 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
public boolean isIdentical(java.lang.Object object)
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
-
-