public class SpecifierArrayPanel<T> extends Object
Constructor and Description |
---|
SpecifierArrayPanel(uk.ac.starlink.ttools.plot2.config.ConfigKey<T> key)
Constructs a panel with default specifiers.
|
SpecifierArrayPanel(uk.ac.starlink.ttools.plot2.config.ConfigKey<T> key,
java.util.function.IntFunction<String> labelFunc,
java.util.function.IntFunction<uk.ac.starlink.ttools.plot2.config.Specifier<T>> specifierFunc)
Constructs a panel with custom labels and specifiers.
|
Modifier and Type | Method and Description |
---|---|
void |
addActionListener(ActionListener l)
Adds a listener for changes to the specifiers.
|
JComponent |
getComponent()
Returns the GUI component containing this panel.
|
uk.ac.starlink.ttools.plot2.config.Specifier<T> |
getSpecifier(int index)
Returns the specifier for a given index.
|
void |
removeActionListener(ActionListener l)
Removes a listener for changes to the specifiers.
|
void |
showElements(int count)
Updates the display to show a given number of specifiers.
|
public SpecifierArrayPanel(uk.ac.starlink.ttools.plot2.config.ConfigKey<T> key)
key
- config key to use for all specifierspublic SpecifierArrayPanel(uk.ac.starlink.ttools.plot2.config.ConfigKey<T> key, java.util.function.IntFunction<String> labelFunc, java.util.function.IntFunction<uk.ac.starlink.ttools.plot2.config.Specifier<T>> specifierFunc)
key
- config key by which configured values will be identifiedlabelFunc
- generates a specifier label for a given indexspecifierFunc
- generates a specifier for a given indexpublic uk.ac.starlink.ttools.plot2.config.Specifier<T> getSpecifier(int index)
index
- array indexpublic JComponent getComponent()
public void addActionListener(ActionListener l)
l
- listener to addpublic void removeActionListener(ActionListener l)
l
- listener to removepublic void showElements(int count)
count
- number of specifiers to displayCopyright © 2003-2025 CCLRC: Council for the Central Laboratory of the Research Councils. All Rights Reserved.