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(@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)
Creates 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()
Unregisters 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(@NotNull javax.swing.Action action,
@NotNull java.lang.String name)
Sets the
Action instance for this editor action. |
public MapFileActions(@NotNull @NotNull ImageCreator2<G,A,R> imageCreator2, @NotNull @NotNull MapManager<G,A,R> mapManager, @NotNull @NotNull MapViewsManager<G,A,R> mapViewsManager, @NotNull @NotNull MapViewManager<G,A,R> mapViewManager, @NotNull @NotNull FileControl<G,A,R> fileControl, @NotNull @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 @NotNull javax.swing.Action action, @NotNull @NotNull java.lang.String name)
EditorAction
Action
instance for this editor action.setAction
in interface EditorAction
action
- the action instancename
- the name of the action