private class ALDParametrizedClassDataIOSwing.ParametrizedClassPanel extends ALDSwingComponent implements ActionListener, ItemListener, ALDSwingValueChangeListener
Modifier and Type | Field and Description |
---|---|
private Collection<Class> |
availableClasses
List of available classes.
|
private ALDSwingComponentItem |
boxItemNone
Default item if no value is selected.
|
private ALDSwingComponentComboBox |
classSelection
Combobox containing available classes to select.
|
private HashMap<Class,ALDParametrizedClassConfigWindow> |
configWins
Hashmap to store configuration windows for classes.
|
private JPanel |
mainPanel
Main panel containing elements for class selection.
|
private HashMap<String,Class> |
shortNames
Hashmap to remember short class names.
|
listenerList
Constructor and Description |
---|
ParametrizedClassPanel(Field field,
Class<?> cl,
Object obj,
ALDParameterDescriptor descr)
Default constructor.
|
Modifier and Type | Method and Description |
---|---|
void |
actionPerformed(ActionEvent e) |
void |
disableComponent()
Method to disable the component, i.e. all graphical elements, to
prohibit parameter changes.
|
void |
dispose()
Releases all resources, i.e. closes all sub-windows.
|
void |
enableComponent()
Method to enable the component with all graphical elements again.
|
JPanel |
getJComponent()
Method to request the provider's GUI element.
|
void |
handleValueChangeEvent(ALDSwingValueChangeEvent event)
Method which is called on event occurence.
|
void |
itemStateChanged(ItemEvent e) |
Object |
readData(Field field,
Class<?> cl)
Function to read parameter values from GUI.
|
void |
setValue(Field field,
Class<?> cl,
Object value)
Function to update values of parametrized class object.
|
addValueChangeEventListener, fireALDSwingValueChangeEvent, removeValueChangeEventListener
private ALDSwingComponentItem boxItemNone
private JPanel mainPanel
private ALDSwingComponentComboBox classSelection
private Collection<Class> availableClasses
private HashMap<Class,ALDParametrizedClassConfigWindow> configWins
public ParametrizedClassPanel(Field field, Class<?> cl, Object obj, ALDParameterDescriptor descr) throws ALDDataIOException
field
- Field linked to the parametrized class parameter.cl
- Class of the parametrized class parameter.obj
- Initial object to use for initialization.descr
- Descriptor linked to the parameter.ALDDataIOException
- Thrown in case of failure.public JPanel getJComponent()
ALDSwingComponent
getJComponent
in class ALDSwingComponent
public void setValue(Field field, Class<?> cl, Object value) throws ALDDataIOException
field
- Field linked to the parameter to update.cl
- Class of the parameter to update.value
- New value to set.ALDDataIOException
- Thrown in case of update failure.public Object readData(Field field, Class<?> cl) throws ALDDataIOException
field
- Field of object.cl
- Class of object.ALDDataIOException
- Thrown in case of failure.public void actionPerformed(ActionEvent e)
actionPerformed
in interface ActionListener
public void itemStateChanged(ItemEvent e)
itemStateChanged
in interface ItemListener
public void handleValueChangeEvent(ALDSwingValueChangeEvent event)
ALDSwingValueChangeListener
handleValueChangeEvent
in interface ALDSwingValueChangeListener
event
- Event to be handled.public void disableComponent()
ALDSwingComponent
disableComponent
in class ALDSwingComponent
public void enableComponent()
ALDSwingComponent
enableComponent
in class ALDSwingComponent
public void dispose()
ALDSwingComponent
dispose
in class ALDSwingComponent
Copyright © 2010–2021 Martin Luther University Halle-Wittenberg, Institute of Computer Science, Pattern Recognition and Bioinformatics. All rights reserved.