Package elki.gui.configurator
Class ClassListParameterConfigurator
- java.lang.Object
-
- elki.gui.configurator.AbstractParameterConfigurator<T>
-
- elki.gui.configurator.AbstractSingleParameterConfigurator<ClassListParameter<?>>
-
- elki.gui.configurator.ClassListParameterConfigurator
-
- All Implemented Interfaces:
ParameterConfigurator,java.awt.event.ActionListener,java.util.EventListener,javax.swing.event.ChangeListener
public class ClassListParameterConfigurator extends AbstractSingleParameterConfigurator<ClassListParameter<?>> implements java.awt.event.ActionListener, javax.swing.event.ChangeListener
Provide a configuration panel to choose classes with the help of a dropdown. Additionally, the classes can in turn have additional parameters.- Since:
- 0.4.0
- Author:
- Erich Schubert
-
-
Field Summary
Fields Modifier and Type Field Description (package private) javax.swing.JButtonbuttonThe button to open the file selector(package private) ConfiguratorPanelchildConfigurator for children(package private) javax.swing.JPanelpanelWe need a panel to put our components on.(package private) TreePopuppopupThe popup we use.(package private) javax.swing.JTextFieldtextfieldText field to store the name-
Fields inherited from class elki.gui.configurator.AbstractSingleParameterConfigurator
label
-
Fields inherited from class elki.gui.configurator.AbstractParameterConfigurator
listenerList, param, parent
-
-
Constructor Summary
Constructors Constructor Description ClassListParameterConfigurator(ClassListParameter<?> cp, javax.swing.JComponent parent)Constructor.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description voidactionPerformed(java.awt.event.ActionEvent e)Callback to show the popup menuvoidaddParameter(java.lang.Object owner, Parameter<?> param, TrackParameters track)Add a parameter to the panel.voidappendParameters(ListParameterization params)Append the parameters to a list.java.lang.StringgetUserInput()Get the value given by the user.voidstateChanged(javax.swing.event.ChangeEvent e)-
Methods inherited from class elki.gui.configurator.AbstractParameterConfigurator
addChangeListener, finishGridRow, fireValueChanged, removeChangeListener
-
-
-
-
Field Detail
-
child
final ConfiguratorPanel child
Configurator for children
-
panel
final javax.swing.JPanel panel
We need a panel to put our components on.
-
textfield
final javax.swing.JTextField textfield
Text field to store the name
-
button
final javax.swing.JButton button
The button to open the file selector
-
popup
final TreePopup popup
The popup we use.
-
-
Constructor Detail
-
ClassListParameterConfigurator
public ClassListParameterConfigurator(ClassListParameter<?> cp, javax.swing.JComponent parent)
Constructor.- Parameters:
cp- Class list parameterparent- Parent component
-
-
Method Detail
-
addParameter
public void addParameter(java.lang.Object owner, Parameter<?> param, TrackParameters track)Description copied from interface:ParameterConfiguratorAdd a parameter to the panel.- Specified by:
addParameterin interfaceParameterConfigurator- Overrides:
addParameterin classAbstractParameterConfigurator<ClassListParameter<?>>- Parameters:
owner- Owning ("parent") objectparam- Parametertrack- Parameter tracker
-
actionPerformed
public void actionPerformed(java.awt.event.ActionEvent e)
Callback to show the popup menu- Specified by:
actionPerformedin interfacejava.awt.event.ActionListener
-
stateChanged
public void stateChanged(javax.swing.event.ChangeEvent e)
- Specified by:
stateChangedin interfacejavax.swing.event.ChangeListener
-
getUserInput
public java.lang.String getUserInput()
Description copied from class:AbstractParameterConfiguratorGet the value given by the user.- Specified by:
getUserInputin classAbstractParameterConfigurator<ClassListParameter<?>>- Returns:
- value for parameter
-
appendParameters
public void appendParameters(ListParameterization params)
Description copied from interface:ParameterConfiguratorAppend the parameters to a list.- Specified by:
appendParametersin interfaceParameterConfigurator- Overrides:
appendParametersin classAbstractParameterConfigurator<ClassListParameter<?>>- Parameters:
params- Parameter list (output)
-
-