public class NewFileAction extends AbstractApplicationAction
This action is called when the user selects the New item in the File menu.
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 automatically create
a new view for each opened file. This action goes together with
OpenFileAction
and CloseFileAction
. It should
not be used together with NewWindowAction
.
Modifier and Type | Field and Description |
---|---|
static java.lang.String |
ID |
Constructor and Description |
---|
NewFileAction(Application app)
Creates a new instance.
|
NewFileAction(Application app,
java.lang.String id) |
Modifier and Type | Method and Description |
---|---|
void |
actionPerformed(java.awt.event.ActionEvent evt) |
dispose, getApplication, installApplicationListeners, isEnabled, setEnabled, uninstallApplicationListeners, updateApplicationEnabled
public static final java.lang.String ID
public NewFileAction(Application app)
public NewFileAction(Application app, java.lang.String id)