de.unihalle.informatik.Alida.batch
Class ALDBatchInputManagerSwing

java.lang.Object
  extended by de.unihalle.informatik.Alida.batch.ALDBatchInputManager
      extended by de.unihalle.informatik.Alida.batch.ALDBatchInputManagerSwing

public class ALDBatchInputManagerSwing
extends ALDBatchInputManager

This class implements a batch provider mangager for batch processing in the context of graphical user interfaces.

For data input, it essentially looks up the correct provider for GUI-based execution using the method of its super class and invokes its method.

It does its work in collaboration with ALDBatchInputIterator.

Author:
moeller

Nested Class Summary
static class ALDBatchInputManagerSwing.ProviderInteractionLevel
          Levels to enable/disable interactive provider behaviour.
 
Field Summary
 
Fields inherited from class de.unihalle.informatik.Alida.batch.ALDBatchInputManager
debug, mapTable
 
Method Summary
 ALDSwingComponent createGUIElement(java.lang.reflect.Field field, java.lang.Class<?> cl, java.lang.Object obj, ALDParameterDescriptor descr)
          Create a gui element which may be used to request the user to input data.
static ALDBatchInputManagerSwing getInstance()
          Return the single instance of this class
 ALDBatchInputManagerSwing.ProviderInteractionLevel getProviderInteractionLevel()
          Returns the current level of provider interaction.
 boolean isTriggerValueChangeEvents()
          Returns value of event trigger flag.
 java.util.Iterator<java.lang.Object> readData(java.lang.reflect.Field field, java.lang.Class<?> cl, ALDSwingComponent guiElement)
          Reads data of given class from a specified source.
 void setProviderInteractionLevel(ALDBatchInputManagerSwing.ProviderInteractionLevel level)
          Set the level of provider interaction which is allowed.
 void setTriggerValueChangeEvents(boolean b)
          Set the value change event trigger flag.
 
Methods inherited from class de.unihalle.informatik.Alida.batch.ALDBatchInputManager
getProvider, initMapTable, providerAvailable
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Method Detail

getInstance

public static ALDBatchInputManagerSwing getInstance()
Return the single instance of this class

Returns:
Single instance.

getProviderInteractionLevel

public ALDBatchInputManagerSwing.ProviderInteractionLevel getProviderInteractionLevel()
Returns the current level of provider interaction.

Returns:
Current level of provider interaction.

setProviderInteractionLevel

public void setProviderInteractionLevel(ALDBatchInputManagerSwing.ProviderInteractionLevel level)
Set the level of provider interaction which is allowed.

Parameters:
level - New level of interaction providers have to obey.

isTriggerValueChangeEvents

public boolean isTriggerValueChangeEvents()
Returns value of event trigger flag.

Returns:
True, if value change events are allowed.

setTriggerValueChangeEvents

public void setTriggerValueChangeEvents(boolean b)
Set the value change event trigger flag.

Parameters:
b - New value of the event trigger flag.

createGUIElement

public ALDSwingComponent createGUIElement(java.lang.reflect.Field field,
                                          java.lang.Class<?> cl,
                                          java.lang.Object obj,
                                          ALDParameterDescriptor descr)
                                   throws ALDBatchIOException
Create a gui element which may be used to request the user to input data.

This element is later forwarded to readData to extract the data.

Parameters:
cl - Class of data to be read.
obj - The value of this object to set as inital value.
Returns:
Graphical element.
Throws:
ALDBatchIOException

readData

public java.util.Iterator<java.lang.Object> readData(java.lang.reflect.Field field,
                                                     java.lang.Class<?> cl,
                                                     ALDSwingComponent guiElement)
                                              throws ALDBatchIOException
Reads data of given class from a specified source.

Parameters:
cl - Class of data to be read.
guiElement - gui element from where to read data.
Returns:
data object read or null if no provider was found TODO BM: Rückgabe-Wert der Provider sollte bei Fehler nicht Null sein!
Throws:
ALDBatchIOException


Copyright © 2010-2014 Martin Luther University Halle-Wittenberg. All Rights Reserved.