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 Graphs 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
Nested ClassesModifier and TypeClassDescriptionstatic classRepresentation of a viewport's state, which manifests itself in x and y translation, width and height, as well as a contents transform. -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptiongetViewportState(Graph graph) Retrieves theNavigationModel.ViewportStatethat is currently saved for the givenGraph.voidremoveViewportState(Graph graph) Removes theNavigationModel.ViewportStatefor the givenGraph.voidsetViewportState(Graph graph, NavigationModel.ViewportState state) Saves the givenNavigationModel.ViewportStatefor the givenGraph.
-
Constructor Details
-
NavigationModel
public NavigationModel()Default constructor.
-
-
Method Details
-
getViewportState
Retrieves theNavigationModel.ViewportStatethat is currently saved for the givenGraph.- Parameters:
graph- TheGraphof which the savedNavigationModel.ViewportStateis returned.- Returns:
- The
NavigationModel.ViewportStatethat was saved for the givenGraph.
-
removeViewportState
Removes theNavigationModel.ViewportStatefor the givenGraph.- Parameters:
graph- TheGraphfor which to remove theNavigationModel.ViewportState.
-