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

Disabled: no SafeJ information.

Basic L&F implementation of a FileChooser.


Nested Class Summary
protected  class BasicFileChooserUI.AcceptAllFileFilter
           
protected  class BasicFileChooserUI.ApproveSelectionAction
          Responds to an Open or Save request
protected  class BasicFileChooserUI.BasicFileView
           
protected  class BasicFileChooserUI.CancelSelectionAction
          Responds to a cancel request.
protected  class BasicFileChooserUI.ChangeToParentDirectoryAction
           
protected  class BasicFileChooserUI.DoubleClickListener
           
protected  class BasicFileChooserUI.GoHomeAction
          Acts on the "home" key event or equivalent event.
protected  class BasicFileChooserUI.NewFolderAction
          Creates a new folder.
protected  class BasicFileChooserUI.SelectionListener
           
protected  class BasicFileChooserUI.UpdateAction
          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
           
protected  Icon viewMenuIcon
           
 
Constructor Summary
BasicFileChooserUI(JFileChooser b)
           
 
Method Summary
 void clearIconCache()
           
protected  MouseListener createDoubleClickListener(JFileChooser fc, JList list)
           
 ListSelectionListener createListSelectionListener(JFileChooser fc)
           
protected  void createModel()
           
 PropertyChangeListener createPropertyChangeListener(JFileChooser fc)
           
 void ensureFileIsVisible(JFileChooser fc, File f)
           
 FileFilter getAcceptAllFileFilter(JFileChooser fc)
          Returns the default accept all file filter
 JPanel getAccessoryPanel()
           
protected  JButton getApproveButton(JFileChooser fc)
           
 int getApproveButtonMnemonic(JFileChooser fc)
           
 String getApproveButtonText(JFileChooser fc)
           
 String getApproveButtonToolTipText(JFileChooser fc)
           
 Action getApproveSelectionAction()
           
 Action getCancelSelectionAction()
           
 Action getChangeToParentDirectoryAction()
           
 JButton getDefaultButton(JFileChooser fc)
          Returns default button for current LookAndFeel.
 String getDialogTitle(JFileChooser fc)
          Returns the title of this dialog
protected  File getDirectory()
          Property to remember the directory that is currently selected in the UI.
 String getDirectoryName()
           
 JFileChooser getFileChooser()
           
 String getFileName()
           
 FileView getFileView(JFileChooser fc)
           
 Action getGoHomeAction()
           
 BasicDirectoryModel getModel()
           
 Action getNewFolderAction()
           
 Action getUpdateAction()
           
 void installComponents(JFileChooser fc)
           
protected  void installDefaults(JFileChooser fc)
           
protected  void installIcons(JFileChooser fc)
           
protected  void installListeners(JFileChooser fc)
           
protected  void installStrings(JFileChooser fc)
           
 void installUI(JComponent c)
          Configures the specified component appropriately for the look and feel.
protected  boolean isDirectorySelected()
          Property to remember whether a directory is currently selected in the UI.
 void rescanCurrentDirectory(JFileChooser fc)
           
protected  void setDirectory(File f)
          Property to remember the directory that is currently selected in the UI.
 void setDirectoryName(String dirname)
           
protected  void setDirectorySelected(boolean b)
          Property to remember whether a directory is currently selected in the UI.
 void setFileName(String filename)
           
 void uninstallComponents(JFileChooser fc)
           
protected  void uninstallDefaults(JFileChooser fc)
           
protected  void uninstallIcons(JFileChooser fc)
           
protected  void uninstallListeners(JFileChooser fc)
           
protected  void uninstallStrings(JFileChooser fc)
           
 void uninstallUI(JComponent c)
          Reverses configuration which was done on the specified component during installUI.
 
Methods inherited from class javax.swing.plaf.ComponentUI
contains, createUI, getAccessibleChild, getAccessibleChildrenCount, getBaseline, getBaselineResizeBehavior, getMaximumSize, getMinimumSize, getPreferredSize, paint, update
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

directoryIcon

protected Icon directoryIcon
Class is disabled.


fileIcon

protected Icon fileIcon
Class is disabled.


computerIcon

protected Icon computerIcon
Class is disabled.


hardDriveIcon

protected Icon hardDriveIcon
Class is disabled.


floppyDriveIcon

protected Icon floppyDriveIcon
Class is disabled.


newFolderIcon

protected Icon newFolderIcon
Class is disabled.


upFolderIcon

protected Icon upFolderIcon
Class is disabled.


homeFolderIcon

protected Icon homeFolderIcon
Class is disabled.


listViewIcon

protected Icon listViewIcon
Class is disabled.


detailsViewIcon

protected Icon detailsViewIcon
Class is disabled.


viewMenuIcon

protected Icon viewMenuIcon
Class is disabled.


saveButtonMnemonic

protected int saveButtonMnemonic
Class is disabled.


openButtonMnemonic

protected int openButtonMnemonic
Class is disabled.


cancelButtonMnemonic

protected int cancelButtonMnemonic
Class is disabled.


updateButtonMnemonic

protected int updateButtonMnemonic
Class is disabled.


helpButtonMnemonic

protected int helpButtonMnemonic
Class is disabled.


directoryOpenButtonMnemonic

protected int directoryOpenButtonMnemonic
Class is disabled.

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

Since:
1.4

saveButtonText

protected String saveButtonText
Class is disabled.


openButtonText

protected String openButtonText
Class is disabled.


cancelButtonText

protected String cancelButtonText
Class is disabled.


updateButtonText

protected String updateButtonText
Class is disabled.


helpButtonText

protected String helpButtonText
Class is disabled.


directoryOpenButtonText

protected String directoryOpenButtonText
Class is disabled.

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

Since:
1.4

saveButtonToolTipText

protected String saveButtonToolTipText
Class is disabled.


openButtonToolTipText

protected String openButtonToolTipText
Class is disabled.


cancelButtonToolTipText

protected String cancelButtonToolTipText
Class is disabled.


updateButtonToolTipText

protected String updateButtonToolTipText
Class is disabled.


helpButtonToolTipText

protected String helpButtonToolTipText
Class is disabled.


directoryOpenButtonToolTipText

protected String directoryOpenButtonToolTipText
Class is disabled.

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

Since:
1.4
Constructor Detail

BasicFileChooserUI

public BasicFileChooserUI(JFileChooser b)
Class is disabled.

Method Detail

installUI

public void installUI(JComponent c)
Class is disabled.

Description copied from class: ComponentUI
Configures the specified component appropriately for the look and feel. This method is invoked when the ComponentUI instance is being installed as the UI delegate on the specified component. This method should completely configure the component for the look and feel, including the following:
  1. Install default property values for color, fonts, borders, icons, opacity, etc. on the component. Whenever possible, property values initialized by the client program should not be overridden.
  2. Install a LayoutManager on the component if necessary.
  3. Create/add any required sub-components to the component.
  4. Create/install event listeners on the component.
  5. Create/install a PropertyChangeListener on the component in order to detect and respond to component property changes appropriately.
  6. Install keyboard UI (mnemonics, traversal, etc.) on the component.
  7. Initialize any appropriate instance data.

Overrides:
installUI in class ComponentUI
Parameters:
c - the component where this UI delegate is being installed
See Also:
ComponentUI.uninstallUI(javax.swing.JComponent), JComponent.setUI(javax.swing.plaf.ComponentUI), JComponent.updateUI()

uninstallUI

public void uninstallUI(JComponent c)
Class is disabled.

Description copied from class: ComponentUI
Reverses configuration which was done on the specified component during installUI. This method is invoked when this UIComponent instance is being removed as the UI delegate for the specified component. This method should undo the configuration performed in installUI, being careful to leave the JComponent instance in a clean state (no extraneous listeners, look-and-feel-specific property objects, etc.). This should include the following:
  1. Remove any UI-set borders from the component.
  2. Remove any UI-set layout managers on the component.
  3. Remove any UI-added sub-components from the component.
  4. Remove any UI-added event/property listeners from the component.
  5. Remove any UI-installed keyboard UI from the component.
  6. Nullify any allocated instance data objects to allow for GC.

Overrides:
uninstallUI in class ComponentUI
Parameters:
c - the component from which this UI delegate is being removed; this argument is often ignored, but might be used if the UI object is stateless and shared by multiple components
See Also:
ComponentUI.installUI(javax.swing.JComponent), JComponent.updateUI()

installComponents

public void installComponents(JFileChooser fc)
Class is disabled.


uninstallComponents

public void uninstallComponents(JFileChooser fc)
Class is disabled.


installListeners

protected void installListeners(JFileChooser fc)
Class is disabled.


uninstallListeners

protected void uninstallListeners(JFileChooser fc)
Class is disabled.


installDefaults

protected void installDefaults(JFileChooser fc)
Class is disabled.


installIcons

protected void installIcons(JFileChooser fc)
Class is disabled.


installStrings

protected void installStrings(JFileChooser fc)
Class is disabled.


uninstallDefaults

protected void uninstallDefaults(JFileChooser fc)
Class is disabled.


uninstallIcons

protected void uninstallIcons(JFileChooser fc)
Class is disabled.


uninstallStrings

protected void uninstallStrings(JFileChooser fc)
Class is disabled.


createModel

protected void createModel()
Class is disabled.


getModel

public BasicDirectoryModel getModel()
Class is disabled.


createPropertyChangeListener

public PropertyChangeListener createPropertyChangeListener(JFileChooser fc)
Class is disabled.


getFileName

public String getFileName()
Class is disabled.


getDirectoryName

public String getDirectoryName()
Class is disabled.


setFileName

public void setFileName(String filename)
Class is disabled.


setDirectoryName

public void setDirectoryName(String dirname)
Class is disabled.


rescanCurrentDirectory

public void rescanCurrentDirectory(JFileChooser fc)
Class is disabled.

Specified by:
rescanCurrentDirectory in class FileChooserUI

ensureFileIsVisible

public void ensureFileIsVisible(JFileChooser fc,
                                File f)
Class is disabled.

Specified by:
ensureFileIsVisible in class FileChooserUI

getFileChooser

public JFileChooser getFileChooser()
Class is disabled.


getAccessoryPanel

public JPanel getAccessoryPanel()
Class is disabled.


getApproveButton

protected JButton getApproveButton(JFileChooser fc)
Class is disabled.


getDefaultButton

public JButton getDefaultButton(JFileChooser fc)
Class is disabled.

Description copied from class: FileChooserUI
Returns default button for current LookAndFeel. JFileChooser will use this button as default button for dialog windows.

Overrides:
getDefaultButton in class FileChooserUI

getApproveButtonToolTipText

public String getApproveButtonToolTipText(JFileChooser fc)
Class is disabled.


clearIconCache

public void clearIconCache()
Class is disabled.


createDoubleClickListener

protected MouseListener createDoubleClickListener(JFileChooser fc,
                                                  JList list)
Class is disabled.


createListSelectionListener

public ListSelectionListener createListSelectionListener(JFileChooser fc)
Class is disabled.


isDirectorySelected

protected boolean isDirectorySelected()
Class is disabled.

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

Returns:
true iff a directory is currently selected.
Since:
1.4

setDirectorySelected

protected void setDirectorySelected(boolean b)
Class is disabled.

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

getDirectory

protected File getDirectory()
Class is disabled.

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

Returns:
the value of the directory property
Since:
1.4
See Also:
setDirectory(java.io.File)

setDirectory

protected void setDirectory(File f)
Class is disabled.

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
Since:
1.4

getAcceptAllFileFilter

public FileFilter getAcceptAllFileFilter(JFileChooser fc)
Class is disabled.

Returns the default accept all file filter

Specified by:
getAcceptAllFileFilter in class FileChooserUI

getFileView

public FileView getFileView(JFileChooser fc)
Class is disabled.

Specified by:
getFileView in class FileChooserUI

getDialogTitle

public String getDialogTitle(JFileChooser fc)
Class is disabled.

Returns the title of this dialog

Specified by:
getDialogTitle in class FileChooserUI

getApproveButtonMnemonic

public int getApproveButtonMnemonic(JFileChooser fc)
Class is disabled.


getApproveButtonText

public String getApproveButtonText(JFileChooser fc)
Class is disabled.

Specified by:
getApproveButtonText in class FileChooserUI

getNewFolderAction

public Action getNewFolderAction()
Class is disabled.


getGoHomeAction

public Action getGoHomeAction()
Class is disabled.


getChangeToParentDirectoryAction

public Action getChangeToParentDirectoryAction()
Class is disabled.


getApproveSelectionAction

public Action getApproveSelectionAction()
Class is disabled.


getCancelSelectionAction

public Action getCancelSelectionAction()
Class is disabled.


getUpdateAction

public Action getUpdateAction()
Class is disabled.