Class ZoomCommand
- java.lang.Object
-
- org.eclipse.nebula.visualization.internal.xygraph.undo.SaveStateCommand
-
- org.eclipse.nebula.visualization.internal.xygraph.undo.ZoomCommand
-
- All Implemented Interfaces:
IUndoableCommand
public class ZoomCommand extends SaveStateCommand
The command for graph zooming and panning.
-
-
Field Summary
Fields Modifier and Type Field Description private java.util.List<Range>
afterXRangeList
private java.util.List<Range>
afterYRangeList
private java.util.List<Range>
beforeXRangeList
private java.util.List<Range>
beforeYRangeList
private java.util.List<Axis>
xAxisList
private java.util.List<Axis>
yAxisList
-
Constructor Summary
Constructors Constructor Description ZoomCommand(java.lang.String name, java.util.List<Axis> xAxisList, java.util.List<Axis> yAxisList)
Initialize
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description void
redo()
Restore the state of the target to the state after this command has been executed.private void
saveOriginalState()
void
saveState()
Derived class should implement this to save the 'final' state.void
undo()
Restore the state of the target to the state before this command has been executed.-
Methods inherited from class org.eclipse.nebula.visualization.internal.xygraph.undo.SaveStateCommand
toString
-
-
-
-
Field Detail
-
xAxisList
private final java.util.List<Axis> xAxisList
-
yAxisList
private final java.util.List<Axis> yAxisList
-
beforeXRangeList
private final java.util.List<Range> beforeXRangeList
-
beforeYRangeList
private final java.util.List<Range> beforeYRangeList
-
afterXRangeList
private final java.util.List<Range> afterXRangeList
-
afterYRangeList
private final java.util.List<Range> afterYRangeList
-
-
Method Detail
-
saveOriginalState
private void saveOriginalState()
-
redo
public void redo()
Description copied from interface:IUndoableCommand
Restore the state of the target to the state after this command has been executed.
-
undo
public void undo()
Description copied from interface:IUndoableCommand
Restore the state of the target to the state before this command has been executed.
-
saveState
public void saveState()
Description copied from class:SaveStateCommand
Derived class should implement this to save the 'final' state. Might be called multiple times to save intermediate states, and the state saved on the last call would be the 'redo' state.- Specified by:
saveState
in classSaveStateCommand
-
-