java.lang.Object
javax.swing.plaf.ComponentUI
javax.swing.plaf.FileChooserUI
javax.swing.plaf.basic.BasicFileChooserUI
- Direct Known Subclasses:
- MetalFileChooserUI
Basic L&F implementation of a FileChooser.
- 
Nested Class SummaryNested ClassesModifier and TypeClassDescriptionprotected classAccept all file filter.protected classResponds to an Open or Save requestprotected classA basic file view.protected classResponds to a cancel request.protected classChange to parent directory action.protected classA double click listener.protected classActs on the "home" key event or equivalent event.protected classCreates a new folder.protected classA selection listener.protected classRescans the files in the current directory
- 
Field SummaryFieldsModifier and TypeFieldDescriptionprotected intCancel button mnemonicprotected StringCancel button textprotected StringCancel button tool tip textprotected IconComputer iconprotected IconDetails view iconprotected IconDirectory iconprotected intThe mnemonic keycode used for the approve button when a directory is selected and the current selection mode is FILES_ONLY.protected StringThe label text displayed on the approve button when a directory is selected and the current selection mode is FILES_ONLY.protected StringThe tooltip text displayed on the approve button when a directory is selected and the current selection mode is FILES_ONLY.protected IconFile iconprotected IconFloppy drive iconprotected IconHard drive iconprotected intHelp button mnemonicprotected StringHelp button textprotected StringHelp button tool tip textprotected IconHome folder iconprotected IconList view iconprotected IconNew folder iconprotected intOpen button mnemonicprotected StringOpen button textprotected StringOpen button tool tip textprotected intSave button mnemonicprotected StringSave button textprotected StringSave button tool tip textprotected intUpdate button mnemonicprotected StringUpdate button textprotected StringUpdate button tool tip textprotected IconUp folder iconprotected IconView menu icon
- 
Constructor SummaryConstructors
- 
Method SummaryModifier and TypeMethodDescriptionvoidClears the icon cache.protected MouseListenercreateDoubleClickListener(JFileChooser fc, JList<?> list) Creates a double click listener.Creates a list selection listener.protected voidCreates the model.Creates the property change listener.static ComponentUICreates aBasicFileChooserUIimplementation for the specified component.voidensureFileIsVisible(JFileChooser fc, File f) Ensure the file in question is visible.Returns the default accept all file filterReturns the accessory panel.protected JButtonReturns the approve button.intReturns the approve button mnemonic.Returns approve button text.Returns the approve button tool tip.Returns an approve selection action.Returns a cancel selection action.Returns a change to parent directory action.Returns the title of this dialogprotected FileProperty to remember the directory that is currently selected in the UI.Returns the directory name.Returns the file chooser.Returns the file name.Returns a file view.Returns a go home action.getModel()Returns the model.Returns a new folder action.Returns an update action.voidInstalls the components.protected voidInstalls the defaults.protected voidInstalls the icons.protected voidInstalls the listeners.protected voidInstalls the strings.voidInstalls the UI.protected booleanProperty to remember whether a directory is currently selected in the UI.voidRescan the current directory.protected voidsetDirectory(File f) Property to remember the directory that is currently selected in the UI.voidsetDirectoryName(String dirname) Sets the directory name.protected voidsetDirectorySelected(boolean b) Property to remember whether a directory is currently selected in the UI.voidsetFileName(String filename) Sets the file name.voidUninstalls the components.protected voidUninstalls the defaults.protected voidUninstalls the icons.protected voidUninstalls the listeners.protected voidUninstalls the strings.voidUninstalls the UI.Methods declared in class javax.swing.plaf.FileChooserUIgetDefaultButtonMethods declared in class javax.swing.plaf.ComponentUIcontains, getAccessibleChild, getAccessibleChildrenCount, getBaseline, getBaselineResizeBehavior, getMaximumSize, getMinimumSize, getPreferredSize, paint, update
- 
Field Details- 
directoryIconDirectory icon
- 
fileIconFile icon
- 
computerIconComputer icon
- 
hardDriveIconHard drive icon
- 
floppyDriveIconFloppy drive icon
- 
newFolderIconNew folder icon
- 
upFolderIconUp folder icon
- 
homeFolderIconHome folder icon
- 
listViewIconList view icon
- 
detailsViewIconDetails view icon
- 
viewMenuIconView menu icon
- 
saveButtonMnemonicprotected int saveButtonMnemonicSave button mnemonic
- 
openButtonMnemonicprotected int openButtonMnemonicOpen button mnemonic
- 
cancelButtonMnemonicprotected int cancelButtonMnemonicCancel button mnemonic
- 
updateButtonMnemonicprotected int updateButtonMnemonicUpdate button mnemonic
- 
helpButtonMnemonicprotected int helpButtonMnemonicHelp button mnemonic
- 
directoryOpenButtonMnemonicprotected 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
 
- 
saveButtonTextSave button text
- 
openButtonTextOpen button text
- 
cancelButtonTextCancel button text
- 
updateButtonTextUpdate button text
- 
helpButtonTextHelp button text
- 
directoryOpenButtonTextThe label text displayed on the approve button when a directory is selected and the current selection mode is FILES_ONLY.- Since:
- 1.4
 
- 
saveButtonToolTipTextSave button tool tip text
- 
openButtonToolTipTextOpen button tool tip text
- 
cancelButtonToolTipTextCancel button tool tip text
- 
updateButtonToolTipTextUpdate button tool tip text
- 
helpButtonToolTipTextHelp button tool tip text
- 
directoryOpenButtonToolTipTextThe tooltip text displayed on the approve button when a directory is selected and the current selection mode is FILES_ONLY.- Since:
- 1.4
 
 
- 
- 
Constructor Details- 
BasicFileChooserUIConstructs aBasicFileChooserUI.- Parameters:
- b- file chooser
 
 
- 
- 
Method Details- 
createUICreates aBasicFileChooserUIimplementation for the specified component. By default theBasicLookAndFeelclass usescreateUImethods of all basic UIs classes to instantiate UIs.- Parameters:
- c- the- JFileChooserwhich needs a UI
- Returns:
- the BasicFileChooserUIobject
- Since:
- 1.7
- See Also:
 
- 
installUIInstalls the UI.- Overrides:
- installUIin class- ComponentUI
- Parameters:
- c- the component
- See Also:
 
- 
uninstallUIUninstalls the UI.- Overrides:
- uninstallUIin class- ComponentUI
- Parameters:
- c- the component
- See Also:
 
- 
installComponentsInstalls the components.- Parameters:
- fc- the file chooser
 
- 
uninstallComponentsUninstalls the components.- Parameters:
- fc- the file chooser
 
- 
installListenersInstalls the listeners.- Parameters:
- fc- the file chooser
 
- 
uninstallListenersUninstalls the listeners.- Parameters:
- fc- the file chooser
 
- 
installDefaultsInstalls the defaults.- Parameters:
- fc- the file chooser
 
- 
installIconsInstalls the icons.- Parameters:
- fc- the file chooser
 
- 
installStringsInstalls the strings.- Parameters:
- fc- the file chooser
 
- 
uninstallDefaultsUninstalls the defaults.- Parameters:
- fc- the file chooser
 
- 
uninstallIconsUninstalls the icons.- Parameters:
- fc- the file chooser
 
- 
uninstallStringsUninstalls the strings.- Parameters:
- fc- the file chooser
 
- 
createModelprotected void createModel()Creates the model.
- 
getModelReturns the model.- Returns:
- the model
 
- 
createPropertyChangeListenerCreates the property change listener.- Parameters:
- fc- the file chooser
- Returns:
- the property change listener
 
- 
getFileNameReturns the file name.- Returns:
- the file name
 
- 
getDirectoryNameReturns the directory name.- Returns:
- the directory name
 
- 
setFileNameSets the file name.- Parameters:
- filename- the file name
 
- 
setDirectoryNameSets the directory name.- Parameters:
- dirname- the file name
 
- 
rescanCurrentDirectoryRescan the current directory.- Specified by:
- rescanCurrentDirectoryin class- FileChooserUI
- Parameters:
- fc- the file chooser
 
- 
ensureFileIsVisibleEnsure the file in question is visible.- Specified by:
- ensureFileIsVisiblein class- FileChooserUI
- Parameters:
- fc- the file chooser
- f- the file
 
- 
getFileChooserReturns the file chooser.- Returns:
- the file chooser
 
- 
getAccessoryPanelReturns the accessory panel.- Returns:
- the accessory panel
 
- 
getApproveButtonReturns the approve button.- Parameters:
- fc- the file chooser
- Returns:
- the approve button
 
- 
getApproveButtonToolTipTextReturns the approve button tool tip.- Parameters:
- fc- the file chooser
- Returns:
- the approve button tool tip
 
- 
clearIconCachepublic void clearIconCache()Clears the icon cache.
- 
createDoubleClickListenerCreates a double click listener.- Parameters:
- fc- the file chooser
- list- the list
- Returns:
- a double click listener
 
- 
createListSelectionListenerCreates a list selection listener.- Parameters:
- fc- the file chooser
- Returns:
- a list selection listener
 
- 
isDirectorySelectedprotected boolean isDirectorySelected()Property to remember whether a directory is currently selected in the UI.- Returns:
- trueiff a directory is currently selected.
- Since:
- 1.4
 
- 
setDirectorySelectedprotected void setDirectorySelected(boolean b) Property to remember whether a directory is currently selected in the UI. This is normally called by the UI on a selection event.- Parameters:
- b- iff a directory is currently selected.
- Since:
- 1.4
 
- 
getDirectoryProperty to remember the directory that is currently selected in the UI.- Returns:
- the value of the directoryproperty
- Since:
- 1.4
- See Also:
 
- 
setDirectoryProperty to remember the directory that is currently selected in the UI. This is normally called by the UI on a selection event.- Parameters:
- f- the- Fileobject representing the directory that is currently selected
- Since:
- 1.4
 
- 
getAcceptAllFileFilterReturns the default accept all file filter- Specified by:
- getAcceptAllFileFilterin class- FileChooserUI
- Parameters:
- fc- the file chooser
- Returns:
- an accept-all file filter
 
- 
getFileViewDescription copied from class:FileChooserUIReturns a file view.- Specified by:
- getFileViewin class- FileChooserUI
- Parameters:
- fc- the file chooser
- Returns:
- a file view
 
- 
getDialogTitleReturns the title of this dialog- Specified by:
- getDialogTitlein class- FileChooserUI
- Parameters:
- fc- the file chooser
- Returns:
- the title of this dialog
 
- 
getApproveButtonMnemonicReturns the approve button mnemonic.- Parameters:
- fc- the file chooser
- Returns:
- the approve button mnemonic
 
- 
getApproveButtonTextReturns approve button text.- Specified by:
- getApproveButtonTextin class- FileChooserUI
- Parameters:
- fc- the file chooser
- Returns:
- approve button text.
 
- 
getNewFolderActionReturns a new folder action.- Returns:
- a new folder action
 
- 
getGoHomeActionReturns a go home action.- Returns:
- a go home action
 
- 
getChangeToParentDirectoryActionReturns a change to parent directory action.- Returns:
- a change to parent directory action
 
- 
getApproveSelectionActionReturns an approve selection action.- Returns:
- an approve selection action
 
- 
getCancelSelectionActionReturns a cancel selection action.- Returns:
- a cancel selection action
 
- 
getUpdateActionReturns an update action.- Returns:
- an update action
 
 
-