All Packages Class Hierarchy This Package Previous Next Index
Class java.awt.swing.JFileChooser
java.lang.Object
|
+----java.awt.Component
|
+----java.awt.Container
|
+----java.awt.swing.JComponent
|
+----java.awt.swing.JDirectoryPane
|
+----java.awt.swing.JFileChooser
- public class JFileChooser
- extends JDirectoryPane
- implements SwingConstants
JFileChooser.ModalListener-
accessory-
cancelCommand-
cancelTitle-
choosableTypes- The types that are appropriate for the user
to be looking at right now.
DefaultCancelCommand-
DefaultCancelTitle-
DefaultLocationTitle-
DefaultOkayCommand-
DefaultOkayTitle-
DefaultPrompt-
DefaultTypesTitle-
locationTitle-
okayCommand-
okayTitle-
prompt-
typesTitle-
JFileChooser()
- Creates a JFileChooser on the user's home directory
JFileChooser(File)
- Creates a JFileChooser on the given File
JFileChooser(String)
- Creates a JFileChooser on the given path
addChooseableFileType(FileType)
- Adds the given type to the set of types the user can
choose to filter by.
addChooseableFileType(String, String, Icon)
- Adds a type consisting of one file extension to the set of
types the user can choose to filter by.
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.
enumerateChoosableFileTypes()
-
getAccessory()
-
getCancelCommand()
- The command of ActionEvents dispatched when my Cancel button is
clicked, or choosing is otherwise aborted.
getCancelTitle()
-
getChoosableFileTypes()
-
getLocationTitle()
-
getOkayCommand()
- The command of ActionEvents dispatched when my Okay button is clicked
getOkayTitle()
-
getPrompt()
-
getTypesTitle()
-
getUIClassID()
-
isChoosableFileType(FileType)
-
performCancel()
- To be called by UIs when the user aborts
performOkay()
- To be called by UIs when the user accepts input
setAccessory(Component)
- Set this JFileChooser's accessory component.
setCancelCommand(String)
-
setCancelTitle(String)
-
setChoosableFileTypes(FileType[])
-
setLocationTitle(String)
-
setOkayCommand(String)
-
setOkayTitle(String)
-
setPrompt(String)
-
setTypesTitle(String)
-
showDialog(Component)
- Return 0 on Okay, -1 on Cancel or other abort
updateUI()
- Called to replace the UI with the latest version from the
default UIFactory.
choosableTypes
protected Vector choosableTypes
- The types that are appropriate for the user
to be looking at right now.
prompt
protected String prompt
typesTitle
protected String typesTitle
locationTitle
protected String locationTitle
okayTitle
protected String okayTitle
cancelTitle
protected String cancelTitle
DefaultPrompt
protected static String DefaultPrompt
DefaultTypesTitle
protected static String DefaultTypesTitle
DefaultLocationTitle
protected static String DefaultLocationTitle
DefaultOkayTitle
protected static String DefaultOkayTitle
DefaultCancelTitle
protected static String DefaultCancelTitle
okayCommand
protected String okayCommand
cancelCommand
protected String cancelCommand
DefaultOkayCommand
protected static String DefaultOkayCommand
DefaultCancelCommand
protected static String DefaultCancelCommand
accessory
protected Component accessory
JFileChooser
public JFileChooser()
- Creates a JFileChooser on the user's home directory
JFileChooser
public JFileChooser(String path)
- Creates a JFileChooser on the given path
JFileChooser
public JFileChooser(File directory)
- Creates a JFileChooser on the given File
getPrompt
public String getPrompt()
setPrompt
public void setPrompt(String prompt)
getTypesTitle
public String getTypesTitle()
setTypesTitle
public void setTypesTitle(String prompt)
getLocationTitle
public String getLocationTitle()
setLocationTitle
public void setLocationTitle(String locationTitle)
getOkayTitle
public String getOkayTitle()
setOkayTitle
public void setOkayTitle(String okayTitle)
getCancelTitle
public String getCancelTitle()
setCancelTitle
public void setCancelTitle(String cancelTitle)
performOkay
public void performOkay()
- To be called by UIs when the user accepts input
performCancel
public void performCancel()
- To be called by UIs when the user aborts
getOkayCommand
public String getOkayCommand()
- The command of ActionEvents dispatched when my Okay button is clicked
setOkayCommand
public void setOkayCommand(String okayCommand)
getCancelCommand
public String getCancelCommand()
- The command of ActionEvents dispatched when my Cancel button is
clicked, or choosing is otherwise aborted.
setCancelCommand
public void setCancelCommand(String cancelCommand)
showDialog
public int showDialog(Component parent)
- Return 0 on Okay, -1 on Cancel or other abort
getAccessory
public Component getAccessory()
- Returns:
- this JFileChooser's accessory component, or null
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.
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.
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.
addChooseableFileType
public void addChooseableFileType(FileType type)
- Adds the given type to the set of types the user can
choose to filter by.
enumerateChoosableFileTypes
public Enumeration enumerateChoosableFileTypes()
getChoosableFileTypes
public Vector getChoosableFileTypes()
isChoosableFileType
public boolean isChoosableFileType(FileType t)
setChoosableFileTypes
public void setChoosableFileTypes(FileType[] types)
updateUI
public void updateUI()
- Called to replace the UI with the latest version from the
default UIFactory.
- Overrides:
- updateUI in class JDirectoryPane
getUIClassID
public String getUIClassID()
- Returns:
- "FileChooserUI"
- Overrides:
- getUIClassID in class JDirectoryPane
- See Also:
- getUIClassID, getUI
All Packages Class Hierarchy This Package Previous Next Index
Submit a bug or feature