Class StackPlotWindow<P,A>

All Implemented Interfaces:
ImageObserver, MenuContainer, Serializable, Accessible, RootPaneContainer, WindowConstants
Direct Known Subclasses:
CubePlotWindow, HistogramPlotWindow, MatrixPlotWindow, PlanePlotWindow, SkyPlotWindow, SpherePlotWindow, TimePlotWindow

public class StackPlotWindow<P,A> extends AuxWindow
Window for all plots. This is generic and currently not expected to have much behaviour implemented by subclasses; plot-type-specific behaviour is defined by supplied PlotType and PlotTypeGui objects. It uses a PlotPanel to do the actual plotting work; this class handles placing the PlotPanel, gathering and supplying user configuration information to it, invoking replots at appropriate times, and managing other user interactions.
Since:
12 Mar 2013
Author:
Mark Taylor
See Also:
  • Constructor Details

    • StackPlotWindow

      public StackPlotWindow(String name, Component parent, uk.ac.starlink.ttools.plot2.PlotType<P,A> plotType, PlotTypeGui<P,A> plotTypeGui, ListModel<TopcatModel> tablesModel)
      Constructor.
      Parameters:
      name - window name
      parent - parent component
      plotType - defines basic plot type characteristics
      plotTypeGui - defines graphical user interface specifics for plot type
      tablesModel - list of available tables
  • Method Details

    • getPlotTypeGui

      public PlotTypeGui<P,A> getPlotTypeGui()
      Returns the plot type used by this window.
      Returns:
      GUI plot type
    • getControlStack

      public ControlStack getControlStack()
      Returns the stack containing controls which define what this window is displaying.
      Returns:
      control stack
    • getControlManager

      public ControlManager getControlManager()
      Returns the manager object that controls this window's stack.
      Returns:
      control manager
    • getPlotPanel

      public PlotPanel<P,A> getPlotPanel()
      Returns this window's PlotPanel.
      Returns:
      plot panel
    • getZoneController

      public ZoneController<P,A> getZoneController(int iz)
      Returns the ZoneController for a given zone.
      Parameters:
      iz - zone index
      Returns:
      zone controller
    • getExportMenu

      public JMenu getExportMenu()
      Returns this window's Export menu.
      Returns:
      export menu
    • getSketchModel

      public ToggleButtonModel getSketchModel()
      Returns the button model controlling whether intermediate plots are shown while assembling large/slow plots.
      Returns:
      sketch button model
    • getLegendControl

      public LegendControl getLegendControl()
      Returns the control used for configuring legend display.
      Returns:
      legend control
    • getFrameControl

      public FrameControl getFrameControl()
      Returns the control used for configuring the external plot frame.
      Returns:
      frame control
    • insertRescaleAction

      public void insertRescaleAction(Action act)
      Adds an action that is logically associated with rescaling the plot. This takes the given action and inserts it into the toolbar and menus in appropriate places.
      Parameters:
      act - action to add
    • dispose

      public void dispose()
      Overrides:
      dispose in class Window
    • hasShadedLayers

      public static boolean hasShadedLayers(uk.ac.starlink.ttools.plot2.PlotLayer[] layers)
      Indicates whether any of the submitted list of plot layers makes use of a colour scale.
      Parameters:
      layers - plot layers
      Returns:
      true iff any uses an aux colour shader