java.lang.Object
javax.swing.plaf.ComponentUI
javax.swing.plaf.FileChooserUI
javax.swing.plaf.basic.BasicFileChooserUI
- Direct Known Subclasses:
MetalFileChooserUI
public class BasicFileChooserUI extends FileChooserUI
Basic L&F implementation of a FileChooser.
-
Nested Class Summary
Nested Classes Modifier and Type Class Description protected class
BasicFileChooserUI.AcceptAllFileFilter
Accept all file filter.protected class
BasicFileChooserUI.ApproveSelectionAction
Responds to an Open or Save requestprotected class
BasicFileChooserUI.BasicFileView
A basic file view.protected class
BasicFileChooserUI.CancelSelectionAction
Responds to a cancel request.protected class
BasicFileChooserUI.ChangeToParentDirectoryAction
Change to parent directory action.protected class
BasicFileChooserUI.DoubleClickListener
A double click listener.protected class
BasicFileChooserUI.GoHomeAction
Acts on the "home" key event or equivalent event.protected class
BasicFileChooserUI.NewFolderAction
Creates a new folder.protected class
BasicFileChooserUI.SelectionListener
A selection listener.protected class
BasicFileChooserUI.UpdateAction
Rescans the files in the current directory -
Field Summary
Fields Modifier and Type Field Description protected int
cancelButtonMnemonic
Cancel button mnemonicprotected String
cancelButtonText
Cancel button textprotected String
cancelButtonToolTipText
Cancel button tool tip textprotected Icon
computerIcon
Computer iconprotected Icon
detailsViewIcon
Details view iconprotected Icon
directoryIcon
Directory iconprotected int
directoryOpenButtonMnemonic
The mnemonic keycode used for the approve button when a directory is selected and the current selection mode is FILES_ONLY.protected String
directoryOpenButtonText
The label text displayed on the approve button when a directory is selected and the current selection mode is FILES_ONLY.protected String
directoryOpenButtonToolTipText
The tooltip text displayed on the approve button when a directory is selected and the current selection mode is FILES_ONLY.protected Icon
fileIcon
File iconprotected Icon
floppyDriveIcon
Floppy drive iconprotected Icon
hardDriveIcon
Hard drive iconprotected int
helpButtonMnemonic
Help button mnemonicprotected String
helpButtonText
Help button textprotected String
helpButtonToolTipText
Help button tool tip textprotected Icon
homeFolderIcon
Home folder iconprotected Icon
listViewIcon
List view iconprotected Icon
newFolderIcon
New folder iconprotected int
openButtonMnemonic
Open button mnemonicprotected String
openButtonText
Open button textprotected String
openButtonToolTipText
Open button tool tip textprotected int
saveButtonMnemonic
Save button mnemonicprotected String
saveButtonText
Save button textprotected String
saveButtonToolTipText
Save button tool tip textprotected int
updateButtonMnemonic
Update button mnemonicprotected String
updateButtonText
Update button textprotected String
updateButtonToolTipText
Update button tool tip textprotected Icon
upFolderIcon
Up folder iconprotected Icon
viewMenuIcon
View menu icon -
Constructor Summary
Constructors Constructor Description BasicFileChooserUI(JFileChooser b)
Constructs aBasicFileChooserUI
. -
Method Summary
Modifier and Type Method Description void
clearIconCache()
Clears the icon cache.protected MouseListener
createDoubleClickListener(JFileChooser fc, JList<?> list)
Creates a double click listener.ListSelectionListener
createListSelectionListener(JFileChooser fc)
Creates a list selection listener.protected void
createModel()
Creates the model.PropertyChangeListener
createPropertyChangeListener(JFileChooser fc)
Creates the property change listener.static ComponentUI
createUI(JComponent c)
Creates aBasicFileChooserUI
implementation for the specified component.FileFilter
getAcceptAllFileFilter(JFileChooser fc)
Returns the default accept all file filterJPanel
getAccessoryPanel()
Returns the accessory panel.protected JButton
getApproveButton(JFileChooser fc)
Returns the approve button.int
getApproveButtonMnemonic(JFileChooser fc)
Returns the approve button mnemonic.String
getApproveButtonToolTipText(JFileChooser fc)
Returns the approve button tool tip.Action
getApproveSelectionAction()
Returns an approve selection action.Action
getCancelSelectionAction()
Returns a cancel selection action.Action
getChangeToParentDirectoryAction()
Returns a change to parent directory action.String
getDialogTitle(JFileChooser fc)
Returns the title of this dialogprotected File
getDirectory()
Property to remember the directory that is currently selected in the UI.String
getDirectoryName()
Returns the directory name.JFileChooser
getFileChooser()
Returns the file chooser.String
getFileName()
Returns the file name.Action
getGoHomeAction()
Returns a go home action.BasicDirectoryModel
getModel()
Returns the model.Action
getNewFolderAction()
Returns a new folder action.Action
getUpdateAction()
Returns an update action.void
installComponents(JFileChooser fc)
Installs the components.protected void
installDefaults(JFileChooser fc)
Installs the defaults.protected void
installIcons(JFileChooser fc)
Installs the icons.protected void
installListeners(JFileChooser fc)
Installs the listeners.protected void
installStrings(JFileChooser fc)
Installs the strings.void
installUI(JComponent c)
Installs the UI.protected boolean
isDirectorySelected()
Property to remember whether a directory is currently selected in the UI.protected void
setDirectory(File f)
Property to remember the directory that is currently selected in the UI.void
setDirectoryName(String dirname)
Sets the directory name.protected void
setDirectorySelected(boolean b)
Property to remember whether a directory is currently selected in the UI.void
setFileName(String filename)
Sets the file name.void
uninstallComponents(JFileChooser fc)
Uninstalls the components.protected void
uninstallDefaults(JFileChooser fc)
Uninstalls the defaults.protected void
uninstallIcons(JFileChooser fc)
Uninstalls the icons.protected void
uninstallListeners(JFileChooser fc)
Uninstalls the listeners.protected void
uninstallStrings(JFileChooser fc)
Uninstalls the strings.void
uninstallUI(JComponent c)
Uninstalls the UI.Methods declared in class javax.swing.plaf.FileChooserUI
ensureFileIsVisible, getApproveButtonText, getDefaultButton, getFileView, rescanCurrentDirectory
Methods declared in class javax.swing.plaf.ComponentUI
contains, getAccessibleChild, getAccessibleChildrenCount, getBaseline, getBaselineResizeBehavior, getMaximumSize, getMinimumSize, getPreferredSize, paint, update
-
Field Details
-
directoryIcon
Directory icon -
fileIcon
File icon -
computerIcon
Computer icon -
hardDriveIcon
Hard drive icon -
floppyDriveIcon
Floppy drive icon -
newFolderIcon
New folder icon -
upFolderIcon
Up folder icon -
homeFolderIcon
Home folder icon -
listViewIcon
List view icon -
detailsViewIcon
Details view icon -
viewMenuIcon
View menu icon -
saveButtonMnemonic
protected int saveButtonMnemonicSave button mnemonic -
openButtonMnemonic
protected int openButtonMnemonicOpen button mnemonic -
cancelButtonMnemonic
protected int cancelButtonMnemonicCancel button mnemonic -
updateButtonMnemonic
protected int updateButtonMnemonicUpdate button mnemonic -
helpButtonMnemonic
protected int helpButtonMnemonicHelp button mnemonic -
directoryOpenButtonMnemonic
protected int directoryOpenButtonMnemonicThe mnemonic keycode used for the approve button when a directory is selected and the current selection mode is FILES_ONLY.- Since:
- 1.4
-
saveButtonText
Save button text -
-