public class OpenNestedGraphOnZoomBehavior extends AbstractBehavior<javafx.scene.Node>
OpenNestedGraphOnZoomBehavior handles the navigation to a nested
graph when the user zooms into the nesting node.| Modifier and Type | Field and Description |
|---|---|
protected double |
zoomLevel
The current zoom level.
|
pcsACTIVE_PROPERTY| Constructor and Description |
|---|
OpenNestedGraphOnZoomBehavior() |
| Modifier and Type | Method and Description |
|---|---|
void |
activate() |
void |
deactivate() |
NodeContentPart |
getHost() |
protected NavigationPolicy |
getSemanticZoomPolicy()
|
protected void |
onZoomLevelChange(double oldScale,
double newScale)
Called upon zoom level changes (reported by the
ViewportModel). |
addFeedback, addFeedback, addHandles, addHandles, addPropertyChangeListener, getAdaptable, getFeedbackParts, getHandleParts, isActive, removeFeedback, removeHandles, removePropertyChangeListener, setAdaptable, switchAdaptableScopespublic void activate()
activate in interface IActivatableactivate in class AbstractBehavior<javafx.scene.Node>public void deactivate()
deactivate in interface IActivatabledeactivate in class AbstractBehavior<javafx.scene.Node>public NodeContentPart getHost()
getHost in interface IBehavior<javafx.scene.Node>getHost in class AbstractBehavior<javafx.scene.Node>protected NavigationPolicy getSemanticZoomPolicy()
NavigationPolicy that is installed on the
IRootPart of the host.protected void onZoomLevelChange(double oldScale,
double newScale)
ViewportModel).
If the host is nesting a Graph, the zoom level
is changed beyond 3, and the host claims
at least half of the viewport area, then the nested Graph is
opened.oldScale - The previous zoom level.newScale - The new zoom level.Copyright (c) 2014 itemis AG and others. All rights reserved.