public class XYGraphConfigCommand extends java.lang.Object implements IUndoableCommand
| Constructor and Description |
|---|
XYGraphConfigCommand(IXYGraph xyGraph)
Construct a graph configuration command
|
XYGraphConfigCommand(IXYGraph xyGraph,
java.util.function.Supplier<? extends XYGraphMemento> mementoFactory)
Constructor with a XYGraphMemento
Supplier |
| Modifier and Type | Method and Description |
|---|---|
XYGraphMemento |
getAfterXYGraphMemento()
Returns the after graph memento
|
XYGraphMemento |
getPreviousXYGraphMemento()
Returns the previous graph memento
|
void |
redo()
Restore the state of the target to the state after this command has been
executed.
|
void |
saveAfterStates() |
void |
savePreviousStates() |
java.lang.String |
toString() |
void |
undo()
Restore the state of the target to the state before this command has been
executed.
|
public XYGraphConfigCommand(IXYGraph xyGraph)
xyGraph - public XYGraphConfigCommand(IXYGraph xyGraph, java.util.function.Supplier<? extends XYGraphMemento> mementoFactory)
SupplierxyGraph - mementoFactory - A supplier that creates a new XYGraphMemento on each call to
the supplier's get method.public void redo()
IUndoableCommandredo in interface IUndoableCommandpublic void undo()
IUndoableCommandundo in interface IUndoableCommandpublic void savePreviousStates()
public void saveAfterStates()
public XYGraphMemento getPreviousXYGraphMemento()
public XYGraphMemento getAfterXYGraphMemento()
public java.lang.String toString()
toString in class java.lang.Object