public class NavigationPolicy extends AbstractPolicy<javafx.scene.Node> implements ITransactional
NavigationPolicy is a transactional
policy that can be used to navigate between
Graphs in a nested Graphs scenario. It saves the layout and
viewport of the current Graph when opening another Graph and
restores those values when navigating back to the Graph.| Modifier and Type | Field and Description |
|---|---|
protected boolean |
initialized
Stores the initialized flag for this policy, i.e.
|
| Constructor and Description |
|---|
NavigationPolicy() |
| Modifier and Type | Method and Description |
|---|---|
IUndoableOperation |
commit() |
void |
init() |
protected void |
openGraph(Graph currentGraph,
Graph newGraph,
boolean resetNewGraphViewport)
Saves the layout and viewport for the currentGraph, loads the
layout and viewport of the newGraph, and changes the viewer
contents.
|
void |
openNestedGraph(Graph newGraph)
|
void |
openNestingGraph(Graph newGraph)
|
commit, disableRefreshVisuals, enableRefreshVisuals, getAdaptable, getHost, init, setAdaptablepublic IUndoableOperation commit()
commit in interface ITransactionalpublic void init()
init in interface ITransactionalprotected void openGraph(Graph currentGraph, Graph newGraph, boolean resetNewGraphViewport)
true, then the viewport that was saved for newGraph
will not be restored, but instead it will be reset.public void openNestedGraph(Graph newGraph)
newGraph - The Graph to open.Copyright (c) 2014 itemis AG and others. All rights reserved.