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(MapViewManager<G,A,R> mapViewManager)
Creates a new instance.
|
Modifier and Type | Method and Description |
---|---|
javax.swing.Action |
createAction(java.lang.String name,
java.lang.String category,
EditorAction editorAction)
Initializes a new action.
|
javax.swing.Action |
createActionOptional(java.lang.String name,
java.lang.String category,
EditorAction editorAction)
Initializes a new action.
|
javax.swing.Action |
createToggleAction(java.lang.String name,
java.lang.String category,
EditorAction editorAction)
Initializes a new action.
|
public EditorActionManager(@NotNull MapViewManager<G,A,R> mapViewManager)
mapViewManager
- the map view manager for tracking open maps@NotNull public javax.swing.Action createAction(@NotNull java.lang.String name, @NotNull java.lang.String category, @NotNull EditorAction editorAction)
name
- the name of the actioncategory
- the category of the actioneditorAction
- the editor to initialize@Nullable public javax.swing.Action createActionOptional(@NotNull java.lang.String name, @NotNull java.lang.String category, @Nullable EditorAction editorAction)
name
- the name of the actioncategory
- the category of the actioneditorAction
- the editor to initialize or null
to do
nothing@NotNull public javax.swing.Action createToggleAction(@NotNull java.lang.String name, @NotNull java.lang.String category, @NotNull EditorAction editorAction)
name
- the name of the actioncategory
- the category of the actioneditorAction
- the editor to initialize