de.unihalle.informatik.Alida.dataio.provider.swing
Class ALDOperatorDataIOSwing.OperatorHierarchyConfigPanel.AbstrOpClassPanel

java.lang.Object
  extended by de.unihalle.informatik.Alida.dataio.provider.swing.events.ALDSwingValueChangeReporter
      extended by de.unihalle.informatik.Alida.dataio.provider.swing.components.ALDSwingComponent
          extended by de.unihalle.informatik.Alida.dataio.provider.swing.ALDOperatorDataIOSwing.OperatorHierarchyConfigPanel.AbstrOpClassPanel
All Implemented Interfaces:
ALDSwingValueChangeListener, java.awt.event.ActionListener, java.awt.event.ItemListener, java.util.EventListener
Enclosing class:
ALDOperatorDataIOSwing.OperatorHierarchyConfigPanel

private class ALDOperatorDataIOSwing.OperatorHierarchyConfigPanel.AbstrOpClassPanel
extends ALDSwingComponent
implements java.awt.event.ActionListener, java.awt.event.ItemListener, ALDSwingValueChangeListener

GUI element class for parametrized class parameters.

Author:
moeller

Field Summary
private  java.util.Collection<java.lang.Class> availableClasses
          List of available classes.
private  ALDSwingComponentComboBox classSelection
          Combobox containing available classes to select.
private  javax.swing.JButton configButton
          Button to open configuration window.
private  java.util.HashMap<java.lang.Class,ALDOperatorDataIOSwing.OperatorConfigButton> configWins
          Hashmap to store configuration windows for classes.
private  javax.swing.JPanel mainPanel
          Main panel.
private  java.util.HashMap<java.lang.String,java.lang.Class> shortNames
          Hashmap to remember short class names.
 
Fields inherited from class de.unihalle.informatik.Alida.dataio.provider.swing.events.ALDSwingValueChangeReporter
listenerList
 
Constructor Summary
ALDOperatorDataIOSwing.OperatorHierarchyConfigPanel.AbstrOpClassPanel(java.lang.reflect.Field field, java.lang.Class<?> cl, java.lang.Object obj, ALDParameterDescriptor descr)
          Default constructor.
 
Method Summary
 void actionPerformed(java.awt.event.ActionEvent e)
           
 void disableComponent()
          Method to disable the component, i.e. all graphical elements, to prohibit parameter changes.
 void enableComponent()
          Method to enable the component with all graphical elements again.
 javax.swing.JComponent getJComponent()
          Method to request the provider's GUI element.
 void handleValueChangeEvent(ALDSwingValueChangeEvent event)
          Method which is called on event occurence.
 void itemStateChanged(java.awt.event.ItemEvent e)
           
 java.lang.Object readData(java.lang.reflect.Field field, java.lang.Class<?> cl)
          Function to read parameter values from GUI.
 java.util.HashMap<ALDOpParameterDescriptor,java.lang.String> setValue(java.lang.reflect.Field field, java.lang.Class<?> cl, ALDSwingComponent guiElement, java.lang.Object value)
           
 
Methods inherited from class de.unihalle.informatik.Alida.dataio.provider.swing.events.ALDSwingValueChangeReporter
addValueChangeEventListener, fireALDSwingValueChangeEvent, removeValueChangeEventListener
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

availableClasses

private java.util.Collection<java.lang.Class> availableClasses
List of available classes.


classSelection

private ALDSwingComponentComboBox classSelection
Combobox containing available classes to select.


configButton

private javax.swing.JButton configButton
Button to open configuration window.


configWins

private java.util.HashMap<java.lang.Class,ALDOperatorDataIOSwing.OperatorConfigButton> configWins
Hashmap to store configuration windows for classes.


mainPanel

private javax.swing.JPanel mainPanel
Main panel.


shortNames

private java.util.HashMap<java.lang.String,java.lang.Class> shortNames
Hashmap to remember short class names.

Constructor Detail

ALDOperatorDataIOSwing.OperatorHierarchyConfigPanel.AbstrOpClassPanel

public ALDOperatorDataIOSwing.OperatorHierarchyConfigPanel.AbstrOpClassPanel(java.lang.reflect.Field field,
                                                                             java.lang.Class<?> cl,
                                                                             java.lang.Object obj,
                                                                             ALDParameterDescriptor descr)
Default constructor.

Parameters:
field - Field of associated object.
cl - Class of associated object.
obj - Current value of object, maybe null.
descr - Optional descriptor for additional information.
Method Detail

actionPerformed

public void actionPerformed(java.awt.event.ActionEvent e)
Specified by:
actionPerformed in interface java.awt.event.ActionListener

disableComponent

public void disableComponent()
Description copied from class: ALDSwingComponent
Method to disable the component, i.e. all graphical elements, to prohibit parameter changes.

Specified by:
disableComponent in class ALDSwingComponent

enableComponent

public void enableComponent()
Description copied from class: ALDSwingComponent
Method to enable the component with all graphical elements again.

Specified by:
enableComponent in class ALDSwingComponent

getJComponent

public javax.swing.JComponent getJComponent()
Description copied from class: ALDSwingComponent
Method to request the provider's GUI element.

Specified by:
getJComponent in class ALDSwingComponent
Returns:
Component to be integrated in a graphical user interface.

handleValueChangeEvent

public void handleValueChangeEvent(ALDSwingValueChangeEvent event)
Description copied from interface: ALDSwingValueChangeListener
Method which is called on event occurence.

Specified by:
handleValueChangeEvent in interface ALDSwingValueChangeListener
Parameters:
event - Event to be handled.

itemStateChanged

public void itemStateChanged(java.awt.event.ItemEvent e)
Specified by:
itemStateChanged in interface java.awt.event.ItemListener

readData

public java.lang.Object readData(java.lang.reflect.Field field,
                                 java.lang.Class<?> cl)
                          throws ALDDataIOProviderException
Function to read parameter values from GUI.

Parameters:
field - Field of object.
cl - Class of object.
Returns:
Current object value.
Throws:
ALDDataIOProviderException

setValue

public java.util.HashMap<ALDOpParameterDescriptor,java.lang.String> setValue(java.lang.reflect.Field field,
                                                                             java.lang.Class<?> cl,
                                                                             ALDSwingComponent guiElement,
                                                                             java.lang.Object value)
                                                                      throws ALDDataIOProviderException
Throws:
ALDDataIOProviderException