be.ugent.caagt.swirl.actions
Class FileSaveAction
public abstract class FileSaveAction
Abstract super class for actions that allow files to be saved.
Clients should at least override
saveFile(File)
.
FileSaveAction(Window parent, FileFilter... filters) - Create an action of this type
|
protected void | dialogApproved() - Invoke
saveFile(File) on the file chosen.
|
protected abstract void | saveFile(File file) - Called for the file selected by the user.
|
protected int | showDialog() - Shows the file chooser save dialog.
|
protected abstract boolean | showFileExistsDialog(File file) - Alert the user that a file with the chosen name already exists.
|
FileSaveAction
public FileSaveAction(Window parent,
FileFilter... filters)
Create an action of this type
parent
- Parent window for the file chooser dialogfilters
- File filters for the file chooser dialog
saveFile
protected abstract void saveFile(File file)
Called for the file selected by the user. Must be overridden
by clients.
showDialog
protected int showDialog()
Shows the file chooser save dialog.
- showDialog in interface FileAction
showFileExistsDialog
protected abstract boolean showFileExistsDialog(File file)
Alert the user that a file with the chosen name already exists.
- true if the user allows the file to be overwritten.