Class MeterInterval

java.lang.Object
org.jfree.chart.plot.MeterInterval
All Implemented Interfaces:
Serializable

public class MeterInterval extends Object implements Serializable
An interval to be highlighted on a MeterPlot. Instances of this class are immutable.
See Also:
  • Field Details

    • serialVersionUID

      private static final long serialVersionUID
      For serialization.
      See Also:
    • label

      private String label
      The interval label.
    • range

      private Range range
      The interval range.
    • outlinePaint

      private transient Paint outlinePaint
      The outline paint (used for the arc marking the interval).
    • outlineStroke

      private transient Stroke outlineStroke
      The outline stroke (used for the arc marking the interval).
    • backgroundPaint

      private transient Paint backgroundPaint
      The background paint for the interval.
  • Constructor Details

    • MeterInterval

      public MeterInterval(String label, Range range)
      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

      public String getLabel()
      Returns the label.
      Returns:
      The label (never null).
    • getRange

      public Range getRange()
      Returns the range.
      Returns:
      The range (never null).
    • getBackgroundPaint

      public Paint getBackgroundPaint()
      Returns the background paint. If null, the background should remain unfilled.
      Returns:
      The background paint (possibly null).
    • getOutlinePaint

      public Paint getOutlinePaint()
      Returns the outline paint.
      Returns:
      The outline paint (possibly null).
    • getOutlineStroke

      public Stroke getOutlineStroke()
      Returns the outline stroke.
      Returns:
      The outline stroke (possibly null).
    • equals

      public boolean equals(Object obj)
      Checks this instance for equality with an arbitrary object.
      Overrides:
      equals in class Object
      Parameters:
      obj - the object (null permitted).
      Returns:
      A boolean.
    • writeObject

      private void writeObject(ObjectOutputStream stream) throws IOException
      Provides serialization support.
      Parameters:
      stream - the output stream.
      Throws:
      IOException - if there is an I/O error.
    • readObject

      private void readObject(ObjectInputStream stream) throws IOException, ClassNotFoundException
      Provides serialization support.
      Parameters:
      stream - the input stream.
      Throws:
      IOException - if there is an I/O error.
      ClassNotFoundException - if there is a classpath problem.