Class PlotDeck

All Implemented Interfaces:
ImageObserver, MenuContainer, Serializable, Accessible

public final class PlotDeck extends MultiplotPanel
A uniform menu-bearing host for one or more PlotPanels.

PlotDeck removes the application-level distinction between a single plot and a gallery. With one plot it shows the plot's standard edit menu and, optionally, the File menu while suppressing the redundant Gallery menu. As soon as a second plot is added, Gallery appears automatically and provides card selection. Removing plots updates that behavior in reverse.

The deck inherits MultiplotPanel's EDT marshalling, active-canvas lifecycle, Save behavior, and menu rebuilding. Consequently a plot hosted in a deck receives the same menus whether an application has one diagnostic or several.

See Also:
  • Constructor Details

    • PlotDeck

      public PlotDeck()
      Creates an empty deck with a File/Save menu.
    • PlotDeck

      public PlotDeck(boolean includeFileMenu)
      Creates an empty deck.
      Parameters:
      includeFileMenu - whether to include File/Save for the active plot
    • PlotDeck

      public PlotDeck(String title, PlotPanel plot)
      Creates a deck containing one plot and a File/Save menu.
      Parameters:
      title - logical plot title; used if Gallery later becomes visible
      plot - plot to host
  • Method Details

    • add

      public PlotDeck add(String title, PlotPanel plot)
      Adds a plot and returns this deck for fluent construction.
      Parameters:
      title - logical plot title
      plot - plot panel to add
      Returns:
      this deck
      Throws:
      NullPointerException - if either argument is null