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 for loading or saving. It's mainly
a wrapper class for java.awt.FileDialog.
- Version:
- 1.0.0
- Author:
- Jeremy Cloud
- See Also:
FileDialog
Method Summary |
static java.lang.String |
getDirectory()
|
static java.lang.String |
getFile()
|
static java.lang.String |
selectFile(int mode,
java.lang.String extensions,
java.lang.String 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.lang.String |
selectFile(int mode,
java.lang.String default_name,
java.lang.String extensions,
java.lang.String title_prefix,
java.lang.String dir)
Opens a dialog box so that the user can search for a file
with the given extension and returns the filename selected. |
static void |
setStartDirectory(java.lang.String choice)
|
static void |
setWindow(java.awt.Frame frame)
|
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
FileSelector
public FileSelector()
getFile
public static java.lang.String getFile()
getDirectory
public static java.lang.String getDirectory()
setStartDirectory
public static void setStartDirectory(java.lang.String choice)
setWindow
public static void setWindow(java.awt.Frame frame)
selectFile
public static java.lang.String selectFile(int mode,
java.lang.String extensions,
java.lang.String directory)
- Opens a dialog box so that the user can search for a file
with the given extension and returns the filename selected.
- Parameters:
directory
- the string 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 filename
selectFile
public static java.lang.String selectFile(int mode,
java.lang.String default_name,
java.lang.String extensions,
java.lang.String title_prefix,
java.lang.String dir)
- Opens a dialog box so that the user can search for a file
with the given extension and returns the filename selected.
- Parameters:
title_prefix
- 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 validdefault_name
- the default name of the file
- Returns:
- the selected filename
JavaZOOM 1999-2004