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.JButton
button
The button to open the file selector(package private) ConfiguratorPanel
child
Configurator for children(package private) javax.swing.JPanel
panel
We need a panel to put our components on.(package private) TreePopup
popup
The popup we use.(package private) javax.swing.JTextField
textfield
Text 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 void
actionPerformed(java.awt.event.ActionEvent e)
Callback to show the popup menuvoid
addParameter(java.lang.Object owner, Parameter<?> param, TrackParameters track)
Add a parameter to the panel.void
appendParameters(ListParameterization params)
Append the parameters to a list.java.lang.String
getUserInput()
Get the value given by the user.void
stateChanged(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:ParameterConfigurator
Add a parameter to the panel.- Specified by:
addParameter
in interfaceParameterConfigurator
- Overrides:
addParameter
in 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:
actionPerformed
in interfacejava.awt.event.ActionListener
-
stateChanged
public void stateChanged(javax.swing.event.ChangeEvent e)
- Specified by:
stateChanged
in interfacejavax.swing.event.ChangeListener
-
getUserInput
public java.lang.String getUserInput()
Description copied from class:AbstractParameterConfigurator
Get the value given by the user.- Specified by:
getUserInput
in classAbstractParameterConfigurator<ClassListParameter<?>>
- Returns:
- value for parameter
-
appendParameters
public void appendParameters(ListParameterization params)
Description copied from interface:ParameterConfigurator
Append the parameters to a list.- Specified by:
appendParameters
in interfaceParameterConfigurator
- Overrides:
appendParameters
in classAbstractParameterConfigurator<ClassListParameter<?>>
- Parameters:
params
- Parameter list (output)
-
-