public class MapFileActions<G extends GameObject<G,A,R>,A extends MapArchObject<A>,R extends Archetype<G,A,R>> extends java.lang.Object implements EditorAction
Constructor and Description |
---|
MapFileActions(ImageCreator2<G,A,R> imageCreator2,
MapManager<G,A,R> mapManager,
MapViewsManager<G,A,R> mapViewsManager,
MapViewManager<G,A,R> mapViewManager,
FileControl<G,A,R> fileControl,
java.awt.Component mainView)
Create a new instance that tracks the map state.
|
Modifier and Type | Method and Description |
---|---|
void |
closeMap()
Invoked when the user wants to close the map.
|
void |
closeNotify()
Unregister all registered listeners.
|
void |
createImage()
Invoked when the user wants to create an image file of the map.
|
void |
reloadMap()
Invoked when the user wants to reload the map to the previously saved
state.
|
void |
saveMap()
Invoked when the user wants to save the map.
|
void |
saveMapAs()
Invoked when the user wants to save the map to a file.
|
void |
setAction(javax.swing.Action action,
java.lang.String name)
Sets the
Action instance for this editor action. |
public MapFileActions(@NotNull ImageCreator2<G,A,R> imageCreator2, @NotNull MapManager<G,A,R> mapManager, @NotNull MapViewsManager<G,A,R> mapViewsManager, @NotNull MapViewManager<G,A,R> mapViewManager, @NotNull FileControl<G,A,R> fileControl, @NotNull java.awt.Component mainView)
imageCreator2
- the image creator to forwards actions tomapManager
- the map managermapViewsManager
- the map views managermapViewManager
- the map view managerfileControl
- the file control to forward actions tomainView
- the main view componentpublic void closeNotify()
@ActionMethod public void saveMap()
@ActionMethod public void saveMapAs()
@ActionMethod public void createImage()
@ActionMethod public void reloadMap()
@ActionMethod public void closeMap()
public void setAction(@NotNull javax.swing.Action action, @NotNull java.lang.String name)
Action
instance for this editor action.setAction
in interface EditorAction
action
- the action instancename
- the name of the action