Class AbstractMoveSquareAction<G extends GameObject<G,​A,​R>,​A extends MapArchObject<A>,​R extends Archetype<G,​A,​R>>

    • Method Summary

      All Methods Instance Methods Abstract Methods Concrete Methods 
      Modifier and Type Method Description
      boolean doAction​(boolean performAction)
      Executes the action.
      protected abstract boolean doAction​(boolean performAction, G gameObject)
      Executes the action.
      void setAction​(@NotNull javax.swing.Action action, @NotNull java.lang.String name)
      Sets the Action instance for this editor action.
      • Methods inherited from class java.lang.Object

        clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
    • Constructor Detail

      • AbstractMoveSquareAction

        protected AbstractMoveSquareAction​(@NotNull
                                           @NotNull SelectedSquareModel<G,​A,​R> selectedSquareModel,
                                           @Nullable
                                           @Nullable MapManager<G,​A,​R> mapManager)
        Creates a new instance.
        Parameters:
        selectedSquareModel - the selected square model to update
        mapManager - the map manager to track or null
    • Method Detail

      • doAction

        public boolean doAction​(boolean performAction)
        Executes the action.
        Parameters:
        performAction - whether the action should be performed
        Returns:
        whether the action was or can be performed
      • doAction

        protected abstract boolean doAction​(boolean performAction,
                                            @Nullable
                                            G gameObject)
        Executes the action.
        Parameters:
        performAction - whether the action should be performed
        gameObject - the current game object or null if none is selected
        Returns:
        whether the action was or can be performed
      • setAction

        public void setAction​(@NotNull
                              @NotNull javax.swing.Action action,
                              @NotNull
                              @NotNull java.lang.String name)
        Description copied from interface: EditorAction
        Sets the Action instance for this editor action.
        Specified by:
        setAction in interface EditorAction
        Parameters:
        action - the action instance
        name - the name of the action