Package org.esa.snap.ui.io
Class FileArrayEditor
- java.lang.Object
-
- org.esa.snap.ui.io.FileArrayEditor
-
public class FileArrayEditor extends Object
An UI-Component which represents a product file list with the ability to add and remove files.
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description static interfaceFileArrayEditor.EditorParentstatic interfaceFileArrayEditor.FileArrayEditorListener
-
Constructor Summary
Constructors Constructor Description FileArrayEditor(FileArrayEditor.EditorParent parent, String label)Constructs the object with default values
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description JButtoncreateAddFileButton()JComponentcreateFileArrayComponent()protected JFileChoosercreateFileChooserDialog()JButtoncreateRemoveFileButton()List<File>getFiles()Retrieves the list of files currently editedprotected FileArrayEditor.EditorParentgetParent()JComponentgetUI()Retrieves the editor UI.voidsetFiles(List<File> files)Sets the list of files to be edited.voidsetListener(FileArrayEditor.FileArrayEditorListener listener)Sets the listener for this class
-
-
-
Constructor Detail
-
FileArrayEditor
public FileArrayEditor(FileArrayEditor.EditorParent parent, String label)
Constructs the object with default values- Parameters:
parent- the parent editorlabel- the label for this editor
-
-
Method Detail
-
getParent
protected final FileArrayEditor.EditorParent getParent()
-
getUI
public JComponent getUI()
Retrieves the editor UI.- Returns:
- the editor UI
-
setFiles
public void setFiles(List<File> files)
Sets the list of files to be edited. The list currently held is overwritten.- Parameters:
files-ListofFiles to be set
-
getFiles
public List<File> getFiles()
Retrieves the list of files currently edited- Returns:
- a
Listof currently editedFiles
-
setListener
public void setListener(FileArrayEditor.FileArrayEditorListener listener)
Sets the listener for this class- Parameters:
listener- the listener to associate with this editor
-
createRemoveFileButton
public JButton createRemoveFileButton()
-
createAddFileButton
public JButton createAddFileButton()
-
createFileArrayComponent
public JComponent createFileArrayComponent()
-
createFileChooserDialog
protected JFileChooser createFileChooserDialog()
-
-