ReportMill 11 API

com.reportmill.shape.fill
Class RMStroke

java.lang.Object
  extended by com.reportmill.shape.fill.RMFill
      extended by com.reportmill.shape.fill.RMStroke
All Implemented Interfaces:
java.lang.Cloneable

public class RMStroke
extends RMFill

An RMFill subclass specifically designed to describe strokes.


Constructor Summary
RMStroke()
          Creates a plain, black stroke.
RMStroke(RMColor aColor, float aStrokeWidth)
          Creates a stroke with the given color and line width.
 
Method Summary
 RMStroke clone()
          Standard clone implementation.
 boolean equals(java.lang.Object anObj)
          Standard equals implementation.
 java.lang.Object fromXML(com.reportmill.archiver.RXArchiver anArchiver, com.reportmill.archiver.RXElement anElement, java.lang.Object anOwner)
          XML unarchival.
 RMRect getBounds(RMShape aShape, RMRect pathBounds)
          Returns the bounds required to render this fill for this shape.
 float[] getDashArray()
          Returns the dash array for this stroke.
static float[] getDashArray(java.lang.String aString, java.lang.String aDelimeter)
          Returns a dash array for given dash array string and delimeter.
 java.lang.String getDashArrayString()
          Returns the dash array for this stroke as a string.
static java.lang.String getDashArrayString(float[] dashArray, java.lang.String aDelimiter)
          Returns the dash array for this stroke as a string.
 float getDashPhase()
          Returns the dash phase.
 float getLineWidth()
          Returns the line width of this stroke.
 java.lang.String getName()
          Returns the name of the fill.
 java.awt.Shape getStrokePath(RMShape aShape)
          Returns the path to be stroked, transformed from the input path.
 void paint(com.reportmill.shape.RMShapePainter sp, java.awt.Graphics2D g, RMShape aShape)
          Render this fill in a Java2D Graphics2D.
 void setColor(RMColor aColor)
          Overrides fill version to clear java 2d stroke.
 void setDashArray(float[] anArray)
          Sets the dash array for this stroke.
 void setDashArrayString(java.lang.String aString)
          Sets the dash array for this stroke from a string.
 void setDashPhase(float aValue)
          Sets the dash phase.
 void setLineWidth(float aValue)
          Sets the line width of this stroke.
 com.reportmill.archiver.RXElement toXML(com.reportmill.archiver.RXArchiver anArchiver, java.lang.Object anOwner)
          XML archival.
 
Methods inherited from class com.reportmill.shape.fill.RMFill
deriveFill, getColor, hasAlpha
 
Methods inherited from class java.lang.Object
getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

RMStroke

public RMStroke()
Creates a plain, black stroke.


RMStroke

public RMStroke(RMColor aColor,
                float aStrokeWidth)
Creates a stroke with the given color and line width.

Method Detail

getLineWidth

public float getLineWidth()
Returns the line width of this stroke.


setLineWidth

public void setLineWidth(float aValue)
Sets the line width of this stroke.


getDashArray

public float[] getDashArray()
Returns the dash array for this stroke.


setDashArray

public void setDashArray(float[] anArray)
Sets the dash array for this stroke.


getDashArrayString

public java.lang.String getDashArrayString()
Returns the dash array for this stroke as a string.


setDashArrayString

public void setDashArrayString(java.lang.String aString)
Sets the dash array for this stroke from a string.


getDashArray

public static float[] getDashArray(java.lang.String aString,
                                   java.lang.String aDelimeter)
Returns a dash array for given dash array string and delimeter.


getDashArrayString

public static java.lang.String getDashArrayString(float[] dashArray,
                                                  java.lang.String aDelimiter)
Returns the dash array for this stroke as a string.


getDashPhase

public float getDashPhase()
Returns the dash phase.


setDashPhase

public void setDashPhase(float aValue)
Sets the dash phase.


setColor

public void setColor(RMColor aColor)
Overrides fill version to clear java 2d stroke.

Overrides:
setColor in class RMFill

getStrokePath

public java.awt.Shape getStrokePath(RMShape aShape)
Returns the path to be stroked, transformed from the input path.


getBounds

public RMRect getBounds(RMShape aShape,
                        RMRect pathBounds)
Returns the bounds required to render this fill for this shape.

Overrides:
getBounds in class RMFill

paint

public void paint(com.reportmill.shape.RMShapePainter sp,
                  java.awt.Graphics2D g,
                  RMShape aShape)
Render this fill in a Java2D Graphics2D.

Overrides:
paint in class RMFill

getName

public java.lang.String getName()
Returns the name of the fill.

Overrides:
getName in class RMFill

equals

public boolean equals(java.lang.Object anObj)
Standard equals implementation.

Overrides:
equals in class RMFill

clone

public RMStroke clone()
Standard clone implementation.

Overrides:
clone in class RMFill

toXML

public com.reportmill.archiver.RXElement toXML(com.reportmill.archiver.RXArchiver anArchiver,
                                               java.lang.Object anOwner)
XML archival.

Overrides:
toXML in class RMFill

fromXML

public java.lang.Object fromXML(com.reportmill.archiver.RXArchiver anArchiver,
                                com.reportmill.archiver.RXElement anElement,
                                java.lang.Object anOwner)
XML unarchival.

Overrides:
fromXML in class RMFill

ReportMill 11 API