|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectcom.limegroup.gnutella.gui.FileChooserHandler
This is a utility class that displays a file chooser dialog to the user, automatically selecting the appropriate dialog based on the operating system, the current theme, etc. For example, if the user is on OS X and is not using the default theme, this displays the standard MetalLookAndFeel file chooser, as that is the only one that will appear with themes.
Constructor Summary | |
FileChooserHandler()
|
Method Summary | |
static java.io.File |
getInput(java.awt.Component parent,
java.lang.String titleKey,
java.lang.String approveKey,
java.io.File directory,
int mode,
int option)
The implementation that the other methods delegate to. |
static java.io.File |
getInput(java.awt.Component parent,
java.lang.String titleKey,
java.lang.String approveKey,
java.io.File directory,
int mode,
int option,
javax.swing.filechooser.FileFilter filter)
The implementation that the other methods delegate to. |
static java.io.File |
getInputDirectory()
Displays a directory chooser to the user and returns the selected File. |
static java.io.File |
getInputDirectory(java.awt.Component parent)
Same as getInputDirectory that takes no arguments, except this allows the caller to specify the parent component of the chooser. |
static java.io.File |
getInputDirectory(java.awt.Component parent,
java.io.File directory)
Same as getInputFile that takes no arguments, except this allows the caller to specify the parent component of the chooser as well as other options. |
static java.io.File |
getInputDirectory(java.awt.Component parent,
java.io.File directory,
javax.swing.filechooser.FileFilter filter)
Same as getInputFile that takes no arguments, except this allows the caller to specify the parent component of the chooser as well as other options. |
static java.io.File |
getInputDirectory(java.awt.Component parent,
java.lang.String titleKey,
java.io.File directory)
Same as getInputFile that takes no arguments, except this allows the caller to specify the parent component of the chooser as well as other options. |
static java.io.File |
getInputDirectory(java.awt.Component parent,
java.lang.String titleKey,
java.io.File directory,
javax.swing.filechooser.FileFilter filter)
Same as getInputFile that takes no arguments, except this allows the caller to specify the parent component of the chooser as well as other options. |
static java.io.File |
getInputDirectory(java.awt.Component parent,
java.lang.String titleKey,
java.lang.String approveKey,
java.io.File directory)
Same as getInputFile that takes no arguments, except this allows the caller to specify the parent component of the chooser as well as other options. |
static java.io.File |
getInputDirectory(java.awt.Component parent,
java.lang.String titleKey,
java.lang.String approveKey,
java.io.File directory,
javax.swing.filechooser.FileFilter filter)
Same as getInputFile that takes no arguments, except this allows the caller to specify the parent component of the chooser as well as other options. |
static java.io.File |
getInputFile()
Displays a file chooser to the user and returns the selected File. |
static java.io.File |
getInputFile(java.awt.Component parent)
Same as getInputFile that takes no arguments, except this allows the caller to specify the parent component of the chooser. |
static java.io.File |
getInputFile(java.awt.Component parent,
javax.swing.filechooser.FileFilter filter)
Same as getInputFile that takes no arguments, except this allows the caller to specify the parent component of the chooser. |
static java.io.File |
getInputFile(java.awt.Component parent,
java.lang.String titleKey,
java.io.File directory)
Same as getInputFile that takes no arguments, except this allows the caller to specify the parent component of the chooser. |
static java.io.File |
getInputFile(java.awt.Component parent,
java.lang.String titleKey,
java.io.File directory,
javax.swing.filechooser.FileFilter filter)
Same as getInputFile that takes no arguments, except this allows the caller to specify the parent component of the chooser. |
static java.io.File |
getInputFile(java.awt.Component parent,
java.lang.String titleKey,
java.lang.String approveKey,
java.io.File directory)
Same as getInputFile that takes no arguments, except this allows the caller to specify the parent component of the chooser. |
static java.io.File |
getInputFile(java.awt.Component parent,
java.lang.String titleKey,
java.lang.String approveKey,
java.io.File directory,
javax.swing.filechooser.FileFilter filter)
Same as getInputFile that takes no arguments, except this allows the caller to specify the parent component of the chooser. |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
public FileChooserHandler()
Method Detail |
public static java.io.File getInputDirectory()
public static java.io.File getInputDirectory(java.awt.Component parent)
parent
- the Component that should be the dialog's
parent
public static java.io.File getInputDirectory(java.awt.Component parent, java.io.File directory)
parent
- the Component that should be the dialog's
parentdirectory
- the directory to open the dialog to
public static java.io.File getInputDirectory(java.awt.Component parent, java.io.File directory, javax.swing.filechooser.FileFilter filter)
parent
- the Component that should be the dialog's
parentdirectory
- the directory to open the dialog tofilter
- the FileFilter instance for customizing
the files that are displayed -- if this is null, no filter is used
public static java.io.File getInputDirectory(java.awt.Component parent, java.lang.String titleKey, java.io.File directory)
parent
- the Component that should be the dialog's
parenttitleKey
- the key for the locale-specific string to use for
the file dialog titledirectory
- the directory to open the dialog to
public static java.io.File getInputDirectory(java.awt.Component parent, java.lang.String titleKey, java.io.File directory, javax.swing.filechooser.FileFilter filter)
parent
- the Component that should be the dialog's
parenttitleKey
- the key for the locale-specific string to use for
the file dialog titledirectory
- the directory to open the dialog tofilter
- the FileFilter instance for customizing
the files that are displayed -- if this is null, no filter is used
public static java.io.File getInputDirectory(java.awt.Component parent, java.lang.String titleKey, java.lang.String approveKey, java.io.File directory)
parent
- the Component that should be the dialog's
parenttitleKey
- the key for the locale-specific string to use for
the file dialog titleapproveKey
- the key for the locale-specific string to use for
the approve button textdirectory
- the directory to open the dialog to
public static java.io.File getInputDirectory(java.awt.Component parent, java.lang.String titleKey, java.lang.String approveKey, java.io.File directory, javax.swing.filechooser.FileFilter filter)
parent
- the Component that should be the dialog's
parenttitleKey
- the key for the locale-specific string to use for
the file dialog titleapproveKey
- the key for the locale-specific string to use for
the approve button textdirectory
- the directory to open the dialog tofilter
- the FileFilter instance for customizing
the files that are displayed -- if this is null, no filter is used
public static java.io.File getInputFile()
public static java.io.File getInputFile(java.awt.Component parent)
parent
- the Component that should be the dialog's
parent
public static java.io.File getInputFile(java.awt.Component parent, javax.swing.filechooser.FileFilter filter)
parent
- the Component that should be the dialog's
parentfilter
- the FileFilter instance for customizing
the files that are displayed -- if this is null, no filter is used
public static java.io.File getInputFile(java.awt.Component parent, java.lang.String titleKey, java.io.File directory)
parent
- the Component that should be the dialog's
parenttitleKey
- the key for the locale-specific string to use for
the file dialog titledirectory
- the directory to open the dialog to
public static java.io.File getInputFile(java.awt.Component parent, java.lang.String titleKey, java.io.File directory, javax.swing.filechooser.FileFilter filter)
parent
- the Component that should be the dialog's
parenttitleKey
- the key for the locale-specific string to use for
the file dialog titledirectory
- the directory to open the dialog tofilter
- the FileFilter instance for customizing
the files that are displayed -- if this is null, no filter is used
public static java.io.File getInputFile(java.awt.Component parent, java.lang.String titleKey, java.lang.String approveKey, java.io.File directory)
parent
- the Component that should be the dialog's
parenttitleKey
- the key for the locale-specific string to use for
the file dialog titleapproveKey
- the key for the locale-specific string to use for
the approve button textdirectory
- the directory to open the dialog to
public static java.io.File getInputFile(java.awt.Component parent, java.lang.String titleKey, java.lang.String approveKey, java.io.File directory, javax.swing.filechooser.FileFilter filter)
parent
- the Component that should be the dialog's
parenttitleKey
- the key for the locale-specific string to use for
the file dialog titleapproveKey
- the key for the locale-specific string to use for
the approve button textdirectory
- the directory to open the dialog tofilter
- the FileFilter instance for customizing
the files that are displayed -- if this is null, no filter is used
public static java.io.File getInput(java.awt.Component parent, java.lang.String titleKey, java.lang.String approveKey, java.io.File directory, int mode, int option)
parent
- the Component that should be the dialog's
parenttitleKey
- the key for the locale-specific string to use for
the file dialog titleapproveKey
- the key for the locale-specific string to use for
the approve button textdirectory
- the directory to open the dialog tomode
- the "mode" to open the JFileChooser in from
the JFileChooser class, such as
JFileChooser.DIRECTORIES_ONLYoption
- the option to look for in the return code, such as
JFileChooser.APPROVE_OPTION
public static java.io.File getInput(java.awt.Component parent, java.lang.String titleKey, java.lang.String approveKey, java.io.File directory, int mode, int option, javax.swing.filechooser.FileFilter filter)
parent
- the Component that should be the dialog's
parenttitleKey
- the key for the locale-specific string to use for
the file dialog titleapproveKey
- the key for the locale-specific string to use for
the approve button textdirectory
- the directory to open the dialog tomode
- the "mode" to open the JFileChooser in from
the JFileChooser class, such as
JFileChooser.DIRECTORIES_ONLYoption
- the option to look for in the return code, such as
JFileChooser.APPROVE_OPTIONfilter
- the FileFilter instance for customizing
the files that are displayed -- if this is null, no filter is used
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |