Package gov.nih.mipav.view
Interface FileSelector
- All Known Implementing Classes:
FileSelectorImpl
public interface FileSelector
The FileSelector interface defines the interface for file selector
which is used to select files.
- Version:
- 1.0 06/16/2006
- Author:
- Hailong Wang, Ph.D
-
Method Summary
Modifier and TypeMethodDescriptionReturns the file filter used byFileSelector.String[]Returns the selected file names.voidsetFileFilter(FileFilter fileFilter) Sets the file filter to theFileSelector.voidshowOpenDialog(Component parent) Shows the open dialog to retrieve the user's input, the approve button will be "Open", and title will be "Open Image", only files are displayed, multi selection will be allowed.voidshowSaveAsDialog(Component parent) Shows the save as dialog to retrieve the user's input, the approve button will be "Save", and title will be "Save Image As", only file are displayed, multi selection is not allowed.voidshowSaveDialog(Component parent) Shows the open dialog to retrieve the user's input, the approve button will be "Save", and title will be "Save Image", only directory are displayed, multi selection is not allowed.
-
Method Details
-
getSelectedFileNames
String[] getSelectedFileNames()Returns the selected file names. Notes: I want this interface to cover the SRB file selection. So I used the string array as the return type.- Returns:
- the selected file names.
-
getFileFilter
FileFilter getFileFilter()Returns the file filter used byFileSelector.- Returns:
- the file filter used by
FileSelector.
-
setFileFilter
Sets the file filter to theFileSelector.- Parameters:
fileFilter- the new file filter.
-
showOpenDialog
Shows the open dialog to retrieve the user's input, the approve button will be "Open", and title will be "Open Image", only files are displayed, multi selection will be allowed.- Parameters:
parent- the parent component
-
showSaveDialog
Shows the open dialog to retrieve the user's input, the approve button will be "Save", and title will be "Save Image", only directory are displayed, multi selection is not allowed.- Parameters:
parent- the parent component
-
showSaveAsDialog
Shows the save as dialog to retrieve the user's input, the approve button will be "Save", and title will be "Save Image As", only file are displayed, multi selection is not allowed.- Parameters:
parent- the parent component
-