public class NavigationModel
extends java.lang.Object
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.| Modifier and Type | Class and Description |
|---|---|
static class |
NavigationModel.ViewportState
Representation of a viewport's state, which manifests itself in x and y
translation, width and height, as well as a contents transform.
|
| Constructor and Description |
|---|
NavigationModel()
Default constructor.
|
| Modifier and Type | Method and Description |
|---|---|
NavigationModel.ViewportState |
getViewportState(Graph graph)
Retrieves the
NavigationModel.ViewportState that is currently saved for the given
Graph. |
void |
removeViewportState(Graph graph)
Removes the
NavigationModel.ViewportState for the given Graph. |
void |
setViewportState(Graph graph,
NavigationModel.ViewportState state)
Saves the given
NavigationModel.ViewportState for the given Graph. |
public NavigationModel.ViewportState getViewportState(Graph graph)
NavigationModel.ViewportState that is currently saved for the given
Graph.graph - The Graph of which the saved NavigationModel.ViewportState is
returned.NavigationModel.ViewportState that was saved for the given
Graph.public void removeViewportState(Graph graph)
NavigationModel.ViewportState for the given Graph.graph - The Graph for which to remove the
NavigationModel.ViewportState.public void setViewportState(Graph graph, NavigationModel.ViewportState state)
NavigationModel.ViewportState for the given Graph.graph - The Graph for which to save a NavigationModel.ViewportState.state - The NavigationModel.ViewportState that is saved for the given
Graph.Copyright (c) 2014 itemis AG and others. All rights reserved.