Package org.jfree.chart.plot
Class MeterInterval
java.lang.Object
org.jfree.chart.plot.MeterInterval
- All Implemented Interfaces:
Serializable
An interval to be highlighted on a
MeterPlot
. Instances of this
class are immutable.- See Also:
-
Field Summary
FieldsModifier and TypeFieldDescriptionprivate Paint
The background paint for the interval.private String
The interval label.private Paint
The outline paint (used for the arc marking the interval).private Stroke
The outline stroke (used for the arc marking the interval).private Range
The interval range.private static final long
For serialization. -
Constructor Summary
ConstructorsConstructorDescriptionMeterInterval
(String label, Range range) Creates a new interval.MeterInterval
(String label, Range range, Paint outlinePaint, Stroke outlineStroke, Paint backgroundPaint) Creates a new interval. -
Method Summary
Modifier and TypeMethodDescriptionboolean
Checks this instance for equality with an arbitrary object.Returns the background paint.getLabel()
Returns the label.Returns the outline paint.Returns the outline stroke.getRange()
Returns the range.private void
readObject
(ObjectInputStream stream) Provides serialization support.private void
writeObject
(ObjectOutputStream stream) Provides serialization support.
-
Field Details
-
serialVersionUID
private static final long serialVersionUIDFor serialization.- See Also:
-
label
The interval label. -
range
The interval range. -
outlinePaint
The outline paint (used for the arc marking the interval). -
outlineStroke
The outline stroke (used for the arc marking the interval). -
backgroundPaint
The background paint for the interval.
-
-
Constructor Details
-
MeterInterval
Creates a new interval.- Parameters:
label
- the label (null
not permitted).range
- the range (null
not permitted).
-
MeterInterval
public MeterInterval(String label, Range range, Paint outlinePaint, Stroke outlineStroke, Paint backgroundPaint) Creates a new interval.- Parameters:
label
- the label (null
not permitted).range
- the range (null
not permitted).outlinePaint
- the outline paint (null
permitted).outlineStroke
- the outline stroke (null
permitted).backgroundPaint
- the background paint (null
permitted).
-
-
Method Details
-
getLabel
Returns the label.- Returns:
- The label (never
null
).
-
getRange
Returns the range.- Returns:
- The range (never
null
).
-
getBackgroundPaint
Returns the background paint. Ifnull
, the background should remain unfilled.- Returns:
- The background paint (possibly
null
).
-
getOutlinePaint
Returns the outline paint.- Returns:
- The outline paint (possibly
null
).
-
getOutlineStroke
Returns the outline stroke.- Returns:
- The outline stroke (possibly
null
).
-
equals
Checks this instance for equality with an arbitrary object. -
writeObject
Provides serialization support.- Parameters:
stream
- the output stream.- Throws:
IOException
- if there is an I/O error.
-
readObject
Provides serialization support.- Parameters:
stream
- the input stream.- Throws:
IOException
- if there is an I/O error.ClassNotFoundException
- if there is a classpath problem.
-