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, removeValueChangeEventListener
private 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()
ALDSwingComponent
getJComponent
in class ALDSwingComponent
public 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 ActionListener
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.