javazoom.jlgui.player.amp.util
Class FileSelector

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

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

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

FileSelector

public FileSelector()
Method Detail

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 directory
mode - 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 : SaveAs
mode - the action that will be performed on the file, used to tell what files are valid
default_name - the default name of the file
Returns:
the selected filename


JavaZOOM 1999-2004