public class SpiderWebPlot extends Plot implements Cloneable, Serializable
CategoryDataset
in the form of a
"spider web". Multiple series can be plotted on the same axis to allow
easy comparison. This plot doesn't support negative values at present.Modifier and Type | Field and Description |
---|---|
static double |
DEFAULT_AXIS_LABEL_GAP
The default axis label gap (currently 10%).
|
static double |
DEFAULT_HEAD
The default head radius percent (currently 1%).
|
static double |
DEFAULT_INTERIOR_GAP
The default interior gap.
|
static Paint |
DEFAULT_LABEL_BACKGROUND_PAINT
The default series label background paint.
|
static Font |
DEFAULT_LABEL_FONT
The default series label font.
|
static Paint |
DEFAULT_LABEL_OUTLINE_PAINT
The default series label outline paint.
|
static Stroke |
DEFAULT_LABEL_OUTLINE_STROKE
The default series label outline stroke.
|
static Paint |
DEFAULT_LABEL_PAINT
The default series label paint.
|
static Paint |
DEFAULT_LABEL_SHADOW_PAINT
The default series label shadow paint.
|
static double |
DEFAULT_MAX_VALUE
The default maximum value plotted - forces the plot to evaluate
the maximum from the data passed in
|
static double |
DEFAULT_START_ANGLE
The default starting angle for the radar chart axes.
|
static double |
MAX_INTERIOR_GAP
The maximum interior gap (currently 40%).
|
DEFAULT_BACKGROUND_ALPHA, DEFAULT_BACKGROUND_PAINT, DEFAULT_FOREGROUND_ALPHA, DEFAULT_INSETS, DEFAULT_LEGEND_ITEM_BOX, DEFAULT_LEGEND_ITEM_CIRCLE, DEFAULT_OUTLINE_PAINT, DEFAULT_OUTLINE_STROKE, MINIMUM_HEIGHT_TO_DRAW, MINIMUM_WIDTH_TO_DRAW, ZERO
Constructor and Description |
---|
SpiderWebPlot()
Creates a default plot with no dataset.
|
SpiderWebPlot(CategoryDataset dataset)
Creates a new spider web plot with the given dataset, with each row
representing a series.
|
SpiderWebPlot(CategoryDataset dataset,
org.jfree.util.TableOrder extract)
Creates a new spider web plot with the given dataset.
|
Modifier and Type | Method and Description |
---|---|
Object |
clone()
Returns a clone of this plot.
|
void |
draw(Graphics2D g2,
Rectangle2D area,
Point2D anchor,
PlotState parentState,
PlotRenderingInfo info)
Draws the plot on a Java 2D graphics device (such as the screen or a
printer).
|
boolean |
equals(Object obj)
Tests this plot for equality with an arbitrary object.
|
double |
getAxisLabelGap()
Returns the axis label gap.
|
Paint |
getAxisLinePaint()
Returns the paint used to draw the axis lines.
|
Stroke |
getAxisLineStroke()
Returns the stroke used to draw the axis lines.
|
Paint |
getBaseSeriesOutlinePaint()
Returns the base series paint.
|
Stroke |
getBaseSeriesOutlineStroke()
Returns the base series stroke.
|
Paint |
getBaseSeriesPaint()
Returns the base series paint.
|
org.jfree.util.TableOrder |
getDataExtractOrder()
Returns the data extract order (by row or by column).
|
CategoryDataset |
getDataset()
Returns the dataset.
|
org.jfree.util.Rotation |
getDirection()
Returns the direction in which the radar axes are drawn
(clockwise or anti-clockwise).
|
double |
getHeadPercent()
Returns the head percent.
|
double |
getInteriorGap()
Returns the interior gap, measured as a percentage of the available
drawing space.
|
Font |
getLabelFont()
Returns the series label font.
|
CategoryItemLabelGenerator |
getLabelGenerator()
Returns the label generator.
|
Paint |
getLabelPaint()
Returns the series label paint.
|
LegendItemCollection |
getLegendItems()
Returns a collection of legend items for the spider web chart.
|
Shape |
getLegendItemShape()
Returns the shape used for legend items.
|
double |
getMaxValue()
Returns the maximum value any category axis can take.
|
String |
getPlotType()
Returns a short string describing the type of plot.
|
Paint |
getSeriesOutlinePaint()
Returns the outline paint for ALL series in the plot.
|
Paint |
getSeriesOutlinePaint(int series)
Returns the paint for the specified series.
|
Stroke |
getSeriesOutlineStroke()
Returns the outline stroke for ALL series in the plot.
|
Stroke |
getSeriesOutlineStroke(int series)
Returns the stroke for the specified series.
|
Paint |
getSeriesPaint()
Returns the paint for ALL series in the plot.
|
Paint |
getSeriesPaint(int series)
Returns the paint for the specified series.
|
double |
getStartAngle()
Returns the start angle for the first radar axis.
|
CategoryToolTipGenerator |
getToolTipGenerator()
Returns the tool tip generator for the plot.
|
CategoryURLGenerator |
getURLGenerator()
Returns the URL generator for the plot.
|
boolean |
isWebFilled()
Method to determine if the web chart is to be filled.
|
void |
setAxisLabelGap(double gap)
Sets the axis label gap and sends a
PlotChangeEvent to all
registered listeners. |
void |
setAxisLinePaint(Paint paint)
Sets the paint used to draw the axis lines and sends a
PlotChangeEvent to all registered listeners. |
void |
setAxisLineStroke(Stroke stroke)
Sets the stroke used to draw the axis lines and sends a
PlotChangeEvent to all registered listeners. |
void |
setBaseSeriesOutlinePaint(Paint paint)
Sets the base series paint.
|
void |
setBaseSeriesOutlineStroke(Stroke stroke)
Sets the base series stroke.
|
void |
setBaseSeriesPaint(Paint paint)
Sets the base series paint.
|
void |
setDataExtractOrder(org.jfree.util.TableOrder order)
Sets the data extract order (by row or by column) and sends a
PlotChangeEvent to all registered listeners. |
void |
setDataset(CategoryDataset dataset)
Sets the dataset used by the plot and sends a
PlotChangeEvent
to all registered listeners. |
void |
setDirection(org.jfree.util.Rotation direction)
Sets the direction in which the radar axes are drawn and sends a
PlotChangeEvent to all registered listeners. |
void |
setHeadPercent(double percent)
Sets the head percent and sends a
PlotChangeEvent to all
registered listeners. |
void |
setInteriorGap(double percent)
Sets the interior gap and sends a
PlotChangeEvent to all
registered listeners. |
void |
setLabelFont(Font font)
Sets the series label font and sends a
PlotChangeEvent to all
registered listeners. |
void |
setLabelGenerator(CategoryItemLabelGenerator generator)
Sets the label generator and sends a
PlotChangeEvent to all
registered listeners. |
void |
setLabelPaint(Paint paint)
Sets the series label paint and sends a
PlotChangeEvent to all
registered listeners. |
void |
setLegendItemShape(Shape shape)
Sets the shape used for legend items and sends a
PlotChangeEvent
to all registered listeners. |
void |
setMaxValue(double value)
Sets the maximum value any category axis can take and sends
a
PlotChangeEvent to all registered listeners. |
void |
setSeriesOutlinePaint(int series,
Paint paint)
Sets the paint used to fill a series of the radar and sends a
PlotChangeEvent to all registered listeners. |
void |
setSeriesOutlinePaint(Paint paint)
Sets the outline paint for ALL series in the plot.
|
void |
setSeriesOutlineStroke(int series,
Stroke stroke)
Sets the stroke used to fill a series of the radar and sends a
PlotChangeEvent to all registered listeners. |
void |
setSeriesOutlineStroke(Stroke stroke)
Sets the outline stroke for ALL series in the plot.
|
void |
setSeriesPaint(int series,
Paint paint)
Sets the paint used to fill a series of the radar and sends a
PlotChangeEvent to all registered listeners. |
void |
setSeriesPaint(Paint paint)
Sets the paint for ALL series in the plot.
|
void |
setStartAngle(double angle)
Sets the starting angle and sends a
PlotChangeEvent to all
registered listeners. |
void |
setToolTipGenerator(CategoryToolTipGenerator generator)
Sets the tool tip generator for the plot and sends a
PlotChangeEvent to all registered listeners. |
void |
setURLGenerator(CategoryURLGenerator generator)
Sets the URL generator for the plot and sends a
PlotChangeEvent to all registered listeners. |
void |
setWebFilled(boolean flag)
Sets the webFilled flag and sends a
PlotChangeEvent to all
registered listeners. |
addChangeListener, annotationChanged, axisChanged, datasetChanged, drawBackground, drawBackgroundImage, drawOutline, getBackgroundAlpha, getBackgroundImage, getBackgroundImageAlignment, getBackgroundImageAlpha, getBackgroundPaint, getDatasetGroup, getDrawingSupplier, getForegroundAlpha, getInsets, getNoDataMessage, getNoDataMessageFont, getNoDataMessagePaint, getOutlinePaint, getOutlineStroke, getParent, getRootPlot, handleClick, isNotify, isOutlineVisible, isSubplot, markerChanged, notifyListeners, removeChangeListener, resolveDomainAxisLocation, resolveRangeAxisLocation, setBackgroundAlpha, setBackgroundImage, setBackgroundImageAlignment, setBackgroundImageAlpha, setBackgroundPaint, setDrawingSupplier, setDrawingSupplier, setForegroundAlpha, setInsets, setInsets, setNoDataMessage, setNoDataMessageFont, setNoDataMessagePaint, setNotify, setOutlinePaint, setOutlineStroke, setOutlineVisible, setParent, zoom
public static final double DEFAULT_HEAD
public static final double DEFAULT_AXIS_LABEL_GAP
public static final double DEFAULT_INTERIOR_GAP
public static final double MAX_INTERIOR_GAP
public static final double DEFAULT_START_ANGLE
public static final Font DEFAULT_LABEL_FONT
public static final Paint DEFAULT_LABEL_PAINT
public static final Paint DEFAULT_LABEL_BACKGROUND_PAINT
public static final Paint DEFAULT_LABEL_OUTLINE_PAINT
public static final Stroke DEFAULT_LABEL_OUTLINE_STROKE
public static final Paint DEFAULT_LABEL_SHADOW_PAINT
public static final double DEFAULT_MAX_VALUE
public SpiderWebPlot()
public SpiderWebPlot(CategoryDataset dataset)
dataset
- the dataset (null
permitted).public SpiderWebPlot(CategoryDataset dataset, org.jfree.util.TableOrder extract)
dataset
- the dataset.extract
- controls how data is extracted (TableOrder.BY_ROW
or TableOrder.BY_COLUMN
).public String getPlotType()
getPlotType
in class Plot
public CategoryDataset getDataset()
null
).setDataset(CategoryDataset)
public void setDataset(CategoryDataset dataset)
PlotChangeEvent
to all registered listeners.dataset
- the dataset (null
permitted).getDataset()
public boolean isWebFilled()
setWebFilled(boolean)
public void setWebFilled(boolean flag)
PlotChangeEvent
to all
registered listeners.flag
- the flag.isWebFilled()
public org.jfree.util.TableOrder getDataExtractOrder()
null
).setDataExtractOrder(TableOrder)
public void setDataExtractOrder(org.jfree.util.TableOrder order)
PlotChangeEvent
to all registered listeners.order
- the order (null
not permitted).IllegalArgumentException
- if order
is
null
.getDataExtractOrder()
public double getHeadPercent()
setHeadPercent(double)
public void setHeadPercent(double percent)
PlotChangeEvent
to all
registered listeners.percent
- the percent.getHeadPercent()
public double getStartAngle()
setStartAngle(double)
public void setStartAngle(double angle)
PlotChangeEvent
to all
registered listeners.
The initial default value is 90 degrees, which corresponds to 12 o'clock. A value of zero corresponds to 3 o'clock... this is the encoding used by Java's Arc2D class.
angle
- the angle (in degrees).getStartAngle()
public double getMaxValue()
setMaxValue(double)
public void setMaxValue(double value)
PlotChangeEvent
to all registered listeners.value
- the maximum value.getMaxValue()
public org.jfree.util.Rotation getDirection()
null
).setDirection(Rotation)
public void setDirection(org.jfree.util.Rotation direction)
PlotChangeEvent
to all registered listeners.direction
- the direction (null
not permitted).getDirection()
public double getInteriorGap()
setInteriorGap(double)
public void setInteriorGap(double percent)
PlotChangeEvent
to all
registered listeners. This controls the space between the edges of the
plot and the plot area itself (the region where the axis labels appear).percent
- the gap (as a percentage of the available drawing space).getInteriorGap()
public double getAxisLabelGap()
setAxisLabelGap(double)
public void setAxisLabelGap(double gap)
PlotChangeEvent
to all
registered listeners.gap
- the gap.getAxisLabelGap()
public Paint getAxisLinePaint()
null
).setAxisLinePaint(Paint)
,
getAxisLineStroke()
public void setAxisLinePaint(Paint paint)
PlotChangeEvent
to all registered listeners.paint
- the paint (null
not permitted).getAxisLinePaint()
public Stroke getAxisLineStroke()
null
).setAxisLineStroke(Stroke)
,
getAxisLinePaint()
public void setAxisLineStroke(Stroke stroke)
PlotChangeEvent
to all registered listeners.stroke
- the stroke (null
not permitted).getAxisLineStroke()
public Paint getSeriesPaint()
null
).setSeriesPaint(Paint)
public void setSeriesPaint(Paint paint)
null
, then a list of paints is used instead (to allow different
colors to be used for each series of the radar group).paint
- the paint (null
permitted).getSeriesPaint()
public Paint getSeriesPaint(int series)
series
- the series index (zero-based).null
).setSeriesPaint(int, Paint)
public void setSeriesPaint(int series, Paint paint)
PlotChangeEvent
to all registered listeners.series
- the series index (zero-based).paint
- the paint (null
permitted).getSeriesPaint(int)
public Paint getBaseSeriesPaint()
null
).setBaseSeriesPaint(Paint)
public void setBaseSeriesPaint(Paint paint)
paint
- the paint (null
not permitted).getBaseSeriesPaint()
public Paint getSeriesOutlinePaint()
null
).public void setSeriesOutlinePaint(Paint paint)
null
, then a list of paints is used instead (to allow
different colors to be used for each series).paint
- the paint (null
permitted).public Paint getSeriesOutlinePaint(int series)
series
- the series index (zero-based).null
).public void setSeriesOutlinePaint(int series, Paint paint)
PlotChangeEvent
to all registered listeners.series
- the series index (zero-based).paint
- the paint (null
permitted).public Paint getBaseSeriesOutlinePaint()
null
).public void setBaseSeriesOutlinePaint(Paint paint)
paint
- the paint (null
not permitted).public Stroke getSeriesOutlineStroke()
null
).public void setSeriesOutlineStroke(Stroke stroke)
null
, then a list of paints is used instead (to allow
different colors to be used for each series).stroke
- the stroke (null
permitted).public Stroke getSeriesOutlineStroke(int series)
series
- the series index (zero-based).null
).public void setSeriesOutlineStroke(int series, Stroke stroke)
PlotChangeEvent
to all registered listeners.series
- the series index (zero-based).stroke
- the stroke (null
permitted).public Stroke getBaseSeriesOutlineStroke()
null
).public void setBaseSeriesOutlineStroke(Stroke stroke)
stroke
- the stroke (null
not permitted).public Shape getLegendItemShape()
null
).setLegendItemShape(Shape)
public void setLegendItemShape(Shape shape)
PlotChangeEvent
to all registered listeners.shape
- the shape (null
not permitted).getLegendItemShape()
public Font getLabelFont()
null
).setLabelFont(Font)
public void setLabelFont(Font font)
PlotChangeEvent
to all
registered listeners.font
- the font (null
not permitted).getLabelFont()
public Paint getLabelPaint()
null
).setLabelPaint(Paint)
public void setLabelPaint(Paint paint)
PlotChangeEvent
to all
registered listeners.paint
- the paint (null
not permitted).getLabelPaint()
public CategoryItemLabelGenerator getLabelGenerator()
null
).setLabelGenerator(CategoryItemLabelGenerator)
public void setLabelGenerator(CategoryItemLabelGenerator generator)
PlotChangeEvent
to all
registered listeners.generator
- the generator (null
not permitted).getLabelGenerator()
public CategoryToolTipGenerator getToolTipGenerator()
null
).setToolTipGenerator(CategoryToolTipGenerator)
public void setToolTipGenerator(CategoryToolTipGenerator generator)
PlotChangeEvent
to all registered listeners.generator
- the generator (null
permitted).getToolTipGenerator()
public CategoryURLGenerator getURLGenerator()
null
).setURLGenerator(CategoryURLGenerator)
public void setURLGenerator(CategoryURLGenerator generator)
PlotChangeEvent
to all registered listeners.generator
- the generator (null
permitted).getURLGenerator()
public LegendItemCollection getLegendItems()
getLegendItems
in interface LegendItemSource
getLegendItems
in class Plot
null
).public void draw(Graphics2D g2, Rectangle2D area, Point2D anchor, PlotState parentState, PlotRenderingInfo info)
public boolean equals(Object obj)
public Object clone() throws CloneNotSupportedException
clone
in interface org.jfree.util.PublicCloneable
clone
in class Plot
CloneNotSupportedException
- if the plot cannot be cloned for
any reason.Jas4pp 1.5 © Java Analysis Studio for Particle Physics