public class CompassPlot extends Plot implements Cloneable, Serializable
ValueDataset
.Modifier and Type | Field and Description |
---|---|
static Font |
DEFAULT_LABEL_FONT
The default label font.
|
static int |
NO_LABELS
A constant for the label type.
|
static int |
VALUE_LABELS
A constant for the label type.
|
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 |
---|
CompassPlot()
Default constructor.
|
CompassPlot(ValueDataset dataset)
Constructs a new compass plot.
|
Modifier and Type | Method and Description |
---|---|
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.
|
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.
|
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
public static final Font DEFAULT_LABEL_FONT
public static final int NO_LABELS
public static final int VALUE_LABELS
public CompassPlot()
public CompassPlot(ValueDataset dataset)
dataset
- the dataset for the plot (null
permitted).public int getLabelType()
NO_LABELS
and VALUE_LABELS
.setLabelType(int)
public void setLabelType(int type)
NO_LABELS
or VALUE_LABELS
.type
- the type.getLabelType()
public Font getLabelFont()
setLabelFont(Font)
public void setLabelFont(Font font)
PlotChangeEvent
to all
registered listeners.font
- the new label font.getLabelFont()
public Paint getRosePaint()
null
).setRosePaint(Paint)
public void setRosePaint(Paint paint)
PlotChangeEvent
to all registered listeners.paint
- the paint (null
not permitted).getRosePaint()
public Paint getRoseCenterPaint()
null
).setRoseCenterPaint(Paint)
public void setRoseCenterPaint(Paint paint)
PlotChangeEvent
to all registered listeners.paint
- the paint (null
not permitted).getRoseCenterPaint()
public Paint getRoseHighlightPaint()
null
).setRoseHighlightPaint(Paint)
public void setRoseHighlightPaint(Paint paint)
PlotChangeEvent
to all registered listeners.paint
- the paint (null
not permitted).getRoseHighlightPaint()
public boolean getDrawBorder()
setDrawBorder(boolean)
public void setDrawBorder(boolean status)
status
- the flag status.getDrawBorder()
public void setSeriesPaint(int series, Paint paint)
series
- the series index.paint
- the paint.setSeriesOutlinePaint(int, Paint)
public void setSeriesOutlinePaint(int series, Paint p)
series
- the series index.p
- the paint.setSeriesPaint(int, Paint)
public void setSeriesOutlineStroke(int series, Stroke stroke)
series
- the series index.stroke
- the stroke.setSeriesOutlinePaint(int, Paint)
public void setSeriesNeedle(int type)
type
- the type.setSeriesNeedle(int, int)
public void setSeriesNeedle(int index, int type)
ArrowNeedle
;LineNeedle
;LongNeedle
;PinNeedle
;PlumNeedle
;PointerNeedle
;ShipNeedle
;WindNeedle
;ArrowNeedle
;MiddlePinNeedle
;index
- the series index.type
- the needle type.setSeriesNeedle(int)
public void setSeriesNeedle(int index, MeterNeedle needle)
PlotChangeEvent
to all
registered listeners.index
- the series index.needle
- the needle.public ValueDataset[] getDatasets()
addDataset(ValueDataset)
public void addDataset(ValueDataset dataset)
dataset
- the new dataset (null
ignored).addDataset(ValueDataset, MeterNeedle)
public void addDataset(ValueDataset dataset, MeterNeedle needle)
dataset
- the new dataset (null
ignored).needle
- the needle (null
permitted).public void draw(Graphics2D g2, Rectangle2D area, Point2D anchor, PlotState parentState, PlotRenderingInfo info)
public String getPlotType()
getPlotType
in class Plot
public LegendItemCollection getLegendItems()
getLegendItems
in interface LegendItemSource
getLegendItems
in class Plot
public void zoom(double percent)
public boolean equals(Object obj)
public Object clone() throws CloneNotSupportedException
clone
in interface org.jfree.util.PublicCloneable
clone
in class Plot
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.getRevolutionDistance()
public double getRevolutionDistance()
setRevolutionDistance(double)
Jas4pp 1.5 © Java Analysis Studio for Particle Physics