java.lang.Object | ||
↳ | org.jfree.chart.plot.Plot | |
↳ | org.jfree.chart.plot.MeterPlot |
A plot that displays a single value in the form of a needle on a dial. Defined ranges (for example, 'normal', 'warning' and 'critical') can be highlighted on the dial.
Constants | |||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|
float | DEFAULT_BORDER_SIZE | The default border size. | |||||||||
float | DEFAULT_CIRCLE_SIZE | The default circle size. | |||||||||
int | DEFAULT_METER_ANGLE | The default meter angle. |
[Expand]
Inherited Constants | |||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|
![]() |
Fields | |||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|
DEFAULT_LABEL_FONT | The default label font. | ||||||||||
localizationResources | The resourceBundle for the localization. |
[Expand]
Inherited Fields | |||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|
![]() |
Public Constructors | |||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|
Creates a new plot with a default range of
0 to
100 and no value to display. | |||||||||||
Creates a new plot that displays the value from the supplied dataset.
|
Public Methods | |||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|
Adds an interval and sends a
PlotChangeEvent to all registered
listeners. | |||||||||||
Clears the intervals for the plot and sends a
PlotChangeEvent to
all registered listeners. | |||||||||||
Returns an independent copy (clone) of the plot.
| |||||||||||
Draws the plot on a Java 2D graphics device (such as the screen or a
printer).
| |||||||||||
Tests the plot for equality with an arbitrary object.
| |||||||||||
Returns the dataset for the plot.
| |||||||||||
Returns the paint for the dial background.
| |||||||||||
Returns the dial outline paint.
| |||||||||||
Returns the dial shape.
| |||||||||||
Returns a flag that controls whether or not a rectangular border is
drawn around the plot area.
| |||||||||||
Returns an unmodifiable list of the intervals for the plot.
| |||||||||||
Returns an item for each interval.
| |||||||||||
Returns the meter angle in degrees.
| |||||||||||
Returns the paint for the needle.
| |||||||||||
Returns a short string describing the type of plot.
| |||||||||||
Returns the overall range for the dial.
| |||||||||||
Returns the tick label font.
| |||||||||||
Returns the tick label format.
| |||||||||||
Returns the tick label paint.
| |||||||||||
Returns the flag that determines whether or not tick labels are visible.
| |||||||||||
Returns the paint used to draw the ticks around the dial.
| |||||||||||
Returns the tick size (the interval between ticks on the dial).
| |||||||||||
Returns a string describing the units for the dial.
| |||||||||||
Returns the font for the value label.
| |||||||||||
Returns the paint for the value label.
| |||||||||||
Sets the dataset for the plot, replacing the existing dataset if there
is one, and triggers a
PlotChangeEvent . | |||||||||||
Sets the paint used to fill the dial background.
| |||||||||||
Sets the dial outline paint and sends a
PlotChangeEvent to all
registered listeners. | |||||||||||
Sets the dial shape and sends a
PlotChangeEvent to all
registered listeners. | |||||||||||
Sets the flag that controls whether or not a rectangular border is drawn
around the plot area and sends a
PlotChangeEvent to all
registered listeners. | |||||||||||
Sets the angle (in degrees) for the whole range of the dial and sends
a
PlotChangeEvent to all registered listeners. | |||||||||||
Sets the paint used to display the needle and sends a
PlotChangeEvent to all registered listeners. | |||||||||||
Sets the range for the dial and sends a
PlotChangeEvent to all
registered listeners. | |||||||||||
Sets the tick label font and sends a
PlotChangeEvent to all
registered listeners. | |||||||||||
Sets the format for the tick labels and sends a
PlotChangeEvent
to all registered listeners. | |||||||||||
Sets the tick label paint and sends a
PlotChangeEvent to all
registered listeners. | |||||||||||
Sets the flag that controls whether or not the tick labels are visible
and sends a
PlotChangeEvent to all registered listeners. | |||||||||||
Sets the paint used to draw the tick labels around the dial and sends
a
PlotChangeEvent to all registered listeners. | |||||||||||
Sets the tick size and sends a
PlotChangeEvent to all
registered listeners. | |||||||||||
Sets the units for the dial and sends a
PlotChangeEvent to all
registered listeners. | |||||||||||
Sets the font used to display the value label and sends a
PlotChangeEvent to all registered listeners. | |||||||||||
Sets the paint used to display the value label and sends a
PlotChangeEvent to all registered listeners. | |||||||||||
Translates a data value to an angle on the dial.
| |||||||||||
A zoom method that does nothing.
|
Protected Methods | |||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|
Draws an arc.
| |||||||||||
Draws the arc to represent an interval.
| |||||||||||
Draws a tick on the dial.
| |||||||||||
Draws a tick.
| |||||||||||
Draws the ticks that subdivide the overall range.
| |||||||||||
Draws the value label just below the center of the dial.
| |||||||||||
Fills an arc on the dial between the given values.
|
[Expand]
Inherited Methods | |||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|
![]() | |||||||||||
![]() | |||||||||||
![]() | |||||||||||
![]() | |||||||||||
![]() | |||||||||||
![]() |
The default border size.
The default circle size.
The default meter angle.
Creates a new plot with a default range of 0
to
100
and no value to display.
Creates a new plot that displays the value from the supplied dataset.
dataset | the dataset (null permitted).
|
---|
Adds an interval and sends a PlotChangeEvent
to all registered
listeners.
interval | the interval (null not permitted). |
---|
Clears the intervals for the plot and sends a PlotChangeEvent
to
all registered listeners.
Returns an independent copy (clone) of the plot. The dataset is NOT cloned - both the original and the clone will have a reference to the same dataset.
CloneNotSupportedException | if some component of the plot cannot be cloned. |
---|
Draws the plot on a Java 2D graphics device (such as the screen or a printer).
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. |
Tests the plot for equality with an arbitrary object. Note that the dataset is ignored for the purposes of testing equality.
obj | the object (null permitted). |
---|
Returns the dataset for the plot.
null
).Returns the paint for the dial background.
null
).Returns a flag that controls whether or not a rectangular border is drawn around the plot area.
Returns an unmodifiable list of the intervals for the plot.
Returns an item for each interval.
Returns the meter angle in degrees. This defines, in part, the shape of the dial. The default is 270 degrees.
Returns a short string describing the type of plot.
Returns the overall range for the dial.
null
).Returns the tick label format.
null
).Returns the flag that determines whether or not tick labels are visible.
Returns the paint used to draw the ticks around the dial.
null
).Returns the tick size (the interval between ticks on the dial).
Returns a string describing the units for the dial.
null
).Returns the paint for the value label.
null
).Sets the dataset for the plot, replacing the existing dataset if there
is one, and triggers a PlotChangeEvent
.
dataset | the dataset (null permitted). |
---|
Sets the paint used to fill the dial background. Set this to
null
for no background.
paint | the paint (null permitted). |
---|
Sets the dial outline paint and sends a PlotChangeEvent
to all
registered listeners.
paint | the paint. |
---|
Sets the dial shape and sends a PlotChangeEvent
to all
registered listeners.
shape | the shape (null not permitted). |
---|
Sets the flag that controls whether or not a rectangular border is drawn
around the plot area and sends a PlotChangeEvent
to all
registered listeners.
draw | the flag. |
---|
Sets the angle (in degrees) for the whole range of the dial and sends
a PlotChangeEvent
to all registered listeners.
angle | the angle (in degrees, in the range 1-360). |
---|
Sets the paint used to display the needle and sends a
PlotChangeEvent
to all registered listeners.
paint | the paint (null not permitted). |
---|
Sets the range for the dial and sends a PlotChangeEvent
to all
registered listeners.
range | the range (null not permitted and zero-length
ranges not permitted). |
---|
Sets the tick label font and sends a PlotChangeEvent
to all
registered listeners.
font | the font (null not permitted). |
---|
Sets the format for the tick labels and sends a PlotChangeEvent
to all registered listeners.
format | the format (null not permitted). |
---|
Sets the tick label paint and sends a PlotChangeEvent
to all
registered listeners.
paint | the paint (null not permitted). |
---|
Sets the flag that controls whether or not the tick labels are visible
and sends a PlotChangeEvent
to all registered listeners.
visible | the flag. |
---|
Sets the paint used to draw the tick labels around the dial and sends
a PlotChangeEvent
to all registered listeners.
paint | the paint (null not permitted). |
---|
Sets the tick size and sends a PlotChangeEvent
to all
registered listeners.
size | the tick size (must be > 0). |
---|
Sets the units for the dial and sends a PlotChangeEvent
to all
registered listeners.
units | the units (null permitted). |
---|
Sets the font used to display the value label and sends a
PlotChangeEvent
to all registered listeners.
font | the font (null not permitted). |
---|
Sets the paint used to display the value label and sends a
PlotChangeEvent
to all registered listeners.
paint | the paint (null not permitted). |
---|
Translates a data value to an angle on the dial.
value | the value. |
---|
A zoom method that does nothing. Plots are required to support the zoom operation. In the case of a meter plot, it doesn't make sense to zoom in or out, so the method is empty.
percent | The zoom percentage. |
---|
Draws an arc.
g2 | the graphics device. |
---|---|
area | the plot area. |
minValue | the minimum value. |
maxValue | the maximum value. |
paint | the paint. |
stroke | the stroke. |
Draws the arc to represent an interval.
g2 | the graphics device. |
---|---|
meterArea | the drawing area. |
interval | the interval. |
Draws a tick on the dial.
g2 | the graphics device. |
---|---|
meterArea | the meter area. |
value | the tick value. |
label | a flag that controls whether or not a value label is drawn. |
Draws a tick.
g2 | the graphics device. |
---|---|
meterArea | the meter area. |
value | the value. |
Draws the ticks that subdivide the overall range.
g2 | the graphics device. |
---|---|
meterArea | the meter area. |
minValue | the minimum value. |
maxValue | the maximum value. |
Draws the value label just below the center of the dial.
g2 | the graphics device. |
---|---|
area | the plot area. |
Fills an arc on the dial between the given values.
g2 | the graphics device. |
---|---|
area | the plot area. |
minValue | the minimum data value. |
maxValue | the maximum data value. |
paint | the background paint (null not permitted). |
dial | a flag that indicates whether the arc represents the whole dial. |