Class NavigateOperation
java.lang.Object
org.eclipse.core.commands.operations.AbstractOperation
org.eclipse.gef.mvc.fx.operations.AbstractCompositeOperation
org.eclipse.gef.mvc.fx.operations.ForwardUndoCompositeOperation
org.eclipse.gef.zest.fx.operations.NavigateOperation
- All Implemented Interfaces:
ICompositeOperation
,IUndoableOperation
,ITransactionalOperation
The
NavigateOperation
is a ReverseUndoCompositeOperation
that
combines a ChangeContentsOperation
and an
ChangeViewportOperation
to navigate between nested and parent
Graph
s.-
Constructor Summary
ConstructorDescriptionNavigateOperation
(IViewer viewer) Creates a newNavigateOperation
that saves the layout and viewport for the currently displayedGraph
.NavigateOperation
(IViewer viewer, Graph targetGraph, boolean isNestedGraph) Creates a newNavigateOperation
that saves the layout and viewport for the currently displayedGraph
, loads the layout and viewport of the finalGraph, and changes the viewer contents. -
Method Summary
Modifier and TypeMethodDescriptionexecute
(IProgressMonitor monitor, IAdaptable info) Returns theChangeViewportOperation
that is used by thisNavigateOperation
to update the viewport.void
setFinalState
(Graph targetGraph, boolean isNestedGraph) Changes thisNavigateOperation
's final state so that the given finalGraph is opened.Methods inherited from class org.eclipse.gef.mvc.fx.operations.AbstractCompositeOperation
add, addAll, addContext, canExecute, canRedo, canUndo, combine, getOperations, isContentRelevant, isEmpty, isNoOp, redo, remove, undo, unwrap
Methods inherited from class org.eclipse.core.commands.operations.AbstractOperation
dispose, getContexts, getLabel, hasContext, removeContext, setLabel, toString
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
Methods inherited from interface org.eclipse.core.commands.operations.IUndoableOperation
dispose, getContexts, getLabel, hasContext, removeContext
-
Constructor Details
-
NavigateOperation
Creates a newNavigateOperation
that saves the layout and viewport for the currently displayedGraph
. The final state for the operation can later be set usingsetFinalState(Graph, boolean)
.- Parameters:
viewer
- TheInfiniteCanvasViewer
of which the contents and viewport are manipulated.
-
NavigateOperation
Creates a newNavigateOperation
that saves the layout and viewport for the currently displayedGraph
, loads the layout and viewport of the finalGraph, and changes the viewer contents. If the isNestedGraph flag is set totrue
, then the viewport that was saved for finalGraph will not be restored, but instead it will be reset.- Parameters:
viewer
- TheInfiniteCanvasViewer
of which the contents and viewport are manipulated.targetGraph
- The finalGraph
to be displayed within the givenInfiniteCanvasViewer
.isNestedGraph
- Specifies whether or not the given finalGraph is a nestedGraph
.
-
-
Method Details
-
execute
- Specified by:
execute
in interfaceIUndoableOperation
- Overrides:
execute
in classAbstractCompositeOperation
- Throws:
ExecutionException
-
getChangeViewportOperation
Returns theChangeViewportOperation
that is used by thisNavigateOperation
to update the viewport.- Returns:
- The
ChangeViewportOperation
that is used by thisNavigateOperation
to update the viewport.
-
setFinalState
Changes thisNavigateOperation
's final state so that the given finalGraph is opened. If the isNestedGraph flag is set totrue
, then the viewport that was saved for finalGraph will not be restored, but instead it will be reset.
-