Class AbstractSaveUnsavedChangesAction

All Implemented Interfaces:
EventListener, javafx.event.EventHandler<javafx.event.ActionEvent>, Action, PropertyBean, Disableable
Direct Known Subclasses:
ClearFileAction, CloseFileAction

public abstract class AbstractSaveUnsavedChangesAction extends AbstractActivityAction<FileBasedActivity>
This abstract class can be extended to implement an Action that asks to write unsaved changes of a FileBasedActivity before a destructive action is performed.

If the view has no unsaved changes, method doIt is invoked immediately. If unsaved changes are present, a dialog is shown asking whether the user wants to discard the changes, cancel or write the changes before doing it. If the user chooses to discard the changes, doIt is invoked immediately. If the user chooses to cancel, the action is aborted. If the user chooses to write the changes, the view is saved, and doIt is only invoked after the view was successfully saved.

Author:
Werner Randelshofer