org.pentaho.chart.plugin.jfreechart.utils
Class StrokeFactory

java.lang.Object
  extended by org.pentaho.chart.plugin.jfreechart.utils.StrokeFactory

public class StrokeFactory
extends Object

This class provides a BasicStroke object that implements border-style/line-style and line-width. Author: Ravi Hasija Date: May 12, 2008 Time: 12:18:40 PM


Method Summary
 Object clone()
          Overriding Object class's clone method so that clone() is not supported.
 BasicStroke getBorderStroke(ChartElement element)
          Returns a basic stroke object that implements the border-style and border-width style keys.
static StrokeFactory getInstance()
          Returns a singleton StrokeFactory object.
 BasicStroke getLineStroke(ChartElement element)
          Returns a basic stroke object that implements the line-style and line-width style keys.
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Method Detail

getInstance

public static StrokeFactory getInstance()
Returns a singleton StrokeFactory object.

Returns:
StrokeFactory Returns a singleton object of this class.

clone

public Object clone()
             throws CloneNotSupportedException
Overriding Object class's clone method so that clone() is not supported.

Overrides:
clone in class Object
Returns:
Throws CloneNotSupportedException and returns nothing.
Throws:
CloneNotSupportedException

getBorderStroke

public BasicStroke getBorderStroke(ChartElement element)
Returns a basic stroke object that implements the border-style and border-width style keys. NOTE: We do not support separate borders for top, bottom, left and right side of the bar. So we accept the first value and implement it for border-style and border-width.

Parameters:
element - The current series element
Returns:
BasicStroke The basic stroke object that implements the boder-style and boder-width.

getLineStroke

public BasicStroke getLineStroke(ChartElement element)
Returns a basic stroke object that implements the line-style and line-width style keys.

Parameters:
element - The current series element
Returns:
BasicStroke The basic stroke object that implements the line-style and line-width.