|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object | +--com.jrefinery.chart.Plot | +--com.jrefinery.chart.CompassPlot
A compass plot...
Field Summary | |
static java.awt.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. |
Fields inherited from interface com.jrefinery.chart.AxisConstants |
DEFAULT_AXIS_LABEL_FONT, DEFAULT_AXIS_LABEL_INSETS, DEFAULT_AXIS_LABEL_PAINT, DEFAULT_TICK_LABEL_FONT, DEFAULT_TICK_LABEL_INSETS, DEFAULT_TICK_LABEL_PAINT, DEFAULT_TICK_PAINT, DEFAULT_TICK_STROKE |
Constructor Summary | |
CompassPlot()
Default constructor. |
|
CompassPlot(MeterDataset data)
Constructs a new compass plot. |
|
CompassPlot(MeterDataset data,
java.awt.Insets insets,
java.awt.Paint backgroundPaint,
java.awt.Image backgroundImage,
float backgroundAlpha,
java.awt.Stroke outlineStroke,
java.awt.Paint outlinePaint,
float foregroundAlpha)
Constructs a new plot. |
Method Summary | |
void |
addData(MeterDataset data)
Adds a dataset to the compass. |
void |
addData(MeterDataset data,
MeterNeedle needle)
Adds a dataset to the compass. |
void |
draw(java.awt.Graphics2D g2,
java.awt.geom.Rectangle2D plotArea,
ChartRenderingInfo info)
Draws the plot on a Java 2D graphics device (such as the screen or a printer). |
protected java.awt.Font |
getCompassFont(int radius)
Returns the font for the compass. |
MeterDataset[] |
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. |
java.util.List |
getLegendItemLabels()
Deprecated. use getLegendItems(). |
LegendItemCollection |
getLegendItems()
Returns the legend items for the plot. |
java.lang.String |
getPlotType()
Returns a short string describing the type of plot. |
boolean |
isCompatibleHorizontalAxis(Axis axis)
Returns true if the axis is compatible with the compass plot, and false otherwise. |
boolean |
isCompatibleVerticalAxis(Axis axis)
Returns true if the axis is compatible with the compass plot, and false otherwise. |
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 |
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 |
clone, equals, 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
Constructor Detail |
public CompassPlot()
public CompassPlot(MeterDataset data)
data
- the dataset for the plot.public CompassPlot(MeterDataset data, java.awt.Insets insets, java.awt.Paint backgroundPaint, java.awt.Image backgroundImage, float backgroundAlpha, java.awt.Stroke outlineStroke, java.awt.Paint outlinePaint, float foregroundAlpha)
data
- the dataset.insets
- amount of blank space around the plot area.backgroundPaint
- an optional color for the plot's background.backgroundImage
- an optional image for the plot's background.backgroundAlpha
- alpha-transparency for the plot's background.outlineStroke
- the Stroke used to draw an outline around the plot.outlinePaint
- the color used to draw an outline around the plot.foregroundAlpha
- the alpha-transparency for the plot foreground.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)
setSeriesPaint
in class Plot
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)
setSeriesOutlineStroke
in class Plot
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 MeterDataset[] getData()
Provided for convenience.
public void addData(MeterDataset data)
data
- the new dataset.public void addData(MeterDataset data, MeterNeedle needle)
data
- the new dataset.needle
- the needle.public void draw(java.awt.Graphics2D g2, java.awt.geom.Rectangle2D plotArea, ChartRenderingInfo info)
draw
in class Plot
g2
- the graphics device.plotArea
- the area within which the plot should be drawn.info
- collects info about the drawing.public java.lang.String getPlotType()
getPlotType
in class Plot
public boolean isCompatibleHorizontalAxis(Axis axis)
axis
- the axis.public boolean isCompatibleVerticalAxis(Axis axis)
axis
- the axis.public LegendItemCollection getLegendItems()
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 java.util.List getLegendItemLabels()
getLegendItemLabels
in class Plot
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |