public class EditorActionManager<G extends GameObject<G,A,R>,A extends MapArchObject<A>,R extends Archetype<G,A,R>>
extends java.lang.Object
EditorAction instances and calls their event
listener callbacks. The following event listener interfaces may be
implemented by an editor action:
MapViewManagerListener: The editor action is registered in the global
MapViewManager instance and receives events related to the current
map view.
MapCursorListener: The editor action receives map cursor related
events for the current map view.
| Constructor and Description |
|---|
EditorActionManager(@NotNull MapViewManager<G,A,R> mapViewManager)
Creates a new instance.
|
| Modifier and Type | Method and Description |
|---|---|
@NotNull javax.swing.Action |
createAction(@NotNull java.lang.String name,
@NotNull java.lang.String category,
@NotNull EditorAction editorAction)
Initializes a new action.
|
void |
createActionOptional(@NotNull java.lang.String name,
@NotNull java.lang.String category,
@Nullable EditorAction editorAction)
Initializes a new action.
|
void |
createToggleAction(@NotNull java.lang.String name,
@NotNull java.lang.String category,
@NotNull EditorAction editorAction)
Initializes a new action.
|
public EditorActionManager(@NotNull
@NotNull MapViewManager<G,A,R> mapViewManager)
mapViewManager - the map view manager for tracking open maps@NotNull
public @NotNull javax.swing.Action createAction(@NotNull
@NotNull java.lang.String name,
@NotNull
@NotNull java.lang.String category,
@NotNull
@NotNull EditorAction editorAction)
name - the name of the actioncategory - the category of the actioneditorAction - the editor to initializepublic void createActionOptional(@NotNull
@NotNull java.lang.String name,
@NotNull
@NotNull java.lang.String category,
@Nullable
@Nullable EditorAction editorAction)
name - the name of the actioncategory - the category of the actioneditorAction - the editor to initialize or null to do
nothingpublic void createToggleAction(@NotNull
@NotNull java.lang.String name,
@NotNull
@NotNull java.lang.String category,
@NotNull
@NotNull EditorAction editorAction)
name - the name of the actioncategory - the category of the actioneditorAction - the editor to initialize