public class ClearFileAction extends AbstractSaveUnsavedChangesAction
This action is called when the user selects the Clear item in the File menu. The menu item is automatically created by the application.
If you want this behavior in your application, you have to create it
and put it in your ApplicationModel in method
ApplicationModel.initApplication(org.jhotdraw.app.Application).
This action is designed for applications which do not automatically
create a new view for each opened file. This action goes together with
NewWindowAction, LoadFileAction, LoadDirectoryAction
and CloseFileAction.
This action should not be used together with NewFileAction.
| Modifier and Type | Field and Description |
|---|---|
static java.lang.String |
ID |
ENABLED_PROPERTY, VIEW_PROPERTY| Constructor and Description |
|---|
ClearFileAction(Application app,
View view)
Creates a new instance.
|
| Modifier and Type | Method and Description |
|---|---|
void |
doIt(View view) |
actionPerformed, getChooser, saveView, saveViewToURIgetActiveView, getApplication, getPropertyName, installViewListeners, isEnabled, setEnabled, setPropertyName, uninstallViewListeners, updateEnabled, updateView, updateViewpublic static final java.lang.String ID
public ClearFileAction(Application app, View view)
public void doIt(View view)
doIt in class AbstractSaveUnsavedChangesAction