| ||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
IdePathChooser provides a simple mechanism for the user to choose a path.
| Method Summary | |
String | getApproveButtonText()Returns the text used in the ApproveButton in the FileChooserUI. |
File | getCurrentDirectory()Returns the current directory. |
String | getDialogTitle()Gets the string displayed in the FileChooser's titlebar. |
FileFilter | getFileFilter()Returns the currently selected file filter. |
int | getFileSelectionMode()Returns the current file-selection mode. |
File | getSelectedFile()Returns the selected file. |
File[] | getSelectedFiles()Returns a list of selected files if the file chooser is set to allow multiple selection. |
boolean | isFileHidingEnabled() |
boolean | isMultiSelectionEnabled()Returns true if multiple files can be selected. |
void | setApproveButtonText(String approveButtonText)Sets specified text for the ApproveButton in the FileChooserUI. |
void | setCurrentDirectory(File dir)Sets the current directory. |
void | setDialogTitle(String dialogTitle)Sets specified string to be displayed in the FileChooser window's title bar. |
void | setFileFilter(FileFilter filter)Sets the current File Filter. |
void | setFileHidingEnabled(boolean b)Sets file hiding on or off. |
void | setFileSelectionMode(int mode)Sets the FileChooser to allow the user to select only files, to select only directories, or to select both files and directories. |
void | setMultiSelectionEnabled(boolean b)Sets the file chooser to allow multiple file selections. |
void | setSelectedFile(File selectedFile)Sets the selected file. |
void | setSelectedFiles(File[] selectedFiles)Sets the list of selected files if the file chooser is set to allow multiple selection. |
int | showDialog(Component parent)Displays the file chooser dialog. |
| Method Detail |
public String getApproveButtonText()
null, the UI object will determine the button's text. Typically, this would be "Open" or "Save".String text used in the ApproveButtonpublic File getCurrentDirectory()
public String getDialogTitle()
String title of the file chooserpublic FileFilter getFileFilter()
FileFilter object representing the current file filter.public int getFileSelectionMode()
int indicating the type of dialog to be displayed:
public File getSelectedFile()
public File[] getSelectedFiles()
public boolean isFileHidingEnabled()
public boolean isMultiSelectionEnabled()
public void setApproveButtonText(String approveButtonText)
String text used in the ApproveButtonpublic void setCurrentDirectory(File dir)
null sets the filechooser to point to the users's home directory.
If the file passed in as dir is not a directory, the
parent of this file will be used as the current directory. If the
parent is not traversable, then it will walk up the parent tree
until it finds a traversable directory, or hits the root of the file system.
File object representing the current directory to point topublic void setDialogTitle(String dialogTitle)
String title of the dialogpublic void setFileFilter(FileFilter filter)
public void setFileHidingEnabled(boolean b)
public void setFileSelectionMode(int mode)
int type of dialog to be displayed: FILES_ONLY, DIRECTORIES_ONLY, FILES_AND_DIRECTORIESpublic void setMultiSelectionEnabled(boolean b)
NOTE: this functionality is not yet implemented in the some L&Fs.
public void setSelectedFile(File selectedFile)
public void setSelectedFiles(File[] selectedFiles)
public int showDialog(Component parent)
Component is not
null, the frame of the Component is used as the parent frame for the dialog box.Component descendant used to determine the parent of the dialog box.int state of the filechooser on popdown: CANCEL_OPTION, APPROVE_OPTION
| ||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||