Package uk.ac.starlink.topcat.plot2
Class SpecifierListArrayPanel
java.lang.Object
uk.ac.starlink.topcat.plot2.SpecifierListArrayPanel
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 Summary
ConstructorsConstructorDescriptionSpecifierListArrayPanel
(uk.ac.starlink.ttools.plot2.config.ConfigKey<?>[] keys, IntFunction<String> labelFunc) Constructor. -
Method Summary
Modifier and TypeMethodDescriptionvoid
Adds a listener for changes to the specifiers.Returns the GUI component containing this panel.uk.ac.starlink.ttools.plot2.config.ConfigMap
getConfig
(int index) Returns the configuration specified by this panel for a given index.void
Removes a listener for changes to the specifiers.void
showElements
(int count) Updates the display to show a given number of specifier sets.
-
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 indexlabelFunc
- 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
Returns the GUI component containing this panel.- Returns:
- panel
-
addActionListener
Adds a listener for changes to the specifiers.- Parameters:
l
- listener to add
-
removeActionListener
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
-