Package elki.gui.configurator
Class AbstractParameterConfigurator<T extends Parameter<?>>
- java.lang.Object
-
- elki.gui.configurator.AbstractParameterConfigurator<T>
-
- Type Parameters:
T
- parameter type
- All Implemented Interfaces:
ParameterConfigurator
- Direct Known Subclasses:
AbstractSingleParameterConfigurator
,FlagParameterConfigurator
public abstract class AbstractParameterConfigurator<T extends Parameter<?>> extends java.lang.Object implements ParameterConfigurator
Abstract class to produce a configurator for a particular parameter.- Since:
- 0.4.0
- Author:
- Erich Schubert
-
-
Field Summary
Fields Modifier and Type Field Description protected javax.swing.event.EventListenerList
listenerList
The event listeners for this parameter.(package private) T
param
The parameter to configure(package private) javax.swing.JComponent
parent
The parent container
-
Constructor Summary
Constructors Constructor Description AbstractParameterConfigurator(T param, javax.swing.JComponent parent)
Constructor.
-
Method Summary
All Methods Instance Methods Abstract Methods Concrete Methods Modifier and Type Method Description void
addChangeListener(javax.swing.event.ChangeListener listener)
Add a change listenervoid
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.protected void
finishGridRow()
Complete the current grid row, adding the icon at the endprotected void
fireValueChanged()
Notify listeners of a changed value.abstract java.lang.Object
getUserInput()
Get the value given by the user.void
removeChangeListener(javax.swing.event.ChangeListener listener)
Remove a change listener
-
-
-
Constructor Detail
-
AbstractParameterConfigurator
public AbstractParameterConfigurator(T param, javax.swing.JComponent parent)
Constructor.- Parameters:
param
- Parameterparent
- Parent
-
-
Method Detail
-
finishGridRow
protected void finishGridRow()
Complete the current grid row, adding the icon at the end
-
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
- Parameters:
owner
- Owning ("parent") objectparam
- Parametertrack
- Parameter tracker
-
addChangeListener
public void addChangeListener(javax.swing.event.ChangeListener listener)
Description copied from interface:ParameterConfigurator
Add a change listener- Specified by:
addChangeListener
in interfaceParameterConfigurator
- Parameters:
listener
- Change listener
-
removeChangeListener
public void removeChangeListener(javax.swing.event.ChangeListener listener)
Description copied from interface:ParameterConfigurator
Remove a change listener- Specified by:
removeChangeListener
in interfaceParameterConfigurator
- Parameters:
listener
- Change listener
-
fireValueChanged
protected void fireValueChanged()
Notify listeners of a changed value.
-
appendParameters
public void appendParameters(ListParameterization params)
Description copied from interface:ParameterConfigurator
Append the parameters to a list.- Specified by:
appendParameters
in interfaceParameterConfigurator
- Parameters:
params
- Parameter list (output)
-
getUserInput
public abstract java.lang.Object getUserInput()
Get the value given by the user.- Returns:
- value for parameter
-
-