Package org.jfree.chart.plot
Class MeterInterval
- java.lang.Object
-
- org.jfree.chart.plot.MeterInterval
-
- All Implemented Interfaces:
java.io.Serializable
public class MeterInterval extends java.lang.Object implements java.io.SerializableAn interval to be highlighted on aMeterPlot. Instances of this class are immutable.- See Also:
- Serialized Form
-
-
Field Summary
Fields Modifier and Type Field Description private java.awt.PaintbackgroundPaintThe background paint for the interval.private java.lang.StringlabelThe interval label.private java.awt.PaintoutlinePaintThe outline paint (used for the arc marking the interval).private java.awt.StrokeoutlineStrokeThe outline stroke (used for the arc marking the interval).private RangerangeThe interval range.private static longserialVersionUIDFor serialization.
-
Constructor Summary
Constructors Constructor Description MeterInterval(java.lang.String label, Range range)Creates a new interval.MeterInterval(java.lang.String label, Range range, java.awt.Paint outlinePaint, java.awt.Stroke outlineStroke, java.awt.Paint backgroundPaint)Creates a new interval.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description booleanequals(java.lang.Object obj)Checks this instance for equality with an arbitrary object.java.awt.PaintgetBackgroundPaint()Returns the background paint.java.lang.StringgetLabel()Returns the label.java.awt.PaintgetOutlinePaint()Returns the outline paint.java.awt.StrokegetOutlineStroke()Returns the outline stroke.RangegetRange()Returns the range.private voidreadObject(java.io.ObjectInputStream stream)Provides serialization support.private voidwriteObject(java.io.ObjectOutputStream stream)Provides serialization support.
-
-
-
Field Detail
-
serialVersionUID
private static final long serialVersionUID
For serialization.- See Also:
- Constant Field Values
-
label
private java.lang.String label
The interval label.
-
range
private Range range
The interval range.
-
outlinePaint
private transient java.awt.Paint outlinePaint
The outline paint (used for the arc marking the interval).
-
outlineStroke
private transient java.awt.Stroke outlineStroke
The outline stroke (used for the arc marking the interval).
-
backgroundPaint
private transient java.awt.Paint backgroundPaint
The background paint for the interval.
-
-
Constructor Detail
-
MeterInterval
public MeterInterval(java.lang.String label, Range range)Creates a new interval.- Parameters:
label- the label (nullnot permitted).range- the range (nullnot permitted).
-
MeterInterval
public MeterInterval(java.lang.String label, Range range, java.awt.Paint outlinePaint, java.awt.Stroke outlineStroke, java.awt.Paint backgroundPaint)Creates a new interval.- Parameters:
label- the label (nullnot permitted).range- the range (nullnot permitted).outlinePaint- the outline paint (nullpermitted).outlineStroke- the outline stroke (nullpermitted).backgroundPaint- the background paint (nullpermitted).
-
-
Method Detail
-
getLabel
public java.lang.String getLabel()
Returns the label.- Returns:
- The label (never
null).
-
getRange
public Range getRange()
Returns the range.- Returns:
- The range (never
null).
-
getBackgroundPaint
public java.awt.Paint getBackgroundPaint()
Returns the background paint. Ifnull, the background should remain unfilled.- Returns:
- The background paint (possibly
null).
-
getOutlinePaint
public java.awt.Paint getOutlinePaint()
Returns the outline paint.- Returns:
- The outline paint (possibly
null).
-
getOutlineStroke
public java.awt.Stroke getOutlineStroke()
Returns the outline stroke.- Returns:
- The outline stroke (possibly
null).
-
equals
public boolean equals(java.lang.Object obj)
Checks this instance for equality with an arbitrary object.- Overrides:
equalsin classjava.lang.Object- Parameters:
obj- the object (nullpermitted).- Returns:
- A boolean.
-
writeObject
private void writeObject(java.io.ObjectOutputStream stream) throws java.io.IOExceptionProvides serialization support.- Parameters:
stream- the output stream.- Throws:
java.io.IOException- if there is an I/O error.
-
readObject
private void readObject(java.io.ObjectInputStream stream) throws java.io.IOException, java.lang.ClassNotFoundExceptionProvides serialization support.- Parameters:
stream- the input stream.- Throws:
java.io.IOException- if there is an I/O error.java.lang.ClassNotFoundException- if there is a classpath problem.
-
-