org.jfree.ui.action
Class AbstractFileSelectionAction
- Action, ActionDowngrade
A base class for all file operations. This implementation provides all methods
to let the user select a file.
AbstractFileSelectionAction(Component parent) - Creates a new FileSelectionAction with the given optional parent component
as parent for the file chooser dialog.
|
protected JFileChooser | createFileChooser() - Creates the file chooser.
|
protected File | getCurrentDirectory() - Returns the working directory that should be used when initializing
the FileChooser.
|
protected abstract String | getFileDescription() - Returns a descriptive text describing the file extension.
|
protected abstract String | getFileExtension() - Returns the file extension that should be used for the operation.
|
protected File | performSelectFile(File selectedFile, int dialogType, boolean appendExtension) - Selects a file to use as target for the operation.
|
AbstractFileSelectionAction
public AbstractFileSelectionAction(Component parent)
Creates a new FileSelectionAction with the given optional parent component
as parent for the file chooser dialog.
createFileChooser
protected JFileChooser createFileChooser()
Creates the file chooser.
- the initialized file chooser.
getCurrentDirectory
protected File getCurrentDirectory()
Returns the working directory that should be used when initializing
the FileChooser.
getFileDescription
protected abstract String getFileDescription()
Returns a descriptive text describing the file extension.
getFileExtension
protected abstract String getFileExtension()
Returns the file extension that should be used for the operation.
performSelectFile
protected File performSelectFile(File selectedFile,
int dialogType,
boolean appendExtension)
Selects a file to use as target for the operation.
selectedFile
- the selected file.dialogType
- the dialog type.appendExtension
- true, if the file extension should be added if
necessary, false if the unmodified filename should be used.
- the selected and approved file or null, if the user canceled
the operation