public class OpenApplicationFileAction extends AbstractApplicationAction
The file name is passed in the action command of the action event.
This action is called when the user drops a file on the dock icon of
DefaultOSXApplication
or onto the desktop area of
DefaultMDIApplication
.
If you want this behavior in your application, you have to create an action
with this ID and put it in your ApplicationModel
in method
ApplicationModel.initApplication(org.jhotdraw.app.Application)
.
Modifier and Type | Field and Description |
---|---|
static java.lang.String |
ID |
Constructor and Description |
---|
OpenApplicationFileAction(Application app)
Creates a new instance.
|
Modifier and Type | Method and Description |
---|---|
void |
actionPerformed(java.awt.event.ActionEvent evt)
Opens a new view.
|
protected void |
openView(View view,
java.net.URI uri) |
dispose, getApplication, installApplicationListeners, isEnabled, setEnabled, uninstallApplicationListeners, updateApplicationEnabled
public static final java.lang.String ID
public OpenApplicationFileAction(Application app)
public void actionPerformed(java.awt.event.ActionEvent evt)
The file name is passed in the action command of the action event.
protected void openView(View view, java.net.URI uri)