public class NavigateOperation extends ReverseUndoCompositeOperation
NavigateOperation
is a ReverseUndoCompositeOperation
that
combines a ChangeContentsOperation
and an
FXChangeViewportOperation
to navigate between nested and parent
Graph
s.Constructor and Description |
---|
NavigateOperation(FXViewer viewer)
Creates a new
NavigateOperation that saves the layout and
viewport for the currently displayed Graph . |
NavigateOperation(FXViewer viewer,
Graph finalGraph,
boolean isNestedGraph)
Creates a new
NavigateOperation that saves the layout and
viewport for the currently displayed Graph , loads the layout and
viewport of the finalGraph, and changes the viewer contents. |
Modifier and Type | Method and Description |
---|---|
FXChangeViewportOperation |
getChangeViewportOperation()
Returns the
FXChangeViewportOperation that is used by this
NavigateOperation to update the viewport. |
void |
setFinalState(Graph finalGraph,
boolean isNestedGraph)
Changes this
NavigateOperation 's final state so that the given
finalGraph is opened. |
undo
add, addAll, addContext, canExecute, canRedo, canUndo, combine, execute, getOperations, isContentRelevant, isEmpty, isNoOp, redo, remove, unwrap
dispose, getContexts, getLabel, hasContext, removeContext, setLabel, toString
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
dispose, getContexts, getLabel, hasContext, removeContext
public NavigateOperation(FXViewer viewer)
NavigateOperation
that saves the layout and
viewport for the currently displayed Graph
. The final state for
the operation can later be set using
setFinalState(Graph, boolean)
.viewer
- The FXViewer
of which the contents and viewport are
manipulated.public NavigateOperation(FXViewer viewer, Graph finalGraph, boolean isNestedGraph)
NavigateOperation
that saves the layout and
viewport for the currently displayed Graph
, loads the layout and
viewport of the finalGraph, and changes the viewer contents. If
the isNestedGraph flag is set to true
, then the
viewport that was saved for finalGraph will not be restored, but
instead it will be reset.public FXChangeViewportOperation getChangeViewportOperation()
FXChangeViewportOperation
that is used by this
NavigateOperation
to update the viewport.FXChangeViewportOperation
that is used by this
NavigateOperation
to update the viewport.public void setFinalState(Graph finalGraph, boolean isNestedGraph)
NavigateOperation
's final state so that the given
finalGraph is opened. If the isNestedGraph flag is set to
true
, then the viewport that was saved for finalGraph
will not be restored, but instead it will be reset.Copyright (c) 2014 itemis AG and others. All rights reserved.