Package org.eclipse.gef.zest.fx.policies
Class SemanticZoomPolicy
- java.lang.Object
-
- org.eclipse.gef.common.adapt.IAdaptable.Bound.Impl<IVisualPart<? extends javafx.scene.Node>>
-
- org.eclipse.gef.mvc.fx.policies.AbstractPolicy
-
- org.eclipse.gef.mvc.fx.policies.ViewportPolicy
-
- org.eclipse.gef.zest.fx.policies.SemanticZoomPolicy
-
- All Implemented Interfaces:
IAdaptable.Bound<IVisualPart<? extends javafx.scene.Node>>
,IPolicy
public class SemanticZoomPolicy extends ViewportPolicy
TheSemanticZoomPolicy
extends theViewportPolicy
for associating semantic changes with viewport changes, i.e. opening of nested/nesting graphs when the zoom level is changed below/above a certain threshold.
-
-
Nested Class Summary
-
Nested classes/interfaces inherited from interface org.eclipse.gef.common.adapt.IAdaptable.Bound
IAdaptable.Bound.Impl<T extends IAdaptable>
-
-
Constructor Summary
Constructors Constructor Description SemanticZoomPolicy()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description ITransactionalOperation
commit()
protected ITransactionalOperation
createOperation()
protected java.util.List<NodePart>
findNestingNodes()
Returns aList
containing allNodePart
s (within the currently rendered graph) that have a nested graph assigned to them.protected ChangeViewportOperation
getChangeViewportOperation()
protected NavigateOperation
getNavigateOperation()
Returns theNavigateOperation
that is used to open nested/nestingGraph
s.void
init()
void
zoom(boolean relative, boolean discretize, double relativeZoom, double sceneX, double sceneY)
-
Methods inherited from class org.eclipse.gef.mvc.fx.policies.ViewportPolicy
fitToSize, fitToSize, fitToSize, scroll, setScroll, setZoom
-
Methods inherited from class org.eclipse.gef.mvc.fx.policies.AbstractPolicy
checkInitialized, getOperation, isInitialized, locallyExecuteOperation, rollback
-
Methods inherited from class org.eclipse.gef.common.adapt.IAdaptable.Bound.Impl
adaptableProperty, getAdaptable, setAdaptable
-
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
-
Methods inherited from interface org.eclipse.gef.common.adapt.IAdaptable.Bound
adaptableProperty, getAdaptable, setAdaptable
-
-
-
-
Method Detail
-
commit
public ITransactionalOperation commit()
- Specified by:
commit
in interfaceIPolicy
- Overrides:
commit
in classAbstractPolicy
-
createOperation
protected ITransactionalOperation createOperation()
- Overrides:
createOperation
in classViewportPolicy
-
findNestingNodes
protected java.util.List<NodePart> findNestingNodes()
Returns aList
containing allNodePart
s (within the currently rendered graph) that have a nested graph assigned to them.- Returns:
- A
List
containing allNodePart
s (within the currently rendered graph) that have a nested graph assigned to them.
-
getChangeViewportOperation
protected ChangeViewportOperation getChangeViewportOperation()
- Overrides:
getChangeViewportOperation
in classViewportPolicy
-
getNavigateOperation
protected NavigateOperation getNavigateOperation()
Returns theNavigateOperation
that is used to open nested/nestingGraph
s.- Returns:
- The
NavigateOperation
that is used to open nested/nestingGraph
s.
-
init
public void init()
- Specified by:
init
in interfaceIPolicy
- Overrides:
init
in classAbstractPolicy
-
zoom
public void zoom(boolean relative, boolean discretize, double relativeZoom, double sceneX, double sceneY)
- Overrides:
zoom
in classViewportPolicy
-
-