javazoom.jlgui.player.amp.util
Class FileSelector

java.lang.Object
  extended by 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.


Field Summary
static int DIRECTORY
           
static int OPEN
           
static int SAVE
           
static int SAVE_AS
           
 
Constructor Summary
FileSelector()
           
 
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
 

Field Detail

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
Constructor Detail

FileSelector

public FileSelector()
Method Detail

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 used
directory - the folder to be put in the starting directory
mode - 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 used
titlePrefix - the string to be put in the title, followed by : SaveAs
mode - the action that will be performed on the file, used to tell what files are valid
defaultFile - the default file
directory - the string to be put in the starting directory
Returns:
the selected filename


JavaZOOM 1999-2006