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
public class TransformLabelPolicy extends TransformPolicy
TheTransformLabelPolicyis a specialization of theTransformPolicythat chains aChangeAttributeOperationto affect the underlying model when transforming nodes. It is applicable toIContentPartwithNodevisual andNodecontent.
-
-
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 TransformLabelPolicy()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description AbstractLabelPartgetHost()protected PointgetLabelReferencePointInScene(java.lang.String labelRole)Retrieve the reference position for the host label in scene coordinates.voidinit()booleanpreserveLabelOffset()Enforce 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, updateTransformOperation
-
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
-
getHost
public AbstractLabelPart getHost()
- Specified by:
getHostin interfaceIPolicy- Overrides:
getHostin classTransformPolicy
-
getLabelReferencePointInScene
protected Point getLabelReferencePointInScene(java.lang.String labelRole)
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.
-
-