javazoom.jlgui.player.amp.util

Class FileSelector


public class FileSelector
extends java.lang.Object

This class is used to select a file or directory for loading or saving.

Field Summary

static int
DIRECTORY
static int
OPEN
static int
SAVE
static int
SAVE_AS

Method Summary

File
getDirectory()
File[]
getFiles()
static FileSelector
getInstance()
static File[]
selectFile(Loader loader, int mode, boolean multiple, File defaultFile, String extensions, String description, String titlePrefix, 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 File[]
selectFile(Loader loader, int mode, boolean multiple, String extensions, String description, File directory)
Opens a dialog box so that the user can search for a file with the given extension and returns the filename selected.

Field Details

DIRECTORY

public static final int DIRECTORY
Field Value:
4

OPEN

public static final int OPEN
Field Value:
1

SAVE

public static final int SAVE
Field Value:
2

SAVE_AS

public static final int SAVE_AS
Field Value:
3

Method Details

getDirectory

public File getDirectory()

getFiles

public File[] getFiles()

getInstance

public static final FileSelector getInstance()

selectFile

public static File[] selectFile(Loader loader,
                                int mode,
                                boolean multiple,
                                File defaultFile,
                                String extensions,
                                String description,
                                String titlePrefix,
                                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:
mode - the action that will be performed on the file, used to tell what files are valid
defaultFile - the default file
extensions - the extension of the filename to be selected, or "" if any filename can be used
titlePrefix - the string to be put in the title, followed by : SaveAs
directory - the string to be put in the starting directory
Returns:
the selected filename

selectFile

public static File[] selectFile(Loader loader,
                                int mode,
                                boolean multiple,
                                String extensions,
                                String description,
                                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:
mode - the action that will be performed on the file, used to tell what files are valid
extensions - the extension of the filename to be selected, or "" if any filename can be used
directory - the folder to be put in the starting directory
Returns:
the selected file

JavaZOOM 1999-2006