public class NavigationModel
extends java.lang.Object
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 ViewportModel.ViewportState
per Graph
, so that the scroll position and zoom factor can be
restored when navigating nested graphs.Constructor and Description |
---|
NavigationModel()
Default constructor.
|
Modifier and Type | Method and Description |
---|---|
void |
addSkipNextLayout(Graph graph)
|
ViewportModel.ViewportState |
getViewportState(Graph graph)
Retrieves the
ViewportModel.ViewportState that is currently saved for the given
Graph . |
boolean |
removeSkipNextLayout(Graph graph)
|
void |
setViewportState(Graph graph,
ViewportModel.ViewportState state)
Saves the given
ViewportModel.ViewportState for the given Graph . |
public void addSkipNextLayout(Graph graph)
public ViewportModel.ViewportState getViewportState(Graph graph)
ViewportModel.ViewportState
that is currently saved for the given
Graph
.graph
- The Graph
of which the saved ViewportModel.ViewportState
is
returned.ViewportModel.ViewportState
that was saved for the given
Graph
.public boolean removeSkipNextLayout(Graph graph)
public void setViewportState(Graph graph, ViewportModel.ViewportState state)
ViewportModel.ViewportState
for the given Graph
.graph
- The Graph
for which to save a ViewportModel.ViewportState
.state
- The ViewportModel.ViewportState
that is saved for the given
Graph
.Copyright (c) 2014 itemis AG and others. All rights reserved.