public class LoadRecentFileAction extends AbstractSaveUnsavedChangesAction
If there is no active view, this action creates a new view and thus
acts the same like OpenRecentFileAction
.
This action is called when the user selects an item in the Recent Files
submenu of the File menu. The action and the menu item is automatically
created by the application, when the ApplicationModel
provides a
LoadFileAction
.
Modifier and Type | Field and Description |
---|---|
static java.lang.String |
ID |
ENABLED_PROPERTY, VIEW_PROPERTY
Constructor and Description |
---|
LoadRecentFileAction(Application app,
View view,
java.net.URI uri)
Creates a new instance.
|
Modifier and Type | Method and Description |
---|---|
void |
doIt(View v) |
boolean |
isEnabled()
Returns true if the action is enabled.
|
actionPerformed, getChooser, saveView, saveViewToURI
getActiveView, getApplication, getPropertyName, installViewListeners, setEnabled, setPropertyName, uninstallViewListeners, updateEnabled, updateView, updateView
public static final java.lang.String ID
public LoadRecentFileAction(Application app, View view, java.net.URI uri)
public boolean isEnabled()
isEnabled
in interface javax.swing.Action
isEnabled
in class AbstractViewAction
Action.isEnabled()
public void doIt(View v)
doIt
in class AbstractSaveUnsavedChangesAction