Class LegendPanel

All Implemented Interfaces:
ImageObserver, MenuContainer, Serializable, Accessible

public class LegendPanel extends JPanel
The LegendPanel class displays a Legend graphic in a panel. The size of the legend may be scaled depending on the panel size.
Since:
3.2.1
Author:
Peter Hollemans
See Also:
  • Field Details

    • LEGEND_PROPERTY

      public static final String LEGEND_PROPERTY
      The legend property for property listeners.
      See Also:
  • Constructor Details

    • LegendPanel

      public LegendPanel(Legend legend)
      Creates a new panel for the specified legend.
      Parameters:
      legend - the legend to display.
  • Method Details

    • paintComponent

      public void paintComponent(Graphics g)
      Overrides:
      paintComponent in class JComponent
    • setLegend

      public void setLegend(Legend legend)
      Sets the legned for this panel.
    • getLegend

      public Legend getLegend()
      Since:
      3.8.1