boolean | accept(File f)- Returns
true if the file is accepted by the current
file filter.
|
void | addActionListener(ActionListener l)- Adds an
ActionListener to the file chooser.
|
void | addChoosableFileFilter(FileFilter filter)- Adds a file filter to the list of available filters and sends a
PropertyChangeEvent (with the property name
CHOOSABLE_FILE_FILTER_CHANGED_PROPERTY) to all registered
listeners.
|
void | approveSelection()- Approves the selection.
|
void | cancelSelection()- Cancels the selection.
|
void | changeToParentDirectory()- Called by the UI delegate when the parent directory is changed.
|
protected JDialog | createDialog(Component parent)- Creates a modal dialog in which to display the file chooser.
|
void | ensureFileIsVisible(File f)- Ensures the the specified file is visible (this is handled by the
UI delegate).
|
protected void | fireActionPerformed(String command)- Sends an @link {ActionEvent} to all registered listeners.
|
FileFilter | getAcceptAllFileFilter()- Returns the 'accept all' file filter from the UI delegate.
|
AccessibleContext | getAccessibleContext()- Returns the object that provides accessibility features for this
JFileChooser component.
|
JComponent | getAccessory()- Returns the accessory component for the file chooser.
|
ActionListener[] | getActionListeners()- Returns the action listeners registered with this file chooser.
|
int | getApproveButtonMnemonic()- Returns the approve button mnemonic, or zero if no mnemonic has been set.
|
String | getApproveButtonText()- Returns the approve button text.
|
String | getApproveButtonToolTipText()- Returns the tool tip text for the approve button.
|
FileFilter[] | getChoosableFileFilters()- Returns the available file filters for this file chooser.
|
boolean | getControlButtonsAreShown()- Returns the flag that controls whether or not the control buttons are
shown on the file chooser.
|
File | getCurrentDirectory()- Returns the current directory.
|
String | getDescription(File f)- Returns the description of the file, generated by the current (or default)
FileView.
|
String | getDialogTitle()- Returns the dialog title.
|
int | getDialogType()- Returns the type of file chooser.
|
boolean | getDragEnabled()- Returns true if dragging is enabled.
|
FileFilter | getFileFilter()- Returns the file filter.
|
int | getFileSelectionMode()- Returns the file selection mode, one of:
FILES_ONLY,
DIRECTORIES_ONLY or FILES_AND_DIRECTORIES.
|
FileSystemView | getFileSystemView()- Returns the file system view being used by this file chooser.
|
FileView | getFileView()- Returns the custom
FileView for the file chooser.
|
Icon | getIcon(File f)- Returns the icon provided by the current (or default)
FileView.
|
String | getName(File f)- Returns the name of the file, generated by the current (or default)
FileView.
|
File | getSelectedFile()- Returns the selected file, if there is one.
|
File[] | getSelectedFiles()- Returns the selected file or files in an array.
|
String | getTypeDescription(File f)- Returns the type description for the file, generated by the current (or
default)
FileView.
|
FileChooserUI | getUI()- Returns the UI delegate for the component.
|
String | getUIClassID()- Returns the UI delegate class identifier.
|
boolean | isAcceptAllFileFilterUsed()- Returns the flag that controls whether or not the 'accept all' file
filter is included in the list of filters.
|
boolean | isDirectorySelectionEnabled()- Returns
true if directory selection is enabled, and
false otherwise.
|
boolean | isFileHidingEnabled()- Returns
true if hidden files are to be hidden, and
false otherwise.
|
boolean | isFileSelectionEnabled()- Returns
true if file selection is enabled, and
false otherwise.
|
boolean | isMultiSelectionEnabled()- Returns
true if multiple selections are allowed within this
file chooser, and false otherwise.
|
boolean | isTraversable(File f)- Returns
true if the file is traversable, and
false otherwise.
|
protected String | paramString()- Returns a string describing the attributes for the
JFileChooser component, for use in debugging.
|
void | removeActionListener(ActionListener l)- Removes an
ActionListener from this file chooser.
|
boolean | removeChoosableFileFilter(FileFilter f)- Removes a file filter from the list of available filters and sends a
PropertyChangeEvent (with the property name
CHOOSABLE_FILE_FILTER_CHANGED_PROPERTY) to all registered
listeners.
|
void | rescanCurrentDirectory()- Rescans the current directory (this is handled by the UI delegate).
|
void | resetChoosableFileFilters()- Clears the list of choosable file filters and installs the 'accept all'
filter from the UI delegate.
|
void | setAcceptAllFileFilterUsed(boolean b)- Sets the flag that controls whether or not the 'accept all' file filter
is included in the list of filters, and sends a
PropertyChangeEvent (with the property name
ACCEPT_ALL_FILE_FILTER_USED_CHANGED_PROPERTY) to all registered
listeners.
|
void | setAccessory(JComponent newAccessory)- Sets the accessory component for the file chooser and sends a
PropertyChangeEvent to all registered listeners.
|
void | setApproveButtonMnemonic(char mnemonic)- Sets the mnemonic for the approve button and sends a
PropertyChangeEvent (with the property name
APPROVE_BUTTON_MNEMONIC_CHANGED_PROPERTY) to all registered
listeners.
|
void | setApproveButtonMnemonic(int mnemonic)- Sets the mnemonic for the approve button and sends a
PropertyChangeEvent (with the property name
APPROVE_BUTTON_MNEMONIC_CHANGED_PROPERTY) to all registered
listeners.
|
void | setApproveButtonText(String approveButtonText)- Sets the approve button text and fires a
PropertyChangeEvent
(with the property name APPROVE_BUTTON_TEXT_CHANGED_PROPERTY) to
all registered listeners.
|
void | setApproveButtonToolTipText(String toolTipText)- Sets the tool tip text for the approve button and sends a
PropertyChangeEvent (with the property name
APPROVE_BUTTON_TOOL_TIP_TEXT_CHANGED_PROPERTY) to all
registered listeners.
|
void | setControlButtonsAreShown(boolean b)- Sets the flag that controls whether or not the control buttons are
shown and, if it changes, sends a
PropertyChangeEvent (with the
property name CONTROL_BUTTONS_ARE_SHOWN_CHANGED_PROPERTY) to
all registered listeners.
|
void | setCurrentDirectory(File dir)- Sets the current directory and fires a
PropertyChangeEvent (with
the property name DIRECTORY_CHANGED_PROPERTY) to all registered
listeners.
|
void | setDialogTitle(String dialogTitle)- Sets the dialog title and sends a
PropertyChangeEvent (with the
property name DIALOG_TITLE_CHANGED_PROPERTY) to all
registered listeners.
|
void | setDialogType(int dialogType)- Sets the dialog type and fires a
PropertyChangeEvent (with the
property name DIALOG_TYPE_CHANGED_PROPERTY) to all
registered listeners.
|
void | setDragEnabled(boolean b)- Sets the dragEnabled property, this disables/enables automatic drag
handling (drag and drop) on this component.
|
void | setFileFilter(FileFilter filter)- Sets the file filter and sends a
PropertyChangeEvent (with the
property name FILE_FILTER_CHANGED_PROPERTY) to all registered
listeners.
|
void | setFileHidingEnabled(boolean b)- Sets the flag that controls whether or not hidden files are displayed,
and sends a
PropertyChangeEvent (with the property name
FILE_HIDING_CHANGED_PROPERTY) to all registered listeners.
|
void | setFileSelectionMode(int mode)- Sets the file selection mode and sends a
PropertyChangeEvent
to all registered listeners.
|
void | setFileSystemView(FileSystemView fsv)- Sets the file system view for the file chooser and sends a
PropertyChangeEvent to all registered listeners.
|
void | setFileView(FileView fileView)- Sets a custom
FileView for the file chooser and sends a
PropertyChangeEvent to all registered listeners.
|
void | setMultiSelectionEnabled(boolean b)- Sets the flag that controls whether multiple selections are allowed in
this filechooser and sends a
PropertyChangeEvent (with the
property name MULTI_SELECTION_ENABLED_CHANGED_PROPERTY) to all
registered listeners.
|
void | setSelectedFile(File file)- Sets the selected file and sends a
PropertyChangeEvent to all
registered listeners.
|
void | setSelectedFiles(File[] selectedFiles)- Sets the selected files and sends a
PropertyChangeEvent (with the
name SELECTED_FILES_CHANGED_PROPERTY) to all registered
listeners.
|
protected void | setup(FileSystemView view)- Sets up the file chooser.
|
int | showDialog(Component parent, String approveButtonText)- Displays the file chooser in a modal dialog using the
CUSTOM_DIALOG type.
|
int | showOpenDialog(Component parent)- Displays the file chooser in a modal dialog using the
OPEN_DIALOG type.
|
int | showSaveDialog(Component parent)- Displays the file chooser in a modal dialog using the
SAVE_DIALOG type.
|
void | updateUI()- Installs the UI delegate for the current look and feel.
|