javax.swing.plaf.metal
public class MetalFileChooserUI extends BasicFileChooserUI
JFileChooser
component. This class is only
partially implemented and is not usable yet.Modifier and Type | Class and Description |
---|---|
protected class |
MetalFileChooserUI.DirectoryComboBoxAction
Handles changes to the selection in the directory combo box.
|
protected class |
MetalFileChooserUI.DirectoryComboBoxModel
A combo box model containing the selected directory and all its parent
directories.
|
protected class |
MetalFileChooserUI.FileRenderer
A renderer for the files and directories in the file chooser.
|
protected class |
MetalFileChooserUI.FilterComboBoxModel
A combo box model for the file selection filters.
|
class |
MetalFileChooserUI.FilterComboBoxRenderer
A renderer for the items in the file filter combo box.
|
protected class |
MetalFileChooserUI.SingleClickListener
A mouse listener for the
JFileChooser . |
BasicFileChooserUI.AcceptAllFileFilter, BasicFileChooserUI.ApproveSelectionAction, BasicFileChooserUI.BasicFileView, BasicFileChooserUI.CancelSelectionAction, BasicFileChooserUI.ChangeToParentDirectoryAction, BasicFileChooserUI.DoubleClickListener, BasicFileChooserUI.GoHomeAction, BasicFileChooserUI.NewFolderAction, BasicFileChooserUI.SelectionListener, BasicFileChooserUI.UpdateAction
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
Constructor and Description |
---|
MetalFileChooserUI(JFileChooser filechooser)
Creates a new instance of this UI delegate.
|
Modifier and Type | Method and Description |
---|---|
protected void |
addControlButtons()
Adds the control buttons ('up', 'home' etc.) to the panel.
|
protected ActionMap |
createActionMap()
Creates and returns an action map.
|
protected JPanel |
createDetailsView(JFileChooser fc)
Creates a panel containing a table within a scroll pane.
|
protected MetalFileChooserUI.DirectoryComboBoxModel |
createDirectoryComboBoxModel(JFileChooser fc)
Creates and returns a new instance of
MetalFileChooserUI.DirectoryComboBoxModel . |
protected javax.swing.plaf.metal.MetalFileChooserUI.DirectoryComboBoxRenderer |
createDirectoryComboBoxRenderer(JFileChooser fc)
Creates a new instance of the renderer used in the directory
combo box.
|
protected MetalFileChooserUI.FilterComboBoxModel |
createFilterComboBoxModel()
Creates and returns a new instance of
MetalFileChooserUI.FilterComboBoxModel . |
protected MetalFileChooserUI.FilterComboBoxRenderer |
createFilterComboBoxRenderer()
Creates and returns a new instance of
MetalFileChooserUI.FilterComboBoxRenderer . |
protected JPanel |
createList(JFileChooser fc)
Creates a panel containing a list of files.
|
ListSelectionListener |
createListSelectionListener(JFileChooser fc)
Creates a listener that monitors selections in the directory/file list
and keeps the
JFileChooser component up to date. |
PropertyChangeListener |
createPropertyChangeListener(JFileChooser fc)
Creates a property change listener that monitors the
JFileChooser
for property change events and updates the component display accordingly. |
static ComponentUI |
createUI(JComponent c)
A factory method that returns a UI delegate for the specified
component.
|
protected ActionMap |
getActionMap() |
protected JButton |
getApproveButton(JFileChooser fc)
Returns the approve button.
|
protected JPanel |
getBottomPanel()
Creates and returns a new panel that will be used for the controls at
the bottom of the file chooser.
|
protected JPanel |
getButtonPanel()
Returns the panel that contains the 'Open' (or 'Save') and 'Cancel'
buttons.
|
String |
getFileName()
Returns the file name in the text field.
|
Dimension |
getMaximumSize(JComponent c)
Returns the maximum size for the file chooser component.
|
Dimension |
getMinimumSize(JComponent c)
Returns the minimum size for the file chooser component.
|
Dimension |
getPreferredSize(JComponent c)
Returns the preferred size for the file chooser component.
|
void |
installComponents(JFileChooser fc)
Installs the sub-components of the file chooser.
|
protected void |
installListeners(JFileChooser fc)
Installs the listeners required.
|
protected void |
installStrings(JFileChooser fc)
Fetches localised strings for use by the labels and buttons on the
file chooser.
|
void |
installUI(JComponent c)
Installs the UI for the specified component.
|
protected void |
removeControlButtons()
Removes all the buttons from the control panel.
|
void |
rescanCurrentDirectory(JFileChooser fc)
Updates the current directory.
|
void |
setFileName(String filename)
Sets the file name in the text field.
|
void |
uninstallComponents(JFileChooser fc)
Uninstalls the components added by
installComponents(JFileChooser) . |
protected void |
uninstallListeners(JFileChooser fc)
Uninstalls the listeners previously installed by this UI delegate.
|
void |
uninstallUI(JComponent c)
Uninstalls this UI from the given component.
|
void |
valueChanged(ListSelectionEvent e)
DOCUMENT ME!!
|
clearIconCache, createDoubleClickListener, createModel, ensureFileIsVisible, getAcceptAllFileFilter, getAccessoryPanel, getApproveButtonMnemonic, getApproveButtonText, getApproveButtonToolTipText, getApproveSelectionAction, getCancelSelectionAction, getChangeToParentDirectoryAction, getDialogTitle, getDirectory, getDirectoryName, getFileChooser, getFileView, getGoHomeAction, getModel, getNewFolderAction, getUpdateAction, installDefaults, installIcons, isDirectorySelected, setDirectory, setDirectoryName, setDirectorySelected, uninstallDefaults, uninstallIcons, uninstallStrings
contains, getAccessibleChild, getAccessibleChildrenCount, paint, update
public MetalFileChooserUI(JFileChooser filechooser)
filechooser
- the file chooser component.public static ComponentUI createUI(JComponent c)
c
- the component (which should be a JFileChooser
).public void installUI(JComponent c)
BasicFileChooserUI
installUI
in class BasicFileChooserUI
c
- the component (should be a JFileChooser
).ComponentUI.uninstallUI(javax.swing.JComponent)
,
JComponent.setUI(javax.swing.plaf.ComponentUI)
,
JComponent.updateUI()
public void uninstallUI(JComponent c)
BasicFileChooserUI
uninstallUI
in class BasicFileChooserUI
c
- the component (should be a JFileChooser
).ComponentUI.installUI(javax.swing.JComponent)
,
JComponent.setUI(javax.swing.plaf.ComponentUI)
,
JComponent.updateUI()
public void installComponents(JFileChooser fc)
installComponents
in class BasicFileChooserUI
fc
- the file chooser component.public void uninstallComponents(JFileChooser fc)
installComponents(JFileChooser)
.uninstallComponents
in class BasicFileChooserUI
fc
- the file chooser.protected JPanel getButtonPanel()
protected JPanel getBottomPanel()
protected void installStrings(JFileChooser fc)
installStrings
in class BasicFileChooserUI
fc
- the file chooser.protected void installListeners(JFileChooser fc)
installListeners
in class BasicFileChooserUI
fc
- the file chooser.protected void uninstallListeners(JFileChooser fc)
BasicFileChooserUI
uninstallListeners
in class BasicFileChooserUI
fc
- the file chooser.protected ActionMap getActionMap()
protected ActionMap createActionMap()
protected JPanel createList(JFileChooser fc)
fc
- the file chooser.protected JPanel createDetailsView(JFileChooser fc)
fc
- the file chooser.public ListSelectionListener createListSelectionListener(JFileChooser fc)
JFileChooser
component up to date.createListSelectionListener
in class BasicFileChooserUI
fc
- the file chooser.installListeners(JFileChooser)
public Dimension getPreferredSize(JComponent c)
getPreferredSize
in class ComponentUI
c
- the component for which this delegate performs services.public Dimension getMinimumSize(JComponent c)
getMinimumSize
in class ComponentUI
c
- the component for which this delegate performs services.public Dimension getMaximumSize(JComponent c)
getMaximumSize
in class ComponentUI
c
- the component for which this delegate performs services.public PropertyChangeListener createPropertyChangeListener(JFileChooser fc)
JFileChooser
for property change events and updates the component display accordingly.createPropertyChangeListener
in class BasicFileChooserUI
fc
- the file chooser.installListeners(JFileChooser)
protected MetalFileChooserUI.DirectoryComboBoxModel createDirectoryComboBoxModel(JFileChooser fc)
MetalFileChooserUI.DirectoryComboBoxModel
.MetalFileChooserUI.DirectoryComboBoxModel
.protected javax.swing.plaf.metal.MetalFileChooserUI.DirectoryComboBoxRenderer createDirectoryComboBoxRenderer(JFileChooser fc)
fc
- the file chooser.protected MetalFileChooserUI.FilterComboBoxModel createFilterComboBoxModel()
MetalFileChooserUI.FilterComboBoxModel
.MetalFileChooserUI.FilterComboBoxModel
.protected MetalFileChooserUI.FilterComboBoxRenderer createFilterComboBoxRenderer()
MetalFileChooserUI.FilterComboBoxRenderer
.MetalFileChooserUI.FilterComboBoxRenderer
.protected void addControlButtons()
protected void removeControlButtons()
public void rescanCurrentDirectory(JFileChooser fc)
rescanCurrentDirectory
in class BasicFileChooserUI
fc
- the file chooser to update.public String getFileName()
getFileName
in class BasicFileChooserUI
public void setFileName(String filename)
setFileName
in class BasicFileChooserUI
filename
- the file name.BasicFileChooserUI.getFileName()
public void valueChanged(ListSelectionEvent e)
e
- - DOCUMENT ME!protected JButton getApproveButton(JFileChooser fc)
getApproveButton
in class BasicFileChooserUI
fc
- the file chooser.