Package net.sf.gridarta.maincontrol
Class EditorActionManager<G extends GameObject<G,A,R>,A extends MapArchObject<A>,R extends Archetype<G,A,R>>
- java.lang.Object
-
- net.sf.gridarta.maincontrol.EditorActionManager<G,A,R>
-
public class EditorActionManager<G extends GameObject<G,A,R>,A extends MapArchObject<A>,R extends Archetype<G,A,R>> extends java.lang.ObjectMaintains a set ofEditorActioninstances 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 globalMapViewManagerinstance and receives events related to the current map view.MapCursorListener: The editor action receives map cursor related events for the current map view.
-
-
Constructor Summary
Constructors Constructor Description EditorActionManager(@NotNull MapViewManager<G,A,R> mapViewManager)Creates a new instance.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description @NotNull javax.swing.ActioncreateAction(@NotNull java.lang.String name, @NotNull java.lang.String category, @NotNull EditorAction editorAction)Initializes a new action.voidcreateActionOptional(@NotNull java.lang.String name, @NotNull java.lang.String category, @Nullable EditorAction editorAction)Initializes a new action.voidcreateToggleAction(@NotNull java.lang.String name, @NotNull java.lang.String category, @NotNull EditorAction editorAction)Initializes a new action.
-
-
-
Constructor Detail
-
EditorActionManager
public EditorActionManager(@NotNull @NotNull MapViewManager<G,A,R> mapViewManager)Creates a new instance.- Parameters:
mapViewManager- the map view manager for tracking open maps
-
-
Method Detail
-
createAction
@NotNull public @NotNull javax.swing.Action createAction(@NotNull @NotNull java.lang.String name, @NotNull @NotNull java.lang.String category, @NotNull @NotNull EditorAction editorAction)Initializes a new action.- Parameters:
name- the name of the actioncategory- the category of the actioneditorAction- the editor to initialize- Returns:
- the action
-
createActionOptional
public void createActionOptional(@NotNull @NotNull java.lang.String name, @NotNull @NotNull java.lang.String category, @Nullable @Nullable EditorAction editorAction)Initializes a new action.- Parameters:
name- the name of the actioncategory- the category of the actioneditorAction- the editor to initialize ornullto do nothing
-
createToggleAction
public void createToggleAction(@NotNull @NotNull java.lang.String name, @NotNull @NotNull java.lang.String category, @NotNull @NotNull EditorAction editorAction)Initializes a new action.- Parameters:
name- the name of the actioncategory- the category of the actioneditorAction- the editor to initialize
-
-