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 Details

  • Constructor Details

    • JRBasePen

      public JRBasePen()
    • JRBasePen

      public JRBasePen(JRPenContainer penContainer)
  • Method Details

    • getPenContainer

      public JRPenContainer getPenContainer()
      Specified by:
      getPenContainer in interface JRPen
    • getStyleResolver

      protected StyleResolver getStyleResolver()
    • getLineWidth

      public Float getLineWidth()
      Description copied from interface: JRPen
      Gets the line width used for this pen.
      Specified by:
      getLineWidth in interface JRPen
      Returns:
      line width
    • getOwnLineWidth

      public Float getOwnLineWidth()
      Specified by:
      getOwnLineWidth in interface JRPen
    • setLineWidth

      public void setLineWidth(Float lineWidth)
      Description copied from interface: JRPen
      Sets the line width.
      Specified by:
      setLineWidth in interface JRPen
      Parameters:
      lineWidth - the line width
    • getLineStyle

      public LineStyleEnum getLineStyle()
      Description copied from interface: JRPen
      Indicates the line style used for this pen.
      Specified by:
      getLineStyle in interface JRPen
      Returns:
      a value representing one of the line style constants in LineStyleEnum
    • getOwnLineStyle

      public LineStyleEnum getOwnLineStyle()
      Description copied from interface: JRPen
      Indicates the line style used for this pen.
      Specified by:
      getOwnLineStyle in interface JRPen
      Returns:
      a value representing one of the line style constants in LineStyleEnum
    • setLineStyle

      public void setLineStyle(LineStyleEnum lineStyle)
      Description copied from interface: JRPen
      Specifies the line style.
      Specified by:
      setLineStyle in interface JRPen
      Parameters:
      lineStyle - a value representing one of the line style constants in LineStyleEnum
    • getLineColor

      public Color getLineColor()
      Description copied from interface: JRPen
      Gets the line color.
      Specified by:
      getLineColor in interface JRPen
    • getOwnLineColor

      public Color getOwnLineColor()
      Specified by:
      getOwnLineColor in interface JRPen
    • setLineColor

      public void setLineColor(Color lineColor)
      Description copied from interface: JRPen
      Sets the line color.
      Specified by:
      setLineColor in interface JRPen
    • getStyleNameReference

      public String getStyleNameReference()
    • clone

      public JRPen clone(JRPenContainer penContainer)
      Specified by:
      clone in interface JRPen
    • getEventSupport

      public JRPropertyChangeSupport getEventSupport()
      Description copied from interface: JRChangeEventsSupport
      Returns the property change support object for this instance.
      Specified by:
      getEventSupport in interface JRChangeEventsSupport
      Returns:
      the property change support object for this instance
    • getHashCode

      public int getHashCode()
      Description copied from interface: Deduplicable
      Returns a hash code to be used for the deduplicate map. The returned hash code should be consitent wiwh Deduplicable.isIdentical(Object), i.e. if two objects are identical they should have the same hash code.
      Specified by:
      getHashCode in interface Deduplicable
      Returns:
      deduplication hash code
    • isIdentical

      public boolean isIdentical(Object object)
      Description copied from interface: Deduplicable
      Determines if this instance is identical to another object.
      Specified by:
      isIdentical in interface Deduplicable
      Parameters:
      object - the object to compare with this instance
      Returns:
      true if the two objects are identical and can be deduplicated
    • populateStyle

      public void populateStyle()
      Specified by:
      populateStyle in interface JRPen