public class BasicFileChooserUI extends javax.swing.plaf.FileChooserUI
JFileChooser component under the
BasicLookAndFeel.| Modifier and Type | Class and Description |
|---|---|
protected class |
BasicFileChooserUI.AcceptAllFileFilter
A file filter that accepts all files.
|
protected class |
BasicFileChooserUI.ApproveSelectionAction
Handles a user action to approve the dialog selection.
|
protected class |
BasicFileChooserUI.BasicFileView
Provides presentation information about files and directories.
|
protected class |
BasicFileChooserUI.CancelSelectionAction
Handles an action to cancel the file chooser.
|
protected class |
BasicFileChooserUI.ChangeToParentDirectoryAction
An action to handle changes to the parent directory (for example, via
a click on the "up folder" button).
|
protected class |
BasicFileChooserUI.DoubleClickListener
A mouse listener that handles double-click events.
|
protected class |
BasicFileChooserUI.GoHomeAction
An action that changes the file chooser to display the user's home
directory.
|
protected class |
BasicFileChooserUI.NewFolderAction
An action that handles the creation of a new folder/directory.
|
protected class |
BasicFileChooserUI.SelectionListener
A listener for selection events in the file list.
|
protected class |
BasicFileChooserUI.UpdateAction
DOCUMENT ME!
|
| Modifier and Type | Field and Description |
|---|---|
protected int |
cancelButtonMnemonic
The localised mnemonic for the cancel button.
|
protected java.lang.String |
cancelButtonText
The localised text for the cancel button.
|
protected java.lang.String |
cancelButtonToolTipText
The localised tool tip text for the cancel button.
|
protected javax.swing.Icon |
computerIcon
An icon representing a computer.
|
protected javax.swing.Icon |
detailsViewIcon
An icon for the "details view" button.
|
protected javax.swing.Icon |
directoryIcon
An icon representing a directory.
|
protected int |
directoryOpenButtonMnemonic
The localised Mnemonic for the open button.
|
protected java.lang.String |
directoryOpenButtonText
The localised text for the open button.
|
protected java.lang.String |
directoryOpenButtonToolTipText
The localised tool tip text for the open button.
|
protected javax.swing.Icon |
fileIcon
An icon representing a file.
|
protected javax.swing.Icon |
floppyDriveIcon
An icon representing a floppy drive.
|
protected javax.swing.Icon |
hardDriveIcon
An icon representing a hard drive.
|
protected int |
helpButtonMnemonic
The localised mnemonic for the "help" button.
|
protected java.lang.String |
helpButtonText
The localised text for the "help" button.
|
protected java.lang.String |
helpButtonToolTipText
The localised tool tip text for the help button.
|
protected javax.swing.Icon |
homeFolderIcon
An icon representing the user's home folder.
|
protected javax.swing.Icon |
listViewIcon
An icon for the "list view" button.
|
protected javax.swing.Icon |
newFolderIcon
An icon for the "new folder" button.
|
protected int |
openButtonMnemonic
The localised mnemonic for the "open" button.
|
protected java.lang.String |
openButtonText
The localised text for the "open" button.
|
protected java.lang.String |
openButtonToolTipText
The localised tool tip text for the "open" button.
|
protected int |
saveButtonMnemonic
The localised mnemonic for the "save" button.
|
protected java.lang.String |
saveButtonText
The localised text for the "save" button.
|
protected java.lang.String |
saveButtonToolTipText
The localised tool tip text for the save button.
|
protected int |
updateButtonMnemonic
The localised mnemonic for the "update" button.
|
protected java.lang.String |
updateButtonText
The localised text for the "update" button.
|
protected java.lang.String |
updateButtonToolTipText
The localised tool tip text for the "update" button.
|
protected javax.swing.Icon |
upFolderIcon
An icon for the "up folder" button.
|
| Constructor and Description |
|---|
BasicFileChooserUI(javax.swing.JFileChooser b)
Creates a new
BasicFileChooserUI object. |
| Modifier and Type | Method and Description |
|---|---|
void |
clearIconCache()
Clears the icon cache.
|
protected java.awt.event.MouseListener |
createDoubleClickListener(javax.swing.JFileChooser fc,
javax.swing.JList list)
Creates a new listener to handle double-click events.
|
javax.swing.event.ListSelectionListener |
createListSelectionListener(javax.swing.JFileChooser fc)
Creates a new listener to handle selections in the file list.
|
protected void |
createModel()
Creates a new directory model.
|
java.beans.PropertyChangeListener |
createPropertyChangeListener(javax.swing.JFileChooser fc)
Creates a listener to handle changes to the properties of the given
file chooser component.
|
static javax.swing.plaf.ComponentUI |
createUI(javax.swing.JComponent c)
Returns a UI delegate for the given component.
|
void |
ensureFileIsVisible(javax.swing.JFileChooser fc,
java.io.File f)
NOT YET IMPLEMENTED.
|
javax.swing.filechooser.FileFilter |
getAcceptAllFileFilter(javax.swing.JFileChooser fc)
Returns the "accept all" file filter.
|
javax.swing.JPanel |
getAccessoryPanel()
Returns the optional accessory panel.
|
protected javax.swing.JButton |
getApproveButton(javax.swing.JFileChooser fc)
Returns the approve (open or save) button for the dialog.
|
int |
getApproveButtonMnemonic(javax.swing.JFileChooser fc)
Returns the approve button mnemonic.
|
java.lang.String |
getApproveButtonText(javax.swing.JFileChooser fc)
Returns the approve button text.
|
java.lang.String |
getApproveButtonToolTipText(javax.swing.JFileChooser fc)
Returns the tool tip text for the approve (open/save) button.
|
javax.swing.Action |
getApproveSelectionAction()
Returns the action that handles events for the "approve" button.
|
javax.swing.Action |
getCancelSelectionAction()
Returns the action that handles events for the "cancel" button.
|
javax.swing.Action |
getChangeToParentDirectoryAction()
Returns the action that handles events for the "up folder" control button.
|
java.lang.String |
getDialogTitle(javax.swing.JFileChooser fc)
Returns the dialog title.
|
protected java.io.File |
getDirectory()
Returns the current directory.
|
java.lang.String |
getDirectoryName()
Returns the current directory name.
|
javax.swing.JFileChooser |
getFileChooser()
Returns the
JFileChooser component that this UI delegate
represents. |
java.lang.String |
getFileName()
Returns the current file name.
|
javax.swing.filechooser.FileView |
getFileView(javax.swing.JFileChooser fc)
Returns the default file view (NOT the file view from the file chooser,
if there is one).
|
javax.swing.Action |
getGoHomeAction()
Creates and returns a new action that will be used with the "home folder"
button.
|
BasicDirectoryModel |
getModel()
Returns the directory model.
|
javax.swing.Action |
getNewFolderAction()
Creates and returns a new action that will be used with the "new folder"
button.
|
javax.swing.Action |
getUpdateAction()
Returns the update action (an instance of
BasicFileChooserUI.UpdateAction). |
void |
installComponents(javax.swing.JFileChooser fc)
Creates and install the subcomponents for the file chooser.
|
protected void |
installDefaults(javax.swing.JFileChooser fc)
Installs the defaults for this UI delegate.
|
protected void |
installIcons(javax.swing.JFileChooser fc)
Installs the icons for this UI delegate.
|
protected void |
installListeners(javax.swing.JFileChooser fc)
Installs the listeners required by this UI delegate.
|
protected void |
installStrings(javax.swing.JFileChooser fc)
Installs the strings used by this UI delegate.
|
void |
installUI(javax.swing.JComponent c)
Installs the UI for the specified component.
|
protected boolean |
isDirectorySelected()
Returns
true if a directory is selected, and
false otherwise. |
void |
rescanCurrentDirectory(javax.swing.JFileChooser fc)
Rescans the current directory.
|
protected void |
setDirectory(java.io.File f)
Sets the current directory.
|
void |
setDirectoryName(java.lang.String dirname)
Sets the directory name (NOT IMPLEMENTED).
|
protected void |
setDirectorySelected(boolean selected)
Sets the flag that indicates whether the current directory is selected.
|
void |
setFileName(java.lang.String filename)
Sets the file name.
|
void |
uninstallComponents(javax.swing.JFileChooser fc)
Uninstalls the components from the file chooser.
|
protected void |
uninstallDefaults(javax.swing.JFileChooser fc)
Uninstalls the defaults previously added by this UI delegate.
|
protected void |
uninstallIcons(javax.swing.JFileChooser fc)
Uninstalls the icons previously added by this UI delegate.
|
protected void |
uninstallListeners(javax.swing.JFileChooser fc)
Uninstalls the listeners previously installed by this UI delegate.
|
protected void |
uninstallStrings(javax.swing.JFileChooser fc)
Uninstalls the strings previously added by this UI delegate.
|
void |
uninstallUI(javax.swing.JComponent c)
Uninstalls this UI from the given component.
|
protected int cancelButtonMnemonic
protected java.lang.String cancelButtonText
protected java.lang.String cancelButtonToolTipText
protected javax.swing.Icon computerIcon
protected javax.swing.Icon detailsViewIcon
protected javax.swing.Icon directoryIcon
protected int directoryOpenButtonMnemonic
protected java.lang.String directoryOpenButtonText
protected java.lang.String directoryOpenButtonToolTipText
protected javax.swing.Icon fileIcon
protected javax.swing.Icon floppyDriveIcon
protected javax.swing.Icon hardDriveIcon
protected int helpButtonMnemonic
protected java.lang.String helpButtonText
protected java.lang.String helpButtonToolTipText
protected javax.swing.Icon homeFolderIcon
protected javax.swing.Icon listViewIcon
protected javax.swing.Icon newFolderIcon
protected int openButtonMnemonic
protected java.lang.String openButtonText
protected java.lang.String openButtonToolTipText
protected int saveButtonMnemonic
protected java.lang.String saveButtonText
protected java.lang.String saveButtonToolTipText
protected int updateButtonMnemonic
protected java.lang.String updateButtonText
protected java.lang.String updateButtonToolTipText
protected javax.swing.Icon upFolderIcon
public BasicFileChooserUI(javax.swing.JFileChooser b)
BasicFileChooserUI object.b - the file chooser component.public static javax.swing.plaf.ComponentUI createUI(javax.swing.JComponent c)
c - the component (should be a JFileChooser).public void installUI(javax.swing.JComponent c)
installUI in class javax.swing.plaf.ComponentUIc - the component (should be a JFileChooser).ComponentUI.uninstallUI(javax.swing.JComponent),
JComponent.setUI(javax.swing.plaf.ComponentUI),
JComponent.updateUI()public void uninstallUI(javax.swing.JComponent c)
uninstallUI in class javax.swing.plaf.ComponentUIc - the component (should be a JFileChooser).ComponentUI.installUI(javax.swing.JComponent),
JComponent.setUI(javax.swing.plaf.ComponentUI),
JComponent.updateUI()public void installComponents(javax.swing.JFileChooser fc)
fc - the file chooser.public void uninstallComponents(javax.swing.JFileChooser fc)
fc - the file chooser.protected void installListeners(javax.swing.JFileChooser fc)
fc - the file chooser.protected void uninstallListeners(javax.swing.JFileChooser fc)
fc - the file chooser.protected void installDefaults(javax.swing.JFileChooser fc)
fc - the file chooser.protected void uninstallDefaults(javax.swing.JFileChooser fc)
fc - the file chooser.protected void installIcons(javax.swing.JFileChooser fc)
fc - the file chooser (ignored).protected void uninstallIcons(javax.swing.JFileChooser fc)
fc - the file chooser.protected void installStrings(javax.swing.JFileChooser fc)
fc - the file chooser.protected void uninstallStrings(javax.swing.JFileChooser fc)
fc - the file chooser.protected void createModel()
public BasicDirectoryModel getModel()
public java.beans.PropertyChangeListener createPropertyChangeListener(javax.swing.JFileChooser fc)
fc - the file chooser component.public java.lang.String getFileName()
public java.lang.String getDirectoryName()
setDirectoryName(String)public void setFileName(java.lang.String filename)
filename - the file name.getFileName()public void setDirectoryName(java.lang.String dirname)
dirname - the directory name.getDirectoryName()public void rescanCurrentDirectory(javax.swing.JFileChooser fc)
rescanCurrentDirectory in class javax.swing.plaf.FileChooserUIfc - the file chooser.public void ensureFileIsVisible(javax.swing.JFileChooser fc, java.io.File f)
ensureFileIsVisible in class javax.swing.plaf.FileChooserUIfc - the file chooser.f - the file.public javax.swing.JFileChooser getFileChooser()
JFileChooser component that this UI delegate
represents.public javax.swing.JPanel getAccessoryPanel()
protected javax.swing.JButton getApproveButton(javax.swing.JFileChooser fc)
fc - the file chooser.public java.lang.String getApproveButtonToolTipText(javax.swing.JFileChooser fc)
fc - the file chooser.public void clearIconCache()
public javax.swing.event.ListSelectionListener createListSelectionListener(javax.swing.JFileChooser fc)
fc - the file chooser component.BasicFileChooserUI.SelectionListener.protected java.awt.event.MouseListener createDoubleClickListener(javax.swing.JFileChooser fc, javax.swing.JList list)
fc - the file chooser component.list - the list.BasicFileChooserUI.DoubleClickListener.protected boolean isDirectorySelected()
true if a directory is selected, and
false otherwise.protected void setDirectorySelected(boolean selected)
selected - the new flag value.protected java.io.File getDirectory()
protected void setDirectory(java.io.File f)
f - the directory.public javax.swing.filechooser.FileFilter getAcceptAllFileFilter(javax.swing.JFileChooser fc)
getAcceptAllFileFilter in class javax.swing.plaf.FileChooserUIfc - the file chooser component.JFileChooser.getAcceptAllFileFilter(),
FileFilter.getDescription()public javax.swing.filechooser.FileView getFileView(javax.swing.JFileChooser fc)
getFileView in class javax.swing.plaf.FileChooserUIfc - the file chooser component.JFileChooser.getFileView()public java.lang.String getDialogTitle(javax.swing.JFileChooser fc)
getDialogTitle in class javax.swing.plaf.FileChooserUIfc - the file chooser (null not permitted).JFileChooser.getDialogTitle()public int getApproveButtonMnemonic(javax.swing.JFileChooser fc)
fc - the file chooser (null not permitted).JFileChooser.getApproveButtonMnemonic()public java.lang.String getApproveButtonText(javax.swing.JFileChooser fc)
getApproveButtonText in class javax.swing.plaf.FileChooserUIfc - the file chooser (null not permitted).JFileChooser.getApproveButtonText()public javax.swing.Action getNewFolderAction()
BasicFileChooserUI.NewFolderAction.public javax.swing.Action getGoHomeAction()
BasicFileChooserUI.GoHomeAction.public javax.swing.Action getChangeToParentDirectoryAction()
BasicFileChooserUI.ChangeToParentDirectoryAction.public javax.swing.Action getApproveSelectionAction()
BasicFileChooserUI.ApproveSelectionAction.public javax.swing.Action getCancelSelectionAction()
BasicFileChooserUI.CancelSelectionAction.public javax.swing.Action getUpdateAction()
BasicFileChooserUI.UpdateAction).