javazoom.jlgui.player.amp.util
Class FileSelector
java.lang.Object
javazoom.jlgui.player.amp.util.FileSelector
public class FileSelector
- extends java.lang.Object
This class is used to select a file or directory for loading or saving.
Method Summary |
java.io.File |
getDirectory()
|
java.io.File[] |
getFiles()
|
static FileSelector |
getInstance()
|
static java.io.File[] |
selectFile(Loader loader,
int mode,
boolean multiple,
java.io.File defaultFile,
java.lang.String extensions,
java.lang.String description,
java.lang.String titlePrefix,
java.io.File directory)
Opens a dialog box so that the user can search for a file
with the given extension and returns the filename selected. |
static java.io.File[] |
selectFile(Loader loader,
int mode,
boolean multiple,
java.lang.String extensions,
java.lang.String description,
java.io.File directory)
Opens a dialog box so that the user can search for a file
with the given extension and returns the filename selected. |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
OPEN
public static final int OPEN
- See Also:
- Constant Field Values
SAVE
public static final int SAVE
- See Also:
- Constant Field Values
SAVE_AS
public static final int SAVE_AS
- See Also:
- Constant Field Values
DIRECTORY
public static final int DIRECTORY
- See Also:
- Constant Field Values
FileSelector
public FileSelector()
getFiles
public java.io.File[] getFiles()
getDirectory
public java.io.File getDirectory()
getInstance
public static final FileSelector getInstance()
selectFile
public static java.io.File[] selectFile(Loader loader,
int mode,
boolean multiple,
java.lang.String extensions,
java.lang.String description,
java.io.File directory)
- Opens a dialog box so that the user can search for a file
with the given extension and returns the filename selected.
- Parameters:
extensions
- the extension of the filename to be selected,
or "" if any filename can be useddirectory
- the folder to be put in the starting directorymode
- the action that will be performed on the file, used to tell what
files are valid
- Returns:
- the selected file
selectFile
public static java.io.File[] selectFile(Loader loader,
int mode,
boolean multiple,
java.io.File defaultFile,
java.lang.String extensions,
java.lang.String description,
java.lang.String titlePrefix,
java.io.File directory)
- Opens a dialog box so that the user can search for a file
with the given extension and returns the filename selected.
- Parameters:
extensions
- the extension of the filename to be selected,
or "" if any filename can be usedtitlePrefix
- the string to be put in the title, followed by : SaveAsmode
- the action that will be performed on the file, used to tell what
files are validdefaultFile
- the default filedirectory
- the string to be put in the starting directory
- Returns:
- the selected filename
JavaZOOM 1999-2006