Class EditorActionManager<G extends GameObject<G,​A,​R>,​A extends MapArchObject<A>,​R extends Archetype<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.Object
    Maintains a set of 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.

    • Method Summary

      All Methods Instance Methods Concrete Methods 
      Modifier and Type Method 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.
      • Methods inherited from class java.lang.Object

        clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
    • 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 action
        category - the category of the action
        editorAction - 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 action
        category - the category of the action
        editorAction - the editor to initialize or null to 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 action
        category - the category of the action
        editorAction - the editor to initialize