public abstract class AbstractMoveSquareAction<G extends GameObject<G,A,R>,A extends MapArchObject<A>,R extends Archetype<G,A,R>> extends java.lang.Object implements EditorAction
SelectedSquareModel.| Modifier | Constructor and Description |
|---|---|
protected |
AbstractMoveSquareAction(@NotNull SelectedSquareModel<G,A,R> selectedSquareModel,
@Nullable MapManager<G,A,R> mapManager)
Creates a new instance.
|
| Modifier and Type | Method and 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. |
protected AbstractMoveSquareAction(@NotNull
@NotNull SelectedSquareModel<G,A,R> selectedSquareModel,
@Nullable
@Nullable MapManager<G,A,R> mapManager)
selectedSquareModel - the selected square model to updatemapManager - the map manager to track or nullpublic boolean doAction(boolean performAction)
performAction - whether the action should be performedprotected abstract boolean doAction(boolean performAction,
@Nullable
G gameObject)
performAction - whether the action should be performedgameObject - the current game object or null if none is
selectedpublic void setAction(@NotNull
@NotNull javax.swing.Action action,
@NotNull
@NotNull java.lang.String name)
EditorActionAction instance for this editor action.setAction in interface EditorActionaction - the action instancename - the name of the action