java.lang.Object
javax.swing.plaf.ComponentUI
javax.swing.plaf.FileChooserUI
javax.swing.plaf.basic.BasicFileChooserUI
javax.swing.plaf.metal.MetalFileChooserUI
Metal L&F implementation of a FileChooser.
-
Nested Class Summary
Modifier and TypeClassDescriptionprotected class
Acts when DirectoryComboBox has changed the selected item.protected class
Data model for a type-face selection combo-box.protected class
Deprecated.As of JDK version 9.protected class
Data model for a type-face selection combo-box.class
Render different type sizes and styles.protected class
Deprecated.As of JDK version 9.Nested classes/interfaces declared in class javax.swing.plaf.basic.BasicFileChooserUI
BasicFileChooserUI.AcceptAllFileFilter, BasicFileChooserUI.ApproveSelectionAction, BasicFileChooserUI.BasicFileView, BasicFileChooserUI.CancelSelectionAction, BasicFileChooserUI.ChangeToParentDirectoryAction, BasicFileChooserUI.DoubleClickListener, BasicFileChooserUI.GoHomeAction, BasicFileChooserUI.NewFolderAction, BasicFileChooserUI.SelectionListener, BasicFileChooserUI.UpdateAction
-
Field Summary
Fields declared in class javax.swing.plaf.basic.BasicFileChooserUI
cancelButtonMnemonic, cancelButtonText, cancelButtonToolTipText, computerIcon, detailsViewIcon, directoryIcon, directoryOpenButtonMnemonic, directoryOpenButtonText, directoryOpenButtonToolTipText, fileIcon, floppyDriveIcon, hardDriveIcon, helpButtonMnemonic, helpButtonText, helpButtonToolTipText, homeFolderIcon, listViewIcon, newFolderIcon, openButtonMnemonic, openButtonText, openButtonToolTipText, saveButtonMnemonic, saveButtonText, saveButtonToolTipText, updateButtonMnemonic, updateButtonText, updateButtonToolTipText, upFolderIcon, viewMenuIcon
-
Constructor Summary
ConstructorDescriptionMetalFileChooserUI
(JFileChooser filechooser) Constructs a new instance ofMetalFileChooserUI
. -
Method Summary
Modifier and TypeMethodDescriptionprotected void
Adds control buttons to bottom panel.protected ActionMap
Constructs an instance ofActionMap
.protected JPanel
Constructs a details view.Constructs a new instance ofDataModel
forDirectoryComboBox
.protected MetalFileChooserUI.FilterComboBoxModel
Constructs aDataModel
for typesComboBox
.Constructs aRenderer
for typesComboBox
.protected JPanel
Constructs a details view.Creates a selection listener for the list of files and directories.static ComponentUI
Constructs a new instance ofMetalFileChooserUI
.protected ActionMap
Returns an instance ofActionMap
.protected JPanel
Returns the bottom panel.protected JPanel
Returns the button panel.Returns the directory name.Returns the maximum size of theJFileChooser
.Returns the minimum size of theJFileChooser
.Returns the preferred size of the specifiedJFileChooser
.protected void
Removes control buttons from bottom panel.void
setDirectoryName
(String dirname) Sets the directory name.protected void
setDirectorySelected
(boolean directorySelected) Property to remember whether a directory is currently selected in the UI.void
Invokes whenListSelectionEvent
occurs.Methods declared in class javax.swing.plaf.basic.BasicFileChooserUI
clearIconCache, createDoubleClickListener, createModel, createPropertyChangeListener, ensureFileIsVisible, getAcceptAllFileFilter, getAccessoryPanel, getApproveButton, getApproveButtonMnemonic, getApproveButtonText, getApproveButtonToolTipText, getApproveSelectionAction, getCancelSelectionAction, getChangeToParentDirectoryAction, getDialogTitle, getDirectory, getFileChooser, getFileName, getFileView, getGoHomeAction, getModel, getNewFolderAction, getUpdateAction, installComponents, installDefaults, installIcons, installListeners, installStrings, installUI, isDirectorySelected, rescanCurrentDirectory, setDirectory, setFileName, uninstallComponents, uninstallDefaults, uninstallIcons, uninstallListeners, uninstallStrings, uninstallUI
Methods declared in class javax.swing.plaf.FileChooserUI
getDefaultButton
Methods declared in class javax.swing.plaf.ComponentUI
contains, getAccessibleChild, getAccessibleChildrenCount, getBaseline, getBaselineResizeBehavior, paint, update
-
Constructor Details
-
MetalFileChooserUI
Constructs a new instance ofMetalFileChooserUI
.- Parameters:
filechooser
- aJFileChooser
-
-
Method Details
-
createUI
Constructs a new instance ofMetalFileChooserUI
.- Parameters:
c
- a component- Returns:
- a new instance of
MetalFileChooserUI
-
getButtonPanel
Returns the button panel.- Returns:
- the button panel
-
getBottomPanel
Returns the bottom panel.- Returns:
- the bottom panel
-
getActionMap
Returns an instance ofActionMap
.- Returns:
- an instance of
ActionMap
-
createActionMap
Constructs an instance ofActionMap
.- Returns:
- an instance of
ActionMap
-
createList
Constructs a details view.- Parameters:
fc
- aJFileChooser
- Returns:
- the list
-
createDetailsView
Constructs a details view.- Parameters:
fc
- aJFileChooser
- Returns:
- the details view
-
createListSelectionListener
Creates a selection listener for the list of files and directories.- Overrides:
createListSelectionListener
in classBasicFileChooserUI
- Parameters:
fc
- aJFileChooser
- Returns:
- a
ListSelectionListener
-
getPreferredSize
Returns the preferred size of the specifiedJFileChooser
. The preferred size is at least as large, in both height and width, as the preferred size recommended by the file chooser's layout manager.- Overrides:
getPreferredSize
in classComponentUI
- Parameters:
c
- aJFileChooser
- Returns:
- a
Dimension
specifying the preferred width and height of the file chooser - See Also:
-
getMinimumSize
Returns the minimum size of theJFileChooser
.- Overrides:
getMinimumSize
in classComponentUI
- Parameters:
c
- aJFileChooser
- Returns:
- a
Dimension
specifying the minimum width and height of the file chooser - See Also:
-
getMaximumSize
Returns the maximum size of theJFileChooser
.- Overrides:
getMaximumSize
in classComponentUI
- Parameters:
c
- aJFileChooser
- Returns:
- a
Dimension
specifying the maximum width and height of the file chooser - See Also:
-
removeControlButtons
protected void removeControlButtons()Removes control buttons from bottom panel. -
addControlButtons
protected void addControlButtons()Adds control buttons to bottom panel. -
setDirectorySelected
protected void setDirectorySelected(boolean directorySelected) Property to remember whether a directory is currently selected in the UI. This is normally called by the UI on a selection event.- Overrides:
setDirectorySelected
in classBasicFileChooserUI
- Parameters:
directorySelected
- if a directory is currently selected.- Since:
- 1.4
-
getDirectoryName
Returns the directory name.- Overrides:
getDirectoryName
in classBasicFileChooserUI
- Returns:
- the directory name
-
setDirectoryName
Sets the directory name.- Overrides:
setDirectoryName
in classBasicFileChooserUI
- Parameters:
dirname
- the directory name
-
createDirectoryComboBoxModel
Constructs a new instance ofDataModel
forDirectoryComboBox
.- Parameters:
fc
- aJFileChooser
- Returns:
- a new instance of
DataModel
forDirectoryComboBox
-
createFilterComboBoxRenderer
Constructs aRenderer
for typesComboBox
.- Returns:
- a
Renderer
for typesComboBox
-
createFilterComboBoxModel
Constructs aDataModel
for typesComboBox
.- Returns:
- a
DataModel
for typesComboBox
-
valueChanged
Invokes whenListSelectionEvent
occurs.- Parameters:
e
- an instance ofListSelectionEvent
-