Class SpecifierListArrayPanel

java.lang.Object
uk.ac.starlink.topcat.plot2.SpecifierListArrayPanel

public class SpecifierListArrayPanel extends Object
Displays and manages a variable-length array of Specifiers for each of a given list of ConfigKeys.
Since:
19 Sep 2023
Author:
Mark Taylor
  • Constructor Details

    • SpecifierListArrayPanel

      public SpecifierListArrayPanel(uk.ac.starlink.ttools.plot2.config.ConfigKey<?>[] keys, IntFunction<String> labelFunc)
      Constructor.
      Parameters:
      keys - defines what specifiers to show for each index
      labelFunc - provides a generic label (applied to all keys) for each index
  • Method Details

    • getConfig

      public uk.ac.starlink.ttools.plot2.config.ConfigMap getConfig(int index)
      Returns the configuration specified by this panel for a given index.
      Parameters:
      index - array index
      Returns:
      config map
    • getComponent

      public JComponent getComponent()
      Returns the GUI component containing this panel.
      Returns:
      panel
    • addActionListener

      public void addActionListener(ActionListener l)
      Adds a listener for changes to the specifiers.
      Parameters:
      l - listener to add
    • removeActionListener

      public void removeActionListener(ActionListener l)
      Removes a listener for changes to the specifiers.
      Parameters:
      l - listener to remove
    • showElements

      public void showElements(int count)
      Updates the display to show a given number of specifier sets. Ones not seen before are lazily created as required.
      Parameters:
      count - number of specifiers to display