Prev Class | Next Class | Frames | No Frames |
Summary: Nested | Field | Method | Constr | Detail: Nested | Field | Method | Constr |
java.lang.Object
org.jfree.chart.plot.Plot
org.jfree.chart.plot.CompassPlot
ValueDataset
.
Field Summary | |
static Font |
|
static int |
|
static int |
|
protected static ResourceBundle |
|
protected double |
|
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 | |
| |
|
Method Summary | |
void |
|
void |
|
Object |
|
void |
|
boolean |
|
protected Font |
|
ValueDataset[] |
|
boolean |
|
Font |
|
int |
|
LegendItemCollection |
|
String |
|
double |
|
Paint |
|
Paint |
|
Paint |
|
void |
|
void |
|
void |
|
void |
|
void |
|
void |
|
void |
|
void |
|
void |
|
void |
|
void |
|
void |
|
void |
|
void |
|
protected static ResourceBundle localizationResources
The resourceBundle for the localization.
protected double revolutionDistance
The count to complete one revolution. Can be arbitrarily set For degrees (the default) it is 360, for radians this is 2*Pi, etc
public CompassPlot(ValueDataset dataset)
Constructs a new compass plot.
- Parameters:
dataset
- the dataset for the plot (null
permitted).
public void addDataset(ValueDataset dataset)
Adds a dataset to the compass.
- Parameters:
dataset
- the new dataset (null
ignored).
- See Also:
addDataset(ValueDataset,MeterNeedle)
public void addDataset(ValueDataset dataset, MeterNeedle needle)
Adds a dataset to the compass.
- Parameters:
dataset
- the new dataset (null
ignored).needle
- the needle (null
permitted).
public Object clone() throws CloneNotSupportedException
Returns a clone of the plot.
- Returns:
- A clone.
public 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).
- 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.
public boolean equals(Object obj)
Tests an object for equality with this plot.
- Parameters:
obj
- the object (null
permitted).
- Returns:
- A boolean.
protected Font getCompassFont(int radius)
Returns the font for the compass, adjusted for the size of the plot.
- Parameters:
radius
- the radius.
- Returns:
- The font.
public ValueDataset[] getDatasets()
Returns an array of dataset references for the plot.
- Returns:
- The dataset for the plot, cast as a ValueDataset.
- See Also:
addDataset(ValueDataset)
public boolean getDrawBorder()
Returns a flag that controls whether or not a border is drawn.
- Returns:
- The flag.
- See Also:
setDrawBorder(boolean)
public Font getLabelFont()
Returns the label font.
- Returns:
- The label font.
- See Also:
setLabelFont(Font)
public int getLabelType()
Returns the label type. Defined by the constants:NO_LABELS
andVALUE_LABELS
.
- Returns:
- The label type.
- See Also:
setLabelType(int)
public LegendItemCollection getLegendItems()
Returns the legend items for the plot. For now, no legend is available - this method returns null.
- Specified by:
- getLegendItems in interface LegendItemSource
- Overrides:
- getLegendItems in interface Plot
- Returns:
- The legend items.
public String getPlotType()
Returns a short string describing the type of plot.
- Overrides:
- getPlotType in interface Plot
- Returns:
- A string describing the plot.
public double getRevolutionDistance()
Gets the count to complete one revolution.
- Returns:
- The count to complete one revolution.
- See Also:
setRevolutionDistance(double)
public Paint getRoseCenterPaint()
Returns the paint used to fill the inner background area of the compass.
- Returns:
- The paint (never
null
).
- See Also:
setRoseCenterPaint(Paint)
public Paint getRoseHighlightPaint()
Returns the paint used to draw the circles, symbols and labels on the compass.
- Returns:
- The paint (never
null
).
- See Also:
setRoseHighlightPaint(Paint)
public Paint getRosePaint()
Returns the paint used to fill the outer circle of the compass.
- Returns:
- The paint (never
null
).
- See Also:
setRosePaint(Paint)
public void setDrawBorder(boolean status)
Sets a flag that controls whether or not a border is drawn.
- Parameters:
status
- the flag status.
- See Also:
getDrawBorder()
public void setLabelFont(Font font)
Sets the label font and sends aPlotChangeEvent
to all registered listeners.
- Parameters:
font
- the new label font.
- See Also:
getLabelFont()
public void setLabelType(int type)
Sets the label type (eitherNO_LABELS
orVALUE_LABELS
.
- Parameters:
type
- the type.
- See Also:
getLabelType()
public void setRevolutionDistance(double size)
Sets the count to complete one revolution. Can be arbitrarily set For degrees (the default) it is 360, for radians this is 2*Pi, etc
- Parameters:
size
- the count to complete one revolution.
- See Also:
getRevolutionDistance()
public void setRoseCenterPaint(Paint paint)
Sets the paint used to fill the inner background area of the compass, and sends aPlotChangeEvent
to all registered listeners.
- Parameters:
paint
- the paint (null
not permitted).
- See Also:
getRoseCenterPaint()
public void setRoseHighlightPaint(Paint paint)
Sets the paint used to draw the circles, symbols and labels of the compass, and sends aPlotChangeEvent
to all registered listeners.
- Parameters:
paint
- the paint (null
not permitted).
- See Also:
getRoseHighlightPaint()
public void setRosePaint(Paint paint)
Sets the paint used to fill the outer circle of the compass, and sends aPlotChangeEvent
to all registered listeners.
- Parameters:
paint
- the paint (null
not permitted).
- See Also:
getRosePaint()
public void setSeriesNeedle(int type)
Sets the needle type.
- Parameters:
type
- the type.
- See Also:
setSeriesNeedle(int,int)
public void setSeriesNeedle(int index, int type)
Sets the needle for a series. The needle type is one of the following:
- 0 =
ArrowNeedle
;- 1 =
LineNeedle
;- 2 =
LongNeedle
;- 3 =
PinNeedle
;- 4 =
PlumNeedle
;- 5 =
PointerNeedle
;- 6 =
ShipNeedle
;- 7 =
WindNeedle
;- 8 =
ArrowNeedle
;- 9 =
MiddlePinNeedle
;
- Parameters:
index
- the series index.type
- the needle type.
- See Also:
setSeriesNeedle(int)
public void setSeriesNeedle(int index, MeterNeedle needle)
Sets the needle for a series and sends aPlotChangeEvent
to all registered listeners.
- Parameters:
index
- the series index.needle
- the needle.
public void setSeriesOutlinePaint(int series, Paint p)
Sets the series outline paint.
- Parameters:
series
- the series index.p
- the paint.
- See Also:
setSeriesPaint(int,Paint)
public void setSeriesOutlineStroke(int series, Stroke stroke)
Sets the series outline stroke.
- Parameters:
series
- the series index.stroke
- the stroke.
- See Also:
setSeriesOutlinePaint(int,Paint)
public void setSeriesPaint(int series, Paint paint)
Sets the series paint.
- Parameters:
series
- the series index.paint
- the paint.
- See Also:
setSeriesOutlinePaint(int,Paint)