public class UndoControl<G extends GameObject<G,A,R>,A extends MapArchObject<A>,R extends Archetype<G,A,R>> extends java.lang.Object implements EditorAction
| Constructor and Description |
|---|
UndoControl(@NotNull MapManager<G,A,R> mapManager,
@NotNull GameObjectFactory<G,A,R> gameObjectFactory,
@NotNull GameObjectMatchers gameObjectMatchers)
Creates a new instance.
|
| Modifier and Type | Method and Description |
|---|---|
int |
getMaxUndoStates()
Returns the maximum number of undo states saved for each map.
|
void |
redo()
"Redo" was selected.
|
void |
setAction(@NotNull javax.swing.Action action,
@NotNull java.lang.String name)
Sets the
Action instance for this editor action. |
void |
setMaxUndoStates(int maxUndoStates)
Sets the maximum number of undo states saved for each map.
|
void |
undo()
"Undo" was selected.
|
public UndoControl(@NotNull
@NotNull MapManager<G,A,R> mapManager,
@NotNull
@NotNull GameObjectFactory<G,A,R> gameObjectFactory,
@NotNull
@NotNull GameObjectMatchers gameObjectMatchers)
mapManager - the map managergameObjectFactory - the game object factory to usegameObjectMatchers - the game object matchers to use@ActionMethod public void undo()
@ActionMethod public void redo()
public int getMaxUndoStates()
0=unlimitedpublic void setMaxUndoStates(int maxUndoStates)
maxUndoStates - the maximum number of undo states saved for each
map; 0=unlimitedpublic 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