org.jhotdraw.app.action.file
Class ClearFileAction
- java.lang.Object
-
- javax.swing.AbstractAction
-
- org.jhotdraw.app.action.AbstractViewAction
-
- org.jhotdraw.app.action.AbstractSaveUnsavedChangesAction
-
- org.jhotdraw.app.action.file.ClearFileAction
-
- All Implemented Interfaces:
- java.awt.event.ActionListener, java.io.Serializable, java.lang.Cloneable, java.util.EventListener, javax.swing.Action
public class ClearFileAction extends AbstractSaveUnsavedChangesAction
Clears (empties) the contents of the active view.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
ApplicationModelin methodApplicationModel.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,LoadDirectoryActionandCloseFileAction. This action should not be used together withNewFileAction.- See Also:
- Serialized Form
-
-
Field Summary
Fields Modifier and Type Field and Description static java.lang.StringID-
Fields inherited from class org.jhotdraw.app.action.AbstractViewAction
ENABLED_PROPERTY, VIEW_PROPERTY
-
-
Constructor Summary
Constructors Constructor and Description ClearFileAction(Application app, View view)Creates a new instance.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method and Description voiddoIt(View view)-
Methods inherited from class org.jhotdraw.app.action.AbstractSaveUnsavedChangesAction
actionPerformed
-
Methods inherited from class org.jhotdraw.app.action.AbstractViewAction
getActiveView, getApplication, isEnabled, setEnabled
-
-
-
-
Field Detail
-
ID
public static final java.lang.String ID
- See Also:
- Constant Field Values
-
-
Constructor Detail
-
ClearFileAction
public ClearFileAction(Application app, @Nullable View view)
Creates a new instance.
-
-
Method Detail
-
doIt
public void doIt(View view)
-
-
DataMelt 3.0 © DataMelt by jWork.ORG