org.jfree.chart
Class DefaultShapeFactory

java.lang.Object
  |
  +--org.jfree.chart.DefaultShapeFactory
All Implemented Interfaces:
ShapeFactory

public class DefaultShapeFactory
extends java.lang.Object
implements ShapeFactory

Default provider of shapes for indicating data points on a Plot.

Author:
Jeremy Bowman

Constructor Summary
DefaultShapeFactory()
           
 
Method Summary
 java.awt.Shape getShape(int series, int item, double x, double y, double scale)
          Returns a Shape that can be used in plotting data.
 java.awt.Shape getShape(int series, java.lang.Object category, double x, double y, double scale)
          Returns a Shape that can be used in plotting data.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

DefaultShapeFactory

public DefaultShapeFactory()
Method Detail

getShape

public java.awt.Shape getShape(int series,
                               int item,
                               double x,
                               double y,
                               double scale)
Returns a Shape that can be used in plotting data. Used in XYPlots.

Specified by:
getShape in interface ShapeFactory
Parameters:
series - number of series.
item - index of the item. Not used, i.e. redundant..
x - the centered x position of the shape.
y - the centered y position of the shape.
scale - the size of the shape (width and height, radius).
Returns:
a square for series == 0, a circle otherwise.

getShape

public java.awt.Shape getShape(int series,
                               java.lang.Object category,
                               double x,
                               double y,
                               double scale)
Returns a Shape that can be used in plotting data. Used in CategoryPlots.

Specified by:
getShape in interface ShapeFactory
Parameters:
series - number of series. Not used, i.e. redundant.
category - the category. Not used, i.e. redundant.
x - the centered x position of the shape.
y - the centered y position of the shape.
scale - the size of the shape (width and height, radius).
Returns:
a circle with the radius scale centered at (x,y).