java.awt.event.ActionListener
, java.util.EventListener
, javax.swing.Action
, ActionDowngrade
public abstract class AbstractFileSelectionAction extends AbstractActionDowngrade
ACCELERATOR_KEY, MNEMONIC_KEY
Constructor | Description |
---|---|
AbstractFileSelectionAction(java.awt.Component parent) |
Creates a new FileSelectionAction with the given optional parent component
as parent for the file chooser dialog.
|
Modifier and Type | Method | Description |
---|---|---|
protected javax.swing.JFileChooser |
createFileChooser() |
Creates the file chooser.
|
protected java.io.File |
getCurrentDirectory() |
Returns the working directory that should be used when initializing
the FileChooser.
|
protected abstract java.lang.String |
getFileDescription() |
Returns a descriptive text describing the file extension.
|
protected abstract java.lang.String |
getFileExtension() |
Returns the file extension that should be used for the operation.
|
protected java.io.File |
performSelectFile(java.io.File selectedFile,
int dialogType,
boolean appendExtension) |
Selects a file to use as target for the operation.
|
addPropertyChangeListener, clone, firePropertyChange, getKeys, getPropertyChangeListeners, getValue, isEnabled, putValue, removePropertyChangeListener, setEnabled
public AbstractFileSelectionAction(java.awt.Component parent)
parent
- the parentprotected abstract java.lang.String getFileExtension()
protected abstract java.lang.String getFileDescription()
protected java.io.File getCurrentDirectory()
protected java.io.File performSelectFile(java.io.File selectedFile, int dialogType, boolean appendExtension)
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.protected javax.swing.JFileChooser createFileChooser()