Package org.eclipse.gef.zest.fx.models
Class NavigationModel
java.lang.Object
org.eclipse.gef.zest.fx.models.NavigationModel
The
NavigationModel
manages a Set
of Graph
s for which
the next layout pass should be skipped (due to transformation or navigation
changes). Moreover, it manages a Map
saving a NavigationModel.ViewportState
per Graph
, so that the scroll position and zoom factor can be
restored when navigating nested graphs.-
Nested Class Summary
Modifier and TypeClassDescriptionstatic class
Representation of a viewport's state, which manifests itself in x and y translation, width and height, as well as a contents transform. -
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptiongetViewportState
(Graph graph) Retrieves theNavigationModel.ViewportState
that is currently saved for the givenGraph
.void
removeViewportState
(Graph graph) Removes theNavigationModel.ViewportState
for the givenGraph
.void
setViewportState
(Graph graph, NavigationModel.ViewportState state) Saves the givenNavigationModel.ViewportState
for the givenGraph
.
-
Constructor Details
-
NavigationModel
public NavigationModel()Default constructor.
-
-
Method Details
-
getViewportState
Retrieves theNavigationModel.ViewportState
that is currently saved for the givenGraph
.- Parameters:
graph
- TheGraph
of which the savedNavigationModel.ViewportState
is returned.- Returns:
- The
NavigationModel.ViewportState
that was saved for the givenGraph
.
-
removeViewportState
Removes theNavigationModel.ViewportState
for the givenGraph
.- Parameters:
graph
- TheGraph
for which to remove theNavigationModel.ViewportState
.
-