protected class ALDFileDirectoryDataIOSwing.FileDirectoryDataIOPanel extends ALDSwingComponent implements ActionListener, ALDSwingValueChangeListener
| Modifier and Type | Field and Description |
|---|---|
private JFileChooser |
getDirDialog
File/directory chooser dialogue.
|
private JPanel |
ioPanel
Swing component to be integrated in GUI.
|
private boolean |
isDirectory
Flag indicating if panel refers to a directory parameter or not.
|
private File |
lastDirectory
Last directory selected by user.
|
private File |
lastFile
Last file selected by user.
|
private ALDParameterDescriptor |
paramDescriptor
Descriptor of the associated (operator) parameter.
|
private JButton |
selectFileDir
Button to select via dialogue.
|
private ALDSwingComponentTextField |
textField
Text field in the panel.
|
listenerList| Modifier | Constructor and Description |
|---|---|
protected |
FileDirectoryDataIOPanel(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.
|
Object |
readData(Field field,
Class<?> cl)
Returns the contents of the text field.
|
boolean |
representsDirectory()
Request type of input.
|
void |
setValue(Field field,
Class<?> cl,
Object value)
Returns the contents of the text field.
|
addValueChangeEventListener, fireALDSwingValueChangeEvent, removeValueChangeEventListenerprivate JPanel ioPanel
private JButton selectFileDir
private JFileChooser getDirDialog
private File lastDirectory
private File lastFile
private boolean isDirectory
private ALDSwingComponentTextField textField
private ALDParameterDescriptor paramDescriptor
protected FileDirectoryDataIOPanel(Field field, Class<?> cl, Object obj, ALDParameterDescriptor descr)
field - Field to consider.cl - Class to consider.obj - Default object.descr - Descriptor of associated parameter.public JPanel getJComponent()
ALDSwingComponentgetJComponent in class ALDSwingComponentpublic boolean representsDirectory()
public void setValue(Field field, Class<?> cl, Object value)
field - Field to consider.cl - Class to consider.value - Object value to be set.public Object readData(Field field, Class<?> cl) throws ALDDataIOProviderException
field - Field to consider.cl - Class to consider.ALDDataIOProviderException - Thrown in case of failure.public void actionPerformed(ActionEvent e)
actionPerformed in interface ActionListenerpublic void handleValueChangeEvent(ALDSwingValueChangeEvent event)
ALDSwingValueChangeListenerhandleValueChangeEvent in interface ALDSwingValueChangeListenerevent - Event to be handled.public void disableComponent()
ALDSwingComponentdisableComponent in class ALDSwingComponentpublic void enableComponent()
ALDSwingComponentenableComponent in class ALDSwingComponentpublic void dispose()
ALDSwingComponentdispose in class ALDSwingComponentCopyright © 2010–2021 Martin Luther University Halle-Wittenberg, Institute of Computer Science, Pattern Recognition and Bioinformatics. All rights reserved.