@ALDDataIOProvider public class ALDFileDirectoryDataIOSwing extends Object implements ALDDataIOSwing
This class provides a panel for a GUI which contains a text entry field for the path, and in addition a button that opens a dialog for browsing the file system. By this it allows to select files and directories in a comfortable manner.
| Modifier and Type | Class and Description |
|---|---|
protected class |
ALDFileDirectoryDataIOSwing.FileDirectoryDataIOPanel
GUI panel for IO of file and directory names.
|
| Constructor and Description |
|---|
ALDFileDirectoryDataIOSwing() |
| Modifier and Type | Method and Description |
|---|---|
ALDSwingComponent |
createGUIElement(Field field,
Class<?> cl,
Object obj,
ALDParameterDescriptor descr)
Interface method to create a GUI element for data input.
|
Collection<Class<?>> |
providedClasses()
Interface method to announce class for which IO is provided for.
|
Object |
readData(Field field,
Class<?> cl,
ALDSwingComponent guiElement)
Interface method for getting parameter values via a GUI element.
|
void |
setValue(Field field,
Class<?> cl,
ALDSwingComponent guiElement,
Object value)
Interface method for setting new parameter values in GUI.
|
JComponent |
writeData(Object obj,
ALDParameterDescriptor descr)
Interface method for displaying an object in the GUI.
|
public Collection<Class<?>> providedClasses()
providedClasses in interface ALDDataIOpublic ALDSwingComponent createGUIElement(Field field, Class<?> cl, Object obj, ALDParameterDescriptor descr)
ALDDataIOSwing
Optionally an object may be supplied which is assumed to be of
type cl and used as default.
createGUIElement in interface ALDDataIOSwingcl - Class of object to be returned.obj - The value of this object to be set as inital value.descr - Optional descriptor to hand over additional information.public void setValue(Field field, Class<?> cl, ALDSwingComponent guiElement, Object value) throws ALDDataIOProviderException
ALDDataIOSwingsetValue in interface ALDDataIOSwingfield - Field of parameter object to be handled.cl - Class of parameter object to be handled.guiElement - Corresponding GUI element.value - New value of the parameter.ALDDataIOProviderExceptionpublic Object readData(Field field, Class<?> cl, ALDSwingComponent guiElement) throws ALDDataIOProviderException
ALDDataIOSwingreadData in interface ALDDataIOSwingfield - Field associated with object to be returned.cl - Class of object to be returned.guiElement - Component from where to read data.null.ALDDataIOProviderExceptionpublic JComponent writeData(Object obj, ALDParameterDescriptor descr) throws ALDDataIOProviderException
ALDDataIOSwingwriteData in interface ALDDataIOSwingobj - Object to be displayed or saved.descr - Optional descriptor to hand over additional information.ALDDataIOProviderExceptionCopyright © 2010–2015 Martin Luther University Halle-Wittenberg. All rights reserved.