Class FormStylePanel

All Implemented Interfaces:
ImageObserver, MenuContainer, Serializable, Accessible

public class FormStylePanel extends JPanel
GUI component for acquiring style information for a plot for each row subset of a particular table. One part of the panel allows selection of global (per-table) style configuration, and another part allows selection of subset-specific overrides.
Since:
15 Mar 2013
Author:
Mark Taylor
See Also:
  • Constructor Details

    • FormStylePanel

      public FormStylePanel(uk.ac.starlink.ttools.plot2.config.ConfigKey<?>[] keys, Configger plotConfigger, Supplier<uk.ac.starlink.ttools.plot2.Plotter<?>> plotterSupplier, SubsetConfigManager subManager, SubsetStack subStack, TopcatModel tcModel)
      Constructor.
      Parameters:
      keys - style configuration keys that this panel is to acquire
      plotConfigger - global config defaults
      plotterSupplier - obtains on demand the plotter for which this panel is acquiring style information
      subManager - provides per-subset defaults for some config keys
      subStack - controls/display per-subset visibility
      tcModel - topcat model whose subsets are being configured
  • Method Details

    • addActionListener

      public void addActionListener(ActionListener listener)
      Adds a listener which will be notified when there is a change to any of this panel's configuration.
      Parameters:
      listener - listener to add
    • removeActionListener

      public void removeActionListener(ActionListener listener)
      Removes a listener previously added.
      Parameters:
      listener - listener to remove
    • getConfig

      public uk.ac.starlink.ttools.plot2.config.ConfigMap getConfig(RowSubset.Key rsKey)
      Returns the configuration for one of this panel's row subsets. This is a combination of global and per-subset selected items.
      Parameters:
      rsKey - row subset identifier
      Returns:
      style configuration
    • setGlobalConfig

      public void setGlobalConfig(uk.ac.starlink.ttools.plot2.config.ConfigMap config)
      Sets global (not subset-specific) configuration options for this panel. Any supplied config options not used by this style panel are ignored.
      Parameters:
      config - configuration map containing zero or more entries for this panel's options
    • configureFrom

      public void configureFrom(FormStylePanel template)
      Configures this panel with the current state of a supplied template.
      Parameters:
      template - panel supplying required configuration
    • submitReports

      public void submitReports(Map<RowSubset,uk.ac.starlink.ttools.plot2.ReportMap> reports)
      Accepts plot reports indexed by subset, and passes them on to the relevant specifiers.
      Parameters:
      reports - map of subset->plot report maps for the plot layers generated by this panel