Package org.eclipse.gef.zest.fx.policies
Class TransformLabelPolicy
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.TransformPolicy
org.eclipse.gef.zest.fx.policies.TransformLabelPolicy
- All Implemented Interfaces:
IAdaptable.Bound<IVisualPart<? extends javafx.scene.Node>>,IPolicy
The
TransformLabelPolicy is a specialization of the
TransformPolicy that chains a ChangeAttributeOperation to
affect the underlying model when transforming nodes. It is applicable to
IContentPart with Node visual and Node
content.-
Property Summary
Properties inherited from class org.eclipse.gef.common.adapt.IAdaptable.Bound.Impl
adaptableProperties inherited from interface org.eclipse.gef.common.adapt.IAdaptable.Bound
adaptable -
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 -
Method Summary
Modifier and TypeMethodDescriptiongetHost()protected PointgetLabelReferencePointInScene(String labelRole) Retrieve the reference position for the host label in scene coordinates.voidinit()booleanEnforce that label is preserved at its respective relative location.Methods inherited from class org.eclipse.gef.mvc.fx.policies.TransformPolicy
applyTransform, commit, createOperation, createPostTransform, createPreTransform, createTransformContentOperation, getCurrentTransform, getInitialTransform, isContentTransformable, setPostRotate, setPostScale, setPostTransform, setPostTranslate, setPreRotate, setPreScale, setPreTransform, setPreTranslate, setTransform, updateTransform, updateTransformOperationMethods inherited from class org.eclipse.gef.mvc.fx.policies.AbstractPolicy
checkInitialized, getOperation, isInitialized, locallyExecuteOperation, rollbackMethods inherited from class org.eclipse.gef.common.adapt.IAdaptable.Bound.Impl
adaptableProperty, getAdaptable, setAdaptableMethods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface org.eclipse.gef.common.adapt.IAdaptable.Bound
adaptableProperty, getAdaptable, setAdaptable
-
Constructor Details
-
TransformLabelPolicy
public TransformLabelPolicy()
-
-
Method Details
-
getHost
- Specified by:
getHostin interfaceIPolicy- Overrides:
getHostin classTransformPolicy
-
getLabelReferencePointInScene
Retrieve the reference position for the host label in scene coordinates.- Parameters:
labelRole- The role of the label, i.e. one ofZestProperties.EXTERNAL_LABEL__NE,ZestProperties.LABEL__NE,ZestProperties.SOURCE_LABEL__E, orZestProperties.TARGET_LABEL__E.- Returns:
- The reference position in scene coordinates.
-
init
public void init()- Specified by:
initin interfaceIPolicy- Overrides:
initin classTransformPolicy
-
preserveLabelOffset
public boolean preserveLabelOffset()Enforce that label is preserved at its respective relative location.- Returns:
- Whether the position was adjusted or not.
-