|
Gridarta Editor
|
Implements actions for the "file" menu attached to maps. More...
Inheritance diagram for net.sf.gridarta.gui.map.MapFileActions< G extends GameObject< G, A, R, A extends MapArchObject< A, R extends Archetype< G, A, R >:
Collaboration diagram for net.sf.gridarta.gui.map.MapFileActions< G extends GameObject< G, A, R, A extends MapArchObject< A, R extends Archetype< G, A, R >:Public Member Functions | |
| void | closeMap () |
| Invoked when the user wants to close the map. More... | |
| void | closeNotify () |
| Unregister all registered listeners. More... | |
| void | createImage () |
| Invoked when the user wants to create an image file of the map. More... | |
| MapFileActions (@NotNull final ImageCreator2< G, A, R > imageCreator2, @NotNull final MapManager< G, A, R > mapManager, @NotNull final MapViewsManager< G, A, R > mapViewsManager, @NotNull final MapViewManager< G, A, R > mapViewManager, @NotNull final FileControl< G, A, R > fileControl, @NotNull final Component mainView) | |
| Create a new instance that tracks the map state. More... | |
| void | reloadMap () |
| Invoked when the user wants to reload the map to the previously saved state. More... | |
| void | saveMap () |
| Invoked when the user wants to save the map. More... | |
| void | saveMapAs () |
| Invoked when the user wants to save the map to a file. More... | |
| void | setAction (@NotNull final Action action, @NotNull final String name) |
| Sets the Action instance for this editor action. More... | |
Private Member Functions | |
| boolean | doCloseMap (final boolean performAction) |
| Executes the "close map" action. More... | |
| boolean | doCreateImage (final boolean performAction) |
| Executes the "create image" action. More... | |
| boolean | doReloadMap (final boolean performAction) |
| Executes the "reload map" action. More... | |
| boolean | doSaveMap (final boolean performAction) |
| Executes the "save map" action. More... | |
| boolean | doSaveMapAs (final boolean performAction) |
| Executes the "save map as" action. More... | |
| void | updateActions () |
| Update the enabled/disabled state of all actions. More... | |
Private Attributes | |
| Action | aCloseMap |
| The action for "close map". More... | |
| Action | aCreateImage |
| The action for "create image". More... | |
| Action | aReloadMap |
| The action for "reload map". More... | |
| Action | aSaveMap |
| The action for "save map". More... | |
| Action | aSaveMapAs |
| The action for "save map as". More... | |
| MapControl< G, A, R > | currentMapControl |
| The currently tracked map, or. More... | |
| MapView< G, A, R > | currentMapView |
| The current map view, or. More... | |
| final FileControl< G, A, R > | fileControl |
| The file control to forward actions to. More... | |
| final ImageCreator2< G, A, R > | imageCreator2 |
| The ImageCreator2 to forwards actions to. More... | |
| final Component | mainView |
| The main view Component. More... | |
| final MapManager< G, A, R > | mapManager |
| The map manager. More... | |
| final MapManagerListener< G, A, R > | mapManagerListener |
| The map manager listener which is attached to the current map if the current map is tracked. More... | |
| final MapModelListener< G, A, R > | mapModelListener |
| The MapModelListener which is attached to currentMapControl's map model. More... | |
| final MapViewsManager< G, A, R > | mapViewsManager |
| The MapViewsManager. More... | |
Implements actions for the "file" menu attached to maps.
Definition at line 53 of file MapFileActions.java.
| net.sf.gridarta.gui.map.MapFileActions< G extends GameObject< G, A, R, A extends MapArchObject< A, R extends Archetype< G, A, R >.MapFileActions | ( | @NotNull final ImageCreator2< G, A, R > | imageCreator2, |
| @NotNull final MapManager< G, A, R > | mapManager, | ||
| @NotNull final MapViewsManager< G, A, R > | mapViewsManager, | ||
| @NotNull final MapViewManager< G, A, R > | mapViewManager, | ||
| @NotNull final FileControl< G, A, R > | fileControl, | ||
| @NotNull final Component | mainView | ||
| ) |
Create a new instance that tracks the map state.
| imageCreator2 | the image creator to forwards actions to |
| mapManager | the map manager |
| mapViewsManager | the map views manager |
| mapViewManager | the map view manager |
| fileControl | the file control to forward actions to |
| mainView | the main view component |
Definition at line 212 of file MapFileActions.java.
References net.sf.gridarta.model.mapmodel.MapModel< G extends GameObject< G, A, R, A extends MapArchObject< A, R extends Archetype< G, A, R >.addMapModelListener(), net.sf.gridarta.gui.map.MapFileActions< G extends GameObject< G, A, R, A extends MapArchObject< A, R extends Archetype< G, A, R >.fileControl, net.sf.gridarta.model.mapcontrol.MapControl< G extends GameObject< G, A, R, A extends MapArchObject< A, R extends Archetype< G, A, R >.getMapModel(), net.sf.gridarta.gui.map.MapFileActions< G extends GameObject< G, A, R, A extends MapArchObject< A, R extends Archetype< G, A, R >.imageCreator2, net.sf.gridarta.gui.map.MapFileActions< G extends GameObject< G, A, R, A extends MapArchObject< A, R extends Archetype< G, A, R >.mainView, net.sf.gridarta.gui.map.MapFileActions< G extends GameObject< G, A, R, A extends MapArchObject< A, R extends Archetype< G, A, R >.mapManager, net.sf.gridarta.gui.map.MapFileActions< G extends GameObject< G, A, R, A extends MapArchObject< A, R extends Archetype< G, A, R >.mapViewsManager, and net.sf.gridarta.gui.map.MapFileActions< G extends GameObject< G, A, R, A extends MapArchObject< A, R extends Archetype< G, A, R >.updateActions().
Here is the call graph for this function:| void net.sf.gridarta.gui.map.MapFileActions< G extends GameObject< G, A, R, A extends MapArchObject< A, R extends Archetype< G, A, R >.closeMap | ( | ) |
Invoked when the user wants to close the map.
Definition at line 320 of file MapFileActions.java.
Here is the call graph for this function:| void net.sf.gridarta.gui.map.MapFileActions< G extends GameObject< G, A, R, A extends MapArchObject< A, R extends Archetype< G, A, R >.closeNotify | ( | ) |
Unregister all registered listeners.
Must be called when this instance is freed.
Definition at line 250 of file MapFileActions.java.
References net.sf.gridarta.model.mapcontrol.MapControl< G extends GameObject< G, A, R, A extends MapArchObject< A, R extends Archetype< G, A, R >.getMapModel(), net.sf.gridarta.model.mapmanager.MapManager< G extends GameObject< G, A, R, A extends MapArchObject< A, R extends Archetype< G, A, R >.removeMapManagerListener(), and net.sf.gridarta.model.mapmodel.MapModel< G extends GameObject< G, A, R, A extends MapArchObject< A, R extends Archetype< G, A, R >.removeMapModelListener().
Here is the call graph for this function:| void net.sf.gridarta.gui.map.MapFileActions< G extends GameObject< G, A, R, A extends MapArchObject< A, R extends Archetype< G, A, R >.createImage | ( | ) |
Invoked when the user wants to create an image file of the map.
Definition at line 303 of file MapFileActions.java.
Here is the call graph for this function:
|
private |
Executes the "close map" action.
| performAction | whether the action should be performed |
Definition at line 416 of file MapFileActions.java.
References net.sf.gridarta.gui.map.mapview.MapViewsManager< G extends GameObject< G, A, R, A extends MapArchObject< A, R extends Archetype< G, A, R >.closeMapView(), and net.sf.gridarta.gui.map.MapFileActions< G extends GameObject< G, A, R, A extends MapArchObject< A, R extends Archetype< G, A, R >.currentMapView.
Referenced by net.sf.gridarta.gui.map.MapFileActions< G extends GameObject< G, A, R, A extends MapArchObject< A, R extends Archetype< G, A, R >.closeMap(), and net.sf.gridarta.gui.map.MapFileActions< G extends GameObject< G, A, R, A extends MapArchObject< A, R extends Archetype< G, A, R >.updateActions().
Here is the call graph for this function:
Here is the caller graph for this function:
|
private |
Executes the "create image" action.
| performAction | whether the action should be performed |
Definition at line 369 of file MapFileActions.java.
References net.sf.gridarta.gui.map.renderer.ImageCreator2< G extends GameObject< G, A, R, A extends MapArchObject< A, R extends Archetype< G, A, R >.createImage(), net.sf.gridarta.gui.map.MapFileActions< G extends GameObject< G, A, R, A extends MapArchObject< A, R extends Archetype< G, A, R >.currentMapView, net.sf.gridarta.gui.map.mapview.MapView< G extends GameObject< G, A, R, A extends MapArchObject< A, R extends Archetype< G, A, R >.getMapControl(), and net.sf.gridarta.model.mapcontrol.MapControl< G extends GameObject< G, A, R, A extends MapArchObject< A, R extends Archetype< G, A, R >.getMapModel().
Referenced by net.sf.gridarta.gui.map.MapFileActions< G extends GameObject< G, A, R, A extends MapArchObject< A, R extends Archetype< G, A, R >.createImage(), and net.sf.gridarta.gui.map.MapFileActions< G extends GameObject< G, A, R, A extends MapArchObject< A, R extends Archetype< G, A, R >.updateActions().
Here is the call graph for this function:
Here is the caller graph for this function:
|
private |
Executes the "reload map" action.
| performAction | whether the action should be performed |
Definition at line 388 of file MapFileActions.java.
References net.sf.gridarta.gui.map.MapFileActions< G extends GameObject< G, A, R, A extends MapArchObject< A, R extends Archetype< G, A, R >.currentMapControl, net.sf.gridarta.model.mapmodel.MapFile.getFile(), net.sf.gridarta.model.mapmodel.MapModel< G extends GameObject< G, A, R, A extends MapArchObject< A, R extends Archetype< G, A, R >.getMapFile(), net.sf.gridarta.model.mapcontrol.MapControl< G extends GameObject< G, A, R, A extends MapArchObject< A, R extends Archetype< G, A, R >.getMapModel(), net.sf.gridarta.model.mapmanager.FileControl< G extends GameObject< G, A, R, A extends MapArchObject< A, R extends Archetype< G, A, R >.reportLoadError(), and net.sf.gridarta.model.mapmanager.MapManager< G extends GameObject< G, A, R, A extends MapArchObject< A, R extends Archetype< G, A, R >.revert().
Referenced by net.sf.gridarta.gui.map.MapFileActions< G extends GameObject< G, A, R, A extends MapArchObject< A, R extends Archetype< G, A, R >.reloadMap(), and net.sf.gridarta.gui.map.MapFileActions< G extends GameObject< G, A, R, A extends MapArchObject< A, R extends Archetype< G, A, R >.updateActions().
Here is the call graph for this function:
Here is the caller graph for this function:
|
private |
Executes the "save map" action.
| performAction | whether the action should be performed |
Definition at line 329 of file MapFileActions.java.
References net.sf.gridarta.gui.map.MapFileActions< G extends GameObject< G, A, R, A extends MapArchObject< A, R extends Archetype< G, A, R >.currentMapControl, net.sf.gridarta.model.mapcontrol.MapControl< G extends GameObject< G, A, R, A extends MapArchObject< A, R extends Archetype< G, A, R >.getMapModel(), net.sf.gridarta.model.mapmodel.MapModel< G extends GameObject< G, A, R, A extends MapArchObject< A, R extends Archetype< G, A, R >.isModified(), and net.sf.gridarta.model.mapmanager.FileControl< G extends GameObject< G, A, R, A extends MapArchObject< A, R extends Archetype< G, A, R >.save().
Referenced by net.sf.gridarta.gui.map.MapFileActions< G extends GameObject< G, A, R, A extends MapArchObject< A, R extends Archetype< G, A, R >.saveMap(), and net.sf.gridarta.gui.map.MapFileActions< G extends GameObject< G, A, R, A extends MapArchObject< A, R extends Archetype< G, A, R >.updateActions().
Here is the call graph for this function:
Here is the caller graph for this function:
|
private |
Executes the "save map as" action.
| performAction | whether the action should be performed |
Definition at line 349 of file MapFileActions.java.
References net.sf.gridarta.gui.map.MapFileActions< G extends GameObject< G, A, R, A extends MapArchObject< A, R extends Archetype< G, A, R >.currentMapControl, and net.sf.gridarta.model.mapmanager.FileControl< G extends GameObject< G, A, R, A extends MapArchObject< A, R extends Archetype< G, A, R >.saveAs().
Referenced by net.sf.gridarta.gui.map.MapFileActions< G extends GameObject< G, A, R, A extends MapArchObject< A, R extends Archetype< G, A, R >.saveMapAs(), and net.sf.gridarta.gui.map.MapFileActions< G extends GameObject< G, A, R, A extends MapArchObject< A, R extends Archetype< G, A, R >.updateActions().
Here is the call graph for this function:
Here is the caller graph for this function:| void net.sf.gridarta.gui.map.MapFileActions< G extends GameObject< G, A, R, A extends MapArchObject< A, R extends Archetype< G, A, R >.reloadMap | ( | ) |
Invoked when the user wants to reload the map to the previously saved state.
Definition at line 312 of file MapFileActions.java.
Here is the call graph for this function:| void net.sf.gridarta.gui.map.MapFileActions< G extends GameObject< G, A, R, A extends MapArchObject< A, R extends Archetype< G, A, R >.saveMap | ( | ) |
Invoked when the user wants to save the map.
Definition at line 287 of file MapFileActions.java.
Here is the call graph for this function:| void net.sf.gridarta.gui.map.MapFileActions< G extends GameObject< G, A, R, A extends MapArchObject< A, R extends Archetype< G, A, R >.saveMapAs | ( | ) |
Invoked when the user wants to save the map to a file.
Definition at line 295 of file MapFileActions.java.
Here is the call graph for this function:| void net.sf.gridarta.gui.map.MapFileActions< G extends GameObject< G, A, R, A extends MapArchObject< A, R extends Archetype< G, A, R >.setAction | ( | @NotNull final Action | action, |
| @NotNull final String | name | ||
| ) |
Sets the Action instance for this editor action.
| action | the action instance |
| name | the name of the action |
Implements net.sf.gridarta.utils.EditorAction.
Definition at line 430 of file MapFileActions.java.
Here is the call graph for this function:
|
private |
Update the enabled/disabled state of all actions.
Definition at line 260 of file MapFileActions.java.
References net.sf.gridarta.gui.map.MapFileActions< G extends GameObject< G, A, R, A extends MapArchObject< A, R extends Archetype< G, A, R >.doCloseMap(), net.sf.gridarta.gui.map.MapFileActions< G extends GameObject< G, A, R, A extends MapArchObject< A, R extends Archetype< G, A, R >.doCreateImage(), net.sf.gridarta.gui.map.MapFileActions< G extends GameObject< G, A, R, A extends MapArchObject< A, R extends Archetype< G, A, R >.doReloadMap(), net.sf.gridarta.gui.map.MapFileActions< G extends GameObject< G, A, R, A extends MapArchObject< A, R extends Archetype< G, A, R >.doSaveMap(), and net.sf.gridarta.gui.map.MapFileActions< G extends GameObject< G, A, R, A extends MapArchObject< A, R extends Archetype< G, A, R >.doSaveMapAs().
Referenced by net.sf.gridarta.gui.map.MapFileActions< G extends GameObject< G, A, R, A extends MapArchObject< A, R extends Archetype< G, A, R >.MapFileActions(), and net.sf.gridarta.gui.map.MapFileActions< G extends GameObject< G, A, R, A extends MapArchObject< A, R extends Archetype< G, A, R >.setAction().
Here is the call graph for this function:
Here is the caller graph for this function:
|
private |
The action for "close map".
Definition at line 113 of file MapFileActions.java.
|
private |
The action for "create image".
Definition at line 101 of file MapFileActions.java.
|
private |
The action for "reload map".
Definition at line 107 of file MapFileActions.java.
|
private |
The action for "save map".
Definition at line 89 of file MapFileActions.java.
|
private |
The action for "save map as".
Definition at line 95 of file MapFileActions.java.
|
private |
The currently tracked map, or.
if no map is tracked. This map has the mapModelListener attached.
Definition at line 120 of file MapFileActions.java.
Referenced by net.sf.gridarta.gui.map.MapFileActions< G extends GameObject< G, A, R, A extends MapArchObject< A, R extends Archetype< G, A, R >.doReloadMap(), net.sf.gridarta.gui.map.MapFileActions< G extends GameObject< G, A, R, A extends MapArchObject< A, R extends Archetype< G, A, R >.doSaveMap(), and net.sf.gridarta.gui.map.MapFileActions< G extends GameObject< G, A, R, A extends MapArchObject< A, R extends Archetype< G, A, R >.doSaveMapAs().
|
private |
The current map view, or.
if no map view is active.
Definition at line 126 of file MapFileActions.java.
Referenced by net.sf.gridarta.gui.map.MapFileActions< G extends GameObject< G, A, R, A extends MapArchObject< A, R extends Archetype< G, A, R >.doCloseMap(), and net.sf.gridarta.gui.map.MapFileActions< G extends GameObject< G, A, R, A extends MapArchObject< A, R extends Archetype< G, A, R >.doCreateImage().
|
private |
The file control to forward actions to.
Definition at line 65 of file MapFileActions.java.
|
private |
The ImageCreator2 to forwards actions to.
Definition at line 59 of file MapFileActions.java.
|
private |
The main view Component.
Definition at line 71 of file MapFileActions.java.
|
private |
The map manager.
Definition at line 77 of file MapFileActions.java.
|
private |
The map manager listener which is attached to the current map if the current map is tracked.
Otherwise it is unused.
Definition at line 172 of file MapFileActions.java.
|
private |
The MapModelListener which is attached to currentMapControl's map model.
Definition at line 133 of file MapFileActions.java.
|
private |
The MapViewsManager.
Definition at line 83 of file MapFileActions.java.