|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectorg.jfree.chart.plot.Plot
org.jfree.chart.plot.CompassPlot
A specialised plot that draws a compass to indicate a direction based on the value from a
ValueDataset
.
Field Summary | |
static java.awt.Font |
DEFAULT_LABEL_FONT
The default label font. |
protected static java.util.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. |
Fields inherited from class org.jfree.chart.plot.Plot |
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 Summary | |
CompassPlot()
Default constructor. |
|
CompassPlot(ValueDataset dataset)
Constructs a new compass plot. |
Method Summary | |
void |
addData(ValueDataset data)
Adds a dataset to the compass. |
void |
addData(ValueDataset data,
MeterNeedle needle)
Adds a dataset to the compass. |
java.lang.Object |
clone()
Returns a clone of the annotation. |
void |
draw(java.awt.Graphics2D g2,
java.awt.geom.Rectangle2D plotArea,
PlotState parentState,
PlotRenderingInfo info)
Draws the plot on a Java 2D graphics device (such as the screen or a printer). |
boolean |
equals(java.lang.Object obj)
Tests an object for equality with this plot. |
protected java.awt.Font |
getCompassFont(int radius)
Returns the font for the compass. |
ValueDataset[] |
getData()
Returns the dataset. |
boolean |
getDrawBorder()
Returns a flag that controls whether or not a border is drawn. |
java.awt.Font |
getLabelFont()
Returns the label font. |
int |
getLabelType()
Returns the label type. |
LegendItemCollection |
getLegendItems()
Returns the legend items for the plot. |
java.lang.String |
getPlotType()
Returns a short string describing the type of plot. |
double |
getRevolutionDistance()
Gets the count to complete one revolution. |
void |
setDrawBorder(boolean status)
Sets a flag that controls whether or not a border is drawn. |
void |
setLabelFont(java.awt.Font font)
Sets the label font. |
void |
setLabelType(int type)
Sets the label type. |
void |
setRevolutionDistance(double size)
Sets the count to complete one revolution. |
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. |
void |
setSeriesOutlinePaint(int series,
java.awt.Paint p)
Sets the series outline paint. |
void |
setSeriesOutlineStroke(int series,
java.awt.Stroke stroke)
Sets the series outline stroke. |
void |
setSeriesPaint(int series,
java.awt.Paint paint)
Sets the series paint. |
void |
zoom(double percent)
No zooming is implemented for compass plot, so this method is empty. |
Methods inherited from class java.lang.Object |
finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
public static final java.awt.Font DEFAULT_LABEL_FONT
public static final int NO_LABELS
public static final int VALUE_LABELS
protected static java.util.ResourceBundle localizationResources
protected double revolutionDistance
Constructor Detail |
public CompassPlot()
public CompassPlot(ValueDataset dataset)
dataset
- the dataset for the plot.Method Detail |
public int getLabelType()
public void setLabelType(int type)
Valid types are defined by the following constants: NO_LABELS, VALUE_LABELS.
type
- the type.public java.awt.Font getLabelFont()
public void setLabelFont(java.awt.Font font)
Notifies registered listeners that the plot has been changed.
font
- the new label font.public boolean getDrawBorder()
public void setDrawBorder(boolean status)
status
- the flag status.public void setSeriesPaint(int series, java.awt.Paint paint)
series
- the series index.paint
- the paint.public void setSeriesOutlinePaint(int series, java.awt.Paint p)
series
- the series index.p
- the paint.public void setSeriesOutlineStroke(int series, java.awt.Stroke stroke)
series
- the series index.stroke
- the stroke.public void setSeriesNeedle(int type)
type
- the type.public void setSeriesNeedle(int index, int type)
index
- the series index.type
- the needle type.public void setSeriesNeedle(int index, MeterNeedle needle)
index
- the series index.needle
- the needle.public ValueDataset[] getData()
Provided for convenience.
public void addData(ValueDataset data)
data
- the new dataset.public void addData(ValueDataset data, MeterNeedle needle)
data
- the new dataset.needle
- the needle.public void draw(java.awt.Graphics2D g2, java.awt.geom.Rectangle2D plotArea, PlotState parentState, PlotRenderingInfo info)
draw
in class Plot
g2
- the graphics device.plotArea
- the area within which the plot should be drawn.parentState
- the state from the parent plot, if there is one.info
- collects info about the drawing.public java.lang.String getPlotType()
getPlotType
in class Plot
public LegendItemCollection getLegendItems()
getLegendItems
in interface LegendItemSource
getLegendItems
in class Plot
public void zoom(double percent)
zoom
in class Plot
percent
- the zoom amount.protected java.awt.Font getCompassFont(int radius)
radius
- the radius.
public boolean equals(java.lang.Object obj)
equals
in class Plot
obj
- the object (null
permitted).
public java.lang.Object clone() throws java.lang.CloneNotSupportedException
clone
in class Plot
java.lang.CloneNotSupportedException
- this class will not throw this exception, but subclasses
(if any) might.public void setRevolutionDistance(double size)
size
- the count to complete one revolution.public double getRevolutionDistance()
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |