| 
 | |||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES All Classes | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||
java.lang.Objectchrriis.dj.nativeswing.swtimpl.components.JFileDialog
public class JFileDialog
A native file selection dialog.
| Nested Class Summary | |
|---|---|
| static class | JFileDialog.DialogTypeThe types that a file dialog supports. | 
| static class | JFileDialog.SelectionModeA representation of the selection modes that a file dialog supports. | 
| Constructor Summary | |
|---|---|
| JFileDialog() | |
| Method Summary | |
|---|---|
|  JFileDialog.DialogType | getDialogType()Get the dialog type. | 
|  String[] | getExtensionFilters()Get the extension filters. | 
|  String[] | getExtensionFiltersNames()Get the names corresponding to the extension filters. | 
|  String | getParentDirectory()Get the parent directory of the files that will be/were shown. | 
|  int | getSelectedExtensionFilterIndex()Get the index of the selected extension filter. | 
|  String | getSelectedFileName()Get the file name of the first file that was selected relative to the parent directory. | 
|  String[] | getSelectedFileNames()Get the file names of the files that was selected relative to the parent directory. | 
|  JFileDialog.SelectionMode | getSelectionMode()Get the selection mode. | 
|  String | getTitle()Get the title of the file dialog. | 
|  boolean | isConfirmedOverwrite()Indicate whether save dialogs should ask for confirmation when the file that is selected already exists. | 
|  void | setConfirmedOverwrite(boolean isConfirmedOverwrite)For save dialogs, indicates whether the selection of a file should confirm the selection of an existing file. | 
|  void | setDialogType(JFileDialog.DialogType dialogType)Set the dialog type. | 
|  void | setExtensionFilters(String[] extensionFilters,
                    String[] extensionFiltersNames,
                    int selectedExtensionFilterIndex)Set the extension filters, with optional descriptions, and set which index is selected by default. | 
|  void | setParentDirectory(String parentDirectory)Set the parent directory of the files that will be shown. | 
|  void | setSelectedFileName(String selectedFileName)Set the file name that the dialog will select by default. | 
|  void | setSelectionMode(JFileDialog.SelectionMode selectionMode)Set the selection mode. | 
|  void | setTitle(String title)Set the title of the file dialog. | 
|  void | show(Component component)Show the file selection dialog, which is a blocking call until the user has made a choice. | 
| Methods inherited from class java.lang.Object | 
|---|
| clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait | 
| Constructor Detail | 
|---|
public JFileDialog()
| Method Detail | 
|---|
public void show(Component component)
component - The parent component.public String getSelectedFileName()
public String[] getSelectedFileNames()
public void setSelectedFileName(String selectedFileName)
selectedFileName - the name of the file to select or null if no file is to be selected.public JFileDialog.SelectionMode getSelectionMode()
public void setSelectionMode(JFileDialog.SelectionMode selectionMode)
selectionMode - the selection mode to set.public JFileDialog.DialogType getDialogType()
public void setDialogType(JFileDialog.DialogType dialogType)
dialogType - the type of dialog.public void setConfirmedOverwrite(boolean isConfirmedOverwrite)
isConfirmedOverwrite - indicate whether selecting an existing file should confirm overwriting it.public boolean isConfirmedOverwrite()
public String getParentDirectory()
public void setParentDirectory(String parentDirectory)
parentDirectory - The parent directory or null to use the default.public void setExtensionFilters(String[] extensionFilters,
                                String[] extensionFiltersNames,
                                int selectedExtensionFilterIndex)
extensionFilters - an array of extensions typically in the form "*.extension" or null. A filter with multiple extension uses semicolon as a separator, e.g. "*.jpg;*.png".extensionFiltersNames - the array of names corresponding to each extension filter, or null.selectedExtensionFilterIndex - the index that is selected by default.public String[] getExtensionFilters()
public String[] getExtensionFiltersNames()
public int getSelectedExtensionFilterIndex()
public void setTitle(String title)
title - the title to set or null to use the default title.public String getTitle()
| 
 | |||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES All Classes | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||