public abstract class AbstractFileSelectionAction extends AbstractAction
changeSupport, enabled
ACCELERATOR_KEY, ACTION_COMMAND_KEY, DEFAULT, DISPLAYED_MNEMONIC_INDEX_KEY, LARGE_ICON_KEY, LONG_DESCRIPTION, MNEMONIC_KEY, NAME, SELECTED_KEY, SHORT_DESCRIPTION, SMALL_ICON
Modifier | Constructor and Description |
---|---|
protected |
AbstractFileSelectionAction(Component parent)
Creates a new FileSelectionAction with the given optional parent component as parent for the file chooser dialog.
|
Modifier and Type | Method and Description |
---|---|
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.
|
addPropertyChangeListener, clone, firePropertyChange, getKeys, getPropertyChangeListeners, getValue, isEnabled, putValue, removePropertyChangeListener, setEnabled
equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
actionPerformed
protected AbstractFileSelectionAction(Component parent)
parent
- the parentprotected abstract String getFileExtension()
protected abstract String getFileDescription()
protected File getCurrentDirectory()
protected File performSelectFile(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 JFileChooser createFileChooser()
Copyright © 2002–2017 Pentaho Corporation. All rights reserved.