Package elki.gui.configurator
Class ClassParameterConfigurator
- java.lang.Object
-
- elki.gui.configurator.AbstractParameterConfigurator<T>
-
- elki.gui.configurator.AbstractSingleParameterConfigurator<ClassParameter<?>>
-
- elki.gui.configurator.ClassParameterConfigurator
-
- All Implemented Interfaces:
ParameterConfigurator
,java.awt.event.ActionListener
,java.util.EventListener
,javax.swing.event.ChangeListener
public class ClassParameterConfigurator extends AbstractSingleParameterConfigurator<ClassParameter<?>> implements java.awt.event.ActionListener, javax.swing.event.ChangeListener
Provide a configuration panel to choose a class 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
Configuration panel for child.(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 ClassParameterConfigurator(ClassParameter<?> 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)
void
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
-
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.
-
child
final ConfiguratorPanel child
Configuration panel for child.
-
-
Constructor Detail
-
ClassParameterConfigurator
public ClassParameterConfigurator(ClassParameter<?> cp, javax.swing.JComponent parent)
Constructor.- Parameters:
cp
- Class 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<ClassParameter<?>>
- Parameters:
owner
- Owning ("parent") objectparam
- Parametertrack
- Parameter tracker
-
actionPerformed
public void actionPerformed(java.awt.event.ActionEvent e)
- 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<ClassParameter<?>>
- 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<ClassParameter<?>>
- Parameters:
params
- Parameter list (output)
-
-