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.basic
class BasicFileChooserUI

java.lang.Object extended by javax.swing.plaf.ComponentUI extended by javax.swing.plaf.FileChooserUI extended by javax.swing.plaf.basic.BasicFileChooserUI
Direct Known Subclasses:
MetalFileChooserUI

public class BasicFileChooserUI
extends FileChooserUI

Basic L&F implementation of a FileChooser.


Nested Class Summary
protected class

          
protected class

           Responds to an Open or Save request
protected class

          
protected class

           Responds to a cancel request.
protected class

          
protected class

          
protected class

           Acts on the "home" key event or equivalent event.
protected class

           Creates a new folder.
protected class

          
protected class

           Rescans the files in the current directory
 
Field Summary
protected int cancelButtonMnemonic
          
protected String cancelButtonText
          
protected String cancelButtonToolTipText
          
protected Icon computerIcon
          
protected Icon detailsViewIcon
          
protected Icon directoryIcon
          
protected 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
          
protected Icon floppyDriveIcon
          
protected Icon hardDriveIcon
          
protected int helpButtonMnemonic
          
protected String helpButtonText
          
protected String helpButtonToolTipText
          
protected Icon homeFolderIcon
          
protected Icon listViewIcon
          
protected Icon newFolderIcon
          
protected int openButtonMnemonic
          
protected String openButtonText
          
protected String openButtonToolTipText
          
protected int saveButtonMnemonic
          
protected String saveButtonText
          
protected String saveButtonToolTipText
          
protected int updateButtonMnemonic
          
protected String updateButtonText
          
protected String updateButtonToolTipText
          
protected Icon upFolderIcon
          
 
Constructor Summary

          
 
Method Summary
 void

          
protected MouseListener

          
 ListSelectionListener

          
protected void

          
 PropertyChangeListener

          
 void

          
 FileFilter

          Returns the default accept all file filter
 JPanel

          
protected JButton

          
 int

          
 String

          
 String

          
 Action

          
 Action

          
 Action

          
 String

          Returns the title of this dialog
protected File

          Property to remember the directory that is currently selected in the UI.
 String

          
 JFileChooser

          
 String

          
 FileView

          
 Action

          
 BasicDirectoryModel

          
 Action

          
 Action

          
 void

          
protected void

          
protected void

          
protected void

          
protected void

          
 void

          Configures the specified component appropriate for the look and feel.
protected boolean

          Property to remember whether a directory is currently selected in the UI.
 void

          
protected void

          Property to remember the directory that is currently selected in the UI.
 void

          
protected void

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

          
 void

          
protected void

          
protected void

          
protected void

          
protected void

          
 void

          Reverses configuration which was done on the specified component during installUI.
 
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
 

Field Detail

cancelButtonMnemonic

protected int cancelButtonMnemonic

cancelButtonText

protected String cancelButtonText

cancelButtonToolTipText

protected String cancelButtonToolTipText

computerIcon

protected Icon computerIcon

detailsViewIcon

protected Icon detailsViewIcon

directoryIcon

protected Icon directoryIcon

directoryOpenButtonMnemonic

protected int directoryOpenButtonMnemonic
The mnemonic keycode used for the approve button when a directory is selected and the current selection mode is FILES_ONLY.

directoryOpenButtonText

protected String directoryOpenButtonText
The label text displayed on the approve button when a directory is selected and the current selection mode is FILES_ONLY.

directoryOpenButtonToolTipText

protected String directoryOpenButtonToolTipText
The tooltip text displayed on the approve button when a directory is selected and the current selection mode is FILES_ONLY.

fileIcon

protected Icon fileIcon

floppyDriveIcon

protected Icon floppyDriveIcon

hardDriveIcon

protected Icon hardDriveIcon

helpButtonMnemonic

protected int helpButtonMnemonic

helpButtonText

protected String helpButtonText

helpButtonToolTipText

protected String helpButtonToolTipText

homeFolderIcon

protected Icon homeFolderIcon

listViewIcon

protected Icon listViewIcon

newFolderIcon

protected Icon newFolderIcon

openButtonMnemonic

protected int openButtonMnemonic

openButtonText

protected String openButtonText

openButtonToolTipText

protected String openButtonToolTipText

saveButtonMnemonic

protected int saveButtonMnemonic

saveButtonText

protected String saveButtonText

saveButtonToolTipText

protected String saveButtonToolTipText

updateButtonMnemonic

protected int updateButtonMnemonic

updateButtonText

protected String updateButtonText

updateButtonToolTipText

protected String updateButtonToolTipText

upFolderIcon

protected Icon upFolderIcon
Constructor Detail

BasicFileChooserUI

public BasicFileChooserUI(JFileChooser b)
Parameters:
b
Method Detail

clearIconCache

public void clearIconCache()

createDoubleClickListener

protected MouseListener createDoubleClickListener(JFileChooser fc,
                                                  JList list)
Parameters:
fc
list

createListSelectionListener

public ListSelectionListener createListSelectionListener(JFileChooser fc)
Parameters:
fc

createModel

protected void createModel()

createPropertyChangeListener

public PropertyChangeListener createPropertyChangeListener(JFileChooser fc)
Parameters:
fc

ensureFileIsVisible

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

getAcceptAllFileFilter

public FileFilter getAcceptAllFileFilter(JFileChooser fc)
Returns the default accept all file filter

Overrides:
getAcceptAllFileFilter in class FileChooserUI
Parameters:
fc

getAccessoryPanel

public JPanel getAccessoryPanel()

getApproveButton

protected JButton getApproveButton(JFileChooser fc)
Parameters:
fc

getApproveButtonMnemonic

public int getApproveButtonMnemonic(JFileChooser fc)
Parameters:
fc

getApproveButtonText

public String getApproveButtonText(JFileChooser fc)
Overrides:
getApproveButtonText in class FileChooserUI
Parameters:
fc

getApproveButtonToolTipText

public String getApproveButtonToolTipText(JFileChooser fc)
Parameters:
fc

getApproveSelectionAction

public Action getApproveSelectionAction()

getCancelSelectionAction

public Action getCancelSelectionAction()

getChangeToParentDirectoryAction

public Action getChangeToParentDirectoryAction()

getDialogTitle

public String getDialogTitle(JFileChooser fc)
Returns the title of this dialog

Overrides:
getDialogTitle in class FileChooserUI
Parameters:
fc

getDirectory

protected File getDirectory()
Property to remember the directory that is currently selected in the UI.

Returns:
the value of the directory property

getDirectoryName

public String getDirectoryName()

getFileChooser

public JFileChooser getFileChooser()

getFileName

public String getFileName()

getFileView

public FileView getFileView(JFileChooser fc)
Overrides:
getFileView in class FileChooserUI
Parameters:
fc

getGoHomeAction

public Action getGoHomeAction()

getModel

public BasicDirectoryModel getModel()

getNewFolderAction

public Action getNewFolderAction()

getUpdateAction

public Action getUpdateAction()

installComponents

public void installComponents(JFileChooser fc)
Parameters:
fc

installDefaults

protected void installDefaults(JFileChooser fc)
Parameters:
fc

installIcons

protected void installIcons(JFileChooser fc)
Parameters:
fc

installListeners

protected void installListeners(JFileChooser fc)
Parameters:
fc

installStrings

protected void installStrings(JFileChooser fc)
Parameters:
fc

installUI

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

isDirectorySelected

protected boolean isDirectorySelected()
Property to remember whether a directory is currently selected in the UI.

Returns:
true iff a directory is currently selected.

rescanCurrentDirectory

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

setDirectory

protected void setDirectory(File f)
Property 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 File object representing the directory that is currently selected

setDirectoryName

public void setDirectoryName(String dirname)
Parameters:
dirname

setDirectorySelected

protected 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.

setFileName

public void setFileName(String filename)
Parameters:
filename

uninstallComponents

public void uninstallComponents(JFileChooser fc)
Parameters:
fc

uninstallDefaults

protected void uninstallDefaults(JFileChooser fc)
Parameters:
fc

uninstallIcons

protected void uninstallIcons(JFileChooser fc)
Parameters:
fc

uninstallListeners

protected void uninstallListeners(JFileChooser fc)
Parameters:
fc

uninstallStrings

protected void uninstallStrings(JFileChooser fc)
Parameters:
fc

uninstallUI

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


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/.