public class SelectFile extends Object
Modifier and Type | Method and Description |
---|---|
static File |
selectFile(Component parent,
String title,
String defaultdir,
boolean save,
boolean showHiddenFiles,
int mode,
String[]... filetypes)
Encapsulates a file selector.
|
static File |
selectFile(Component parent,
String title,
String defaultdir,
boolean save,
boolean showHiddenFiles,
String fileTypeDesc,
String extension)
Version of the file selector with exactly one file extension.
|
public static File selectFile(Component parent, String title, String defaultdir, boolean save, boolean showHiddenFiles, String fileTypeDesc, String extension)
parent
- title
- save
- defaultdir
- showHiddenFiles
- extension
- fileTypeDesc
- public static File selectFile(Component parent, String title, String defaultdir, boolean save, boolean showHiddenFiles, int mode, String[]... filetypes)
parent
- Component, to which the popup will be positioned.title
- Title of the popup. Also identifies the file selector.save
- True iff the file is to be written.defaultdir
- Default direcory if not stored in the class' static memory.showHiddenFiles
- If true show also "hidden files".mode
- the type of files to be displayed: JFileChooser.FILES_ONLY, JFileChooser.DIRECTORIES_ONLY, JFileChooser.FILES_AND_DIRECTORIES.filetypes
- Variable number of file extensions, as pair of strings.Copyright © 2016. All rights reserved.