Class MeterLegend

All Implemented Interfaces:
Serializable, Cloneable

public class MeterLegend
extends StandardLegend
A legend for meter plots.
See Also:
Serialized Form
  • Constructor Details

    • MeterLegend

      public MeterLegend()
      The default constructor; sets an empty legend text.
    • MeterLegend

      public MeterLegend​(String legendText)
      Constructs a new legend.
      Parameters:
      legendText - the legend text.
    • MeterLegend

      public MeterLegend​(JFreeChart chart, String legendText)
      Deprecated.
      use the default constructor instead and let JFreeChart manage the chart reference
      Creates a new legend.
      Parameters:
      chart - the chart that the legend belongs to.
      legendText - the legend text.
  • Method Details

    • getLegendText

      public String getLegendText()
      Returns the legend text.
      Returns:
      the legend text.
    • setLegendText

      public void setLegendText​(String text)
      Sets the legend text.
      Parameters:
      text - the new legend text.
    • draw

      public Rectangle2D draw​(Graphics2D g2, Rectangle2D available)
      Draws the legend.
      Parameters:
      g2 - the graphics device.
      available - the available area.
      Returns:
      the remaining available drawing area.