This documentation differs from the official API. Jadeite adds extra features to the API including: variable font sizes, constructions examples, placeholders for classes and methods, and auto-generated “See Also” links. Additionally it is missing some items found in standard Javadoc documentation, including: generics type information, “Deprecated” tags and comments, “See Also” links, along with other minor differences. Please send any questions or feedback to bam@cs.cmu.edu.


javax.swing.plaf.metal
class MetalFileChooserUI

java.lang.Object extended by javax.swing.plaf.ComponentUI extended by javax.swing.plaf.FileChooserUI extended by javax.swing.plaf.basic.BasicFileChooserUI extended by javax.swing.plaf.metal.MetalFileChooserUI

public class MetalFileChooserUI
extends BasicFileChooserUI

Metal L&F implementation of a FileChooser.


Nested Class Summary
protected class

           Acts when DirectoryComboBox has changed the selected item.
protected class

           Data model for a type-face selection combo-box.
protected class

          
protected class

           Data model for a type-face selection combo-box.
 class

           Render different type sizes and styles.
protected class

          
Nested classes/interfaces inherited from 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 inherited from 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
 
Constructor Summary

          
 
Method Summary
protected void

          
protected ActionMap

          
protected JPanel

          
protected MetalFileChooserUI.DirectoryComboBoxModel

          
protected MetalFileChooserUI.DirectoryComboBoxRenderer

          
protected MetalFileChooserUI.FilterComboBoxModel

          
protected MetalFileChooserUI.FilterComboBoxRenderer

          
protected JPanel

          
 ListSelectionListener

          Creates a selection listener for the list of files and directories.
 PropertyChangeListener

          
static ComponentUI

          
 void

          
protected ActionMap

          
protected JButton

          
protected JPanel

          
protected JPanel

          
 String

          
 String

          
 Dimension

          Returns the maximum size of the JFileChooser.
 Dimension

          Returns the minimum size of the JFileChooser.
 Dimension

          Returns the preferred size of the specified JFileChooser.
 void

          
protected void

          
protected void

          
 void

          
protected void

          
 void

          
 void

          
protected void
setDirectorySelected(boolean directorySelected)

          Property to remember whether a directory is currently selected in the UI.
 void
setFileName(String filename)

          
 void

          
 void

          
 void

          
 
Methods inherited from class javax.swing.plaf.basic.BasicFileChooserUI
clearIconCache, createDoubleClickListener, createListSelectionListener, createModel, createPropertyChangeListener, ensureFileIsVisible, getAcceptAllFileFilter, getAccessoryPanel, getApproveButton, getApproveButtonMnemonic, getApproveButtonText, getApproveButtonToolTipText, getApproveSelectionAction, getCancelSelectionAction, getChangeToParentDirectoryAction, getDialogTitle, getDirectory, getDirectoryName, getFileChooser, getFileName, getFileView, getGoHomeAction, getModel, getNewFolderAction, getUpdateAction, installComponents, installDefaults, installIcons, installListeners, installStrings, installUI, isDirectorySelected, rescanCurrentDirectory, setDirectory, setDirectoryName, setDirectorySelected, setFileName, uninstallComponents, uninstallDefaults, uninstallIcons, uninstallListeners, uninstallStrings, uninstallUI
 
Methods inherited from class javax.swing.plaf.FileChooserUI
ensureFileIsVisible, getAcceptAllFileFilter, getApproveButtonText, getDialogTitle, getFileView, rescanCurrentDirectory
 
Methods inherited from class javax.swing.plaf.ComponentUI
contains, createUI, getAccessibleChild, getAccessibleChildrenCount, getBaseline, getBaselineResizeBehavior, getMaximumSize, getMinimumSize, getPreferredSize, installUI, paint, uninstallUI, update
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

MetalFileChooserUI

public MetalFileChooserUI(JFileChooser filechooser)
Parameters:
filechooser
Method Detail

addControlButtons

protected void addControlButtons()

createActionMap

protected ActionMap createActionMap()

createDetailsView

protected JPanel createDetailsView(JFileChooser fc)
Parameters:
fc

createDirectoryComboBoxModel

protected MetalFileChooserUI.DirectoryComboBoxModel createDirectoryComboBoxModel(JFileChooser fc)
Parameters:
fc

createDirectoryComboBoxRenderer

protected MetalFileChooserUI.DirectoryComboBoxRenderer createDirectoryComboBoxRenderer(JFileChooser fc)
Parameters:
fc

createFilterComboBoxModel

protected MetalFileChooserUI.FilterComboBoxModel createFilterComboBoxModel()

createFilterComboBoxRenderer

protected MetalFileChooserUI.FilterComboBoxRenderer createFilterComboBoxRenderer()

createList

protected JPanel createList(JFileChooser fc)
Parameters:
fc

createListSelectionListener

public ListSelectionListener createListSelectionListener(JFileChooser fc)
Creates a selection listener for the list of files and directories.

Overrides:
createListSelectionListener in class BasicFileChooserUI
Parameters:
fc - a JFileChooser
Returns:
a ListSelectionListener

createPropertyChangeListener

public PropertyChangeListener createPropertyChangeListener(JFileChooser fc)
Overrides:
createPropertyChangeListener in class BasicFileChooserUI
Parameters:
fc

createUI

public static ComponentUI createUI(JComponent c)
Parameters:
c

ensureFileIsVisible

public void ensureFileIsVisible(JFileChooser fc,
                                File f)
Overrides:
ensureFileIsVisible in class BasicFileChooserUI
Parameters:
fc
f

getActionMap

protected ActionMap getActionMap()

getApproveButton

protected JButton getApproveButton(JFileChooser fc)
Overrides:
getApproveButton in class BasicFileChooserUI
Parameters:
fc

getBottomPanel

protected JPanel getBottomPanel()

getButtonPanel

protected JPanel getButtonPanel()

getDirectoryName

public String getDirectoryName()
Overrides:
getDirectoryName in class BasicFileChooserUI

getFileName

public String getFileName()
Overrides:
getFileName in class BasicFileChooserUI

getMaximumSize

public Dimension getMaximumSize(JComponent c)
Returns the maximum size of the JFileChooser.

Overrides:
getMaximumSize in class ComponentUI
Parameters:
c - a JFileChooser
Returns:
a Dimension specifying the maximum width and height of the file chooser

getMinimumSize

public Dimension getMinimumSize(JComponent c)
Returns the minimum size of the JFileChooser.

Overrides:
getMinimumSize in class ComponentUI
Parameters:
c - a JFileChooser
Returns:
a Dimension specifying the minimum width and height of the file chooser

getPreferredSize

public Dimension getPreferredSize(JComponent c)
Returns the preferred size of the specified JFileChooser. 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 class ComponentUI
Parameters:
c - a JFileChooser
Returns:
a Dimension specifying the preferred width and height of the file chooser

installComponents

public void installComponents(JFileChooser fc)
Overrides:
installComponents in class BasicFileChooserUI
Parameters:
fc

installListeners

protected void installListeners(JFileChooser fc)
Overrides:
installListeners in class BasicFileChooserUI
Parameters:
fc

installStrings

protected void installStrings(JFileChooser fc)
Overrides:
installStrings in class BasicFileChooserUI
Parameters:
fc

installUI

public void installUI(JComponent c)
Overrides:
installUI in class BasicFileChooserUI
Parameters:
c

removeControlButtons

protected void removeControlButtons()

rescanCurrentDirectory

public void rescanCurrentDirectory(JFileChooser fc)
Overrides:
rescanCurrentDirectory in class BasicFileChooserUI
Parameters:
fc

setDirectoryName

public void setDirectoryName(String dirname)
Overrides:
setDirectoryName in class BasicFileChooserUI
Parameters:
dirname

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 class BasicFileChooserUI
Parameters:
directorySelected - if a directory is currently selected.

setFileName

public void setFileName(String filename)
Overrides:
setFileName in class BasicFileChooserUI
Parameters:
filename

uninstallComponents

public void uninstallComponents(JFileChooser fc)
Overrides:
uninstallComponents in class BasicFileChooserUI
Parameters:
fc

uninstallUI

public void uninstallUI(JComponent c)
Overrides:
uninstallUI in class BasicFileChooserUI
Parameters:
c

valueChanged

public void valueChanged(ListSelectionEvent e)
Parameters:
e


This documentation differs from the official API. Jadeite adds extra features to the API including: variable font sizes, constructions examples, placeholders for classes and methods, and auto-generated “See Also” links. Additionally it is missing some items found in standard Javadoc documentation, including: generics type information, “Deprecated” tags and comments, “See Also” links, along with other minor differences. Please send any questions or feedback to bam@cs.cmu.edu.
This page displays the Jadeite version of the documention, which is derived from the offical documentation that contains this copyright notice:
Copyright 2008 Sun Microsystems, Inc. All rights reserved. Use is subject to license terms. Also see the documentation redistribution policy.
The official Sun™ documentation can be found here at http://java.sun.com/javase/6/docs/api/.