org.jfree.chart.plot
public class CompassPlot extends Plot implements Cloneable, Serializable
Field Summary | |
---|---|
static Font | DEFAULT_LABEL_FONT The default label font. |
protected static ResourceBundle | localizationResources The resourceBundle for the localization. |
static int | NO_LABELS A constant for the label type. |
protected double | revolutionDistance
The count to complete one revolution. |
static int | VALUE_LABELS A constant for the label type. |
Constructor Summary | |
---|---|
CompassPlot()
Default constructor. | |
CompassPlot(ValueDataset dataset)
Constructs a new compass plot.
|
Method Summary | |
---|---|
void | addDataset(ValueDataset dataset)
Adds a dataset to the compass.
|
void | addDataset(ValueDataset dataset, MeterNeedle needle)
Adds a dataset to the compass.
|
Object | clone()
Returns a clone of the 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 an object for equality with this plot.
|
protected Font | getCompassFont(int radius)
Returns the font for the compass, adjusted for the size of the plot.
|
ValueDataset[] | getDatasets()
Returns an array of dataset references for the plot.
|
boolean | getDrawBorder()
Returns a flag that controls whether or not a border is drawn.
|
Font | getLabelFont()
Returns the label font.
|
int | getLabelType()
Returns the label type. |
LegendItemCollection | getLegendItems()
Returns the legend items for the plot. |
String | getPlotType()
Returns a short string describing the type of plot.
|
double | getRevolutionDistance()
Gets the count to complete one revolution.
|
Paint | getRoseCenterPaint()
Returns the paint used to fill the inner background area of the
compass.
|
Paint | getRoseHighlightPaint()
Returns the paint used to draw the circles, symbols and labels on the
compass.
|
Paint | getRosePaint()
Returns the paint used to fill the outer circle of the compass.
|
void | setDrawBorder(boolean status)
Sets a flag that controls whether or not a border is drawn.
|
void | setLabelFont(Font font)
Sets the label font and sends a PlotChangeEvent to all
registered listeners.
|
void | setLabelType(int type)
Sets the label type (either NO_LABELS or VALUE_LABELS.
|
void | setRevolutionDistance(double size)
Sets the count to complete one revolution. |
void | setRoseCenterPaint(Paint paint)
Sets the paint used to fill the inner background area of the compass,
and sends a PlotChangeEvent to all registered listeners.
|
void | setRoseHighlightPaint(Paint paint)
Sets the paint used to draw the circles, symbols and labels of the
compass, and sends a PlotChangeEvent to all registered listeners.
|
void | setRosePaint(Paint paint)
Sets the paint used to fill the outer circle of the compass,
and sends a PlotChangeEvent to all registered listeners.
|
void | setSeriesNeedle(int type)
Sets the needle type.
|
void | setSeriesNeedle(int index, int type)
Sets the needle for a series. |
void | setSeriesNeedle(int index, MeterNeedle needle)
Sets the needle for a series and sends a PlotChangeEvent to all
registered listeners.
|
void | setSeriesOutlinePaint(int series, Paint p)
Sets the series outline paint.
|
void | setSeriesOutlineStroke(int series, Stroke stroke)
Sets the series outline stroke.
|
void | setSeriesPaint(int series, Paint paint)
Sets the series paint.
|
void | zoom(double percent)
No zooming is implemented for compass plot, so this method is empty.
|
Parameters: dataset the dataset for the plot (null
permitted).
Parameters: dataset the new dataset (null
ignored).
See Also: CompassPlot
Parameters: dataset the new dataset (null
ignored). needle the needle (null
permitted).
Returns: A clone.
Throws: CloneNotSupportedException this class will not throw this exception, but subclasses (if any) might.
Parameters: g2 the graphics device. area the area within which the plot should be drawn. anchor the anchor point (null
permitted). parentState the state from the parent plot, if there is one. info collects info about the drawing.
Parameters: obj the object (null
permitted).
Returns: A boolean.
Parameters: radius the radius.
Returns: The font.
Returns: The dataset for the plot, cast as a ValueDataset.
See Also: addDataset
Returns: The flag.
See Also: CompassPlot
Returns: The label font.
See Also: setLabelFont
Returns: The label type.
See Also: CompassPlot
Returns: The legend items.
Returns: A string describing the plot.
Returns: The count to complete one revolution.
See Also: CompassPlot
Returns: The paint (never null
).
See Also: setRoseCenterPaint
Returns: The paint (never null
).
See Also: setRoseHighlightPaint
Returns: The paint (never null
).
See Also: setRosePaint
Parameters: status the flag status.
See Also: getDrawBorder
Parameters: font the new label font.
See Also: getLabelFont
Parameters: type the type.
See Also: getLabelType
Parameters: size the count to complete one revolution.
See Also: getRevolutionDistance
Parameters: paint the paint (null
not permitted).
See Also: getRoseCenterPaint
Parameters: paint the paint (null
not permitted).
See Also: getRoseHighlightPaint
Parameters: paint the paint (null
not permitted).
See Also: getRosePaint
Parameters: type the type.
See Also: CompassPlot
Parameters: index the series index. type the needle type.
See Also: CompassPlot
Parameters: index the series index. needle the needle.
Parameters: series the series index. p the paint.
See Also: CompassPlot
Parameters: series the series index. stroke the stroke.
See Also: CompassPlot
Parameters: series the series index. paint the paint.
See Also: CompassPlot
Parameters: percent the zoom amount.