All Packages  Class Hierarchy  This Package  Previous  Next  Index

Class com.sun.java.swing.JFileChooser

java.lang.Object
   |
   +----java.awt.Component
           |
           +----java.awt.Container
                   |
                   +----com.sun.java.swing.JComponent
                           |
                           +----com.sun.java.swing.JDirectoryPane
                                   |
                                   +----com.sun.java.swing.JFileChooser

public class JFileChooser
extends JDirectoryPane
implements SwingConstants

Variable Index

 o accessory
 o cancelCommand
 o cancelTitle
 o choosableTypes
The types that are appropriate for the user to be looking at right now.
 o DefaultCancelCommand
 o DefaultCancelTitle
 o DefaultLocationTitle
 o DefaultOkayCommand
 o DefaultOkayTitle
 o DefaultPrompt
 o DefaultTypesTitle
 o locationTitle
 o okayCommand
 o okayTitle
 o prompt
 o typesTitle

Constructor Index

 o JFileChooser()
Creates a JFileChooser on the user's home directory
 o JFileChooser(File)
Creates a JFileChooser on the given File
 o JFileChooser(String)
Creates a JFileChooser on the given path

Method Index

 o addChooseableFileType(FileType)
Adds the given type to the set of types the user can choose to filter by.
 o addChooseableFileType(String, String, Icon)
Adds a type consisting of one file extension to the set of types the user can choose to filter by.
 o addChooseableFileType(String, String[], Icon)
Adds a type consisting of a set of file extenions to the set of types the user can choose to filter by.
 o enumerateChoosableFileTypes()
 o getAccessory()
 o getCancelCommand()
The command of ActionEvents dispatched when my Cancel button is clicked, or choosing is otherwise aborted.
 o getCancelTitle()
 o getChoosableFileTypes()
 o getLocationTitle()
 o getOkayCommand()
The command of ActionEvents dispatched when my Okay button is clicked
 o getOkayTitle()
 o getPrompt()
 o getTypesTitle()
 o getUIClassID()
 o isChoosableFileType(FileType)
 o performCancel()
To be called by UIs when the user aborts
 o performOkay()
To be called by UIs when the user accepts input
 o setAccessory(Component)
Set this JFileChooser's accessory component.
 o setCancelCommand(String)
 o setCancelTitle(String)
 o setChoosableFileTypes(FileType[])
 o setLocationTitle(String)
 o setOkayCommand(String)
 o setOkayTitle(String)
 o setPrompt(String)
 o setTypesTitle(String)
 o showDialog(Component)
Return 0 on Okay, -1 on Cancel or other abort
 o updateUI()
Called to replace the UI with the latest version from the default UIFactory.

Variables

 o choosableTypes
 protected Vector choosableTypes
The types that are appropriate for the user to be looking at right now.

 o prompt
 protected String prompt
 o typesTitle
 protected String typesTitle
 o locationTitle
 protected String locationTitle
 o okayTitle
 protected String okayTitle
 o cancelTitle
 protected String cancelTitle
 o DefaultPrompt
 protected static String DefaultPrompt
 o DefaultTypesTitle
 protected static String DefaultTypesTitle
 o DefaultLocationTitle
 protected static String DefaultLocationTitle
 o DefaultOkayTitle
 protected static String DefaultOkayTitle
 o DefaultCancelTitle
 protected static String DefaultCancelTitle
 o okayCommand
 protected String okayCommand
 o cancelCommand
 protected String cancelCommand
 o DefaultOkayCommand
 protected static String DefaultOkayCommand
 o DefaultCancelCommand
 protected static String DefaultCancelCommand
 o accessory
 protected Component accessory

Constructors

 o JFileChooser
 public JFileChooser()
Creates a JFileChooser on the user's home directory

 o JFileChooser
 public JFileChooser(String path)
Creates a JFileChooser on the given path

 o JFileChooser
 public JFileChooser(File directory)
Creates a JFileChooser on the given File

Methods

 o getPrompt
 public String getPrompt()
 o setPrompt
 public void setPrompt(String prompt)
 o getTypesTitle
 public String getTypesTitle()
 o setTypesTitle
 public void setTypesTitle(String prompt)
 o getLocationTitle
 public String getLocationTitle()
 o setLocationTitle
 public void setLocationTitle(String locationTitle)
 o getOkayTitle
 public String getOkayTitle()
 o setOkayTitle
 public void setOkayTitle(String okayTitle)
 o getCancelTitle
 public String getCancelTitle()
 o setCancelTitle
 public void setCancelTitle(String cancelTitle)
 o performOkay
 public void performOkay()
To be called by UIs when the user accepts input

 o performCancel
 public void performCancel()
To be called by UIs when the user aborts

 o getOkayCommand
 public String getOkayCommand()
The command of ActionEvents dispatched when my Okay button is clicked

 o setOkayCommand
 public void setOkayCommand(String okayCommand)
 o getCancelCommand
 public String getCancelCommand()
The command of ActionEvents dispatched when my Cancel button is clicked, or choosing is otherwise aborted.

 o setCancelCommand
 public void setCancelCommand(String cancelCommand)
 o showDialog
 public int showDialog(Component parent)
Return 0 on Okay, -1 on Cancel or other abort

 o getAccessory
 public Component getAccessory()
Returns:
this JFileChooser's accessory component, or null
 o setAccessory
 public void setAccessory(Component c)
Set this JFileChooser's accessory component. If the old one was listening for any events, make it stop. If the new one is a PropertyChangeListener or an ActionListener, call the appropriate add message on this JFileChooser.

 o addChooseableFileType
 public void addChooseableFileType(String presentationName,
                                   String extension,
                                   Icon icon)
Adds a type consisting of one file extension to the set of types the user can choose to filter by. icon may be null.

 o addChooseableFileType
 public void addChooseableFileType(String presentationName,
                                   String extensions[],
                                   Icon icon)
Adds a type consisting of a set of file extenions to the set of types the user can choose to filter by. icon may be null.

 o addChooseableFileType
 public void addChooseableFileType(FileType type)
Adds the given type to the set of types the user can choose to filter by.

 o enumerateChoosableFileTypes
 public Enumeration enumerateChoosableFileTypes()
 o getChoosableFileTypes
 public Vector getChoosableFileTypes()
 o isChoosableFileType
 public boolean isChoosableFileType(FileType t)
 o setChoosableFileTypes
 public void setChoosableFileTypes(FileType types[])
 o updateUI
 public void updateUI()
Called to replace the UI with the latest version from the default UIFactory.

Overrides:
updateUI in class JDirectoryPane
 o getUIClassID
 public String getUIClassID()
Returns:
"FileChooserUI"
Overrides:
getUIClassID in class JDirectoryPane
See Also:
getUIClassID, getUI

All Packages  Class Hierarchy  This Package  Previous  Next  Index