public class TransformLabelPolicy extends TransformPolicy
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.adaptable
adaptable
IAdaptable.Bound.Impl<T extends IAdaptable>
Constructor and Description |
---|
TransformLabelPolicy() |
Modifier and Type | Method and Description |
---|---|
AbstractLabelPart |
getHost() |
protected Point |
getLabelReferencePointInScene(java.lang.String labelRole)
Retrieve the reference position for the host label in scene coordinates.
|
void |
init() |
boolean |
preserveLabelOffset()
Enforce that label is preserved at its respective relative location.
|
applyTransform, commit, createOperation, createPostTransform, createPreTransform, createTransformContentOperation, getCurrentTransform, getInitialTransform, isContentTransformable, setPostRotate, setPostScale, setPostTransform, setPostTranslate, setPreRotate, setPreScale, setPreTransform, setPreTranslate, setTransform, updateTransform, updateTransformOperation
checkInitialized, getOperation, isInitialized, locallyExecuteOperation, rollback
adaptableProperty, getAdaptable, setAdaptable
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
adaptableProperty, getAdaptable, setAdaptable
public AbstractLabelPart getHost()
getHost
in interface IPolicy
getHost
in class TransformPolicy
protected Point getLabelReferencePointInScene(java.lang.String labelRole)
labelRole
- The role of the label, i.e. one of
ZestProperties.EXTERNAL_LABEL__NE
,
ZestProperties.LABEL__NE
,
ZestProperties.SOURCE_LABEL__E
, or
ZestProperties.TARGET_LABEL__E
.public void init()
init
in interface IPolicy
init
in class TransformPolicy
public boolean preserveLabelOffset()
Copyright (c) 2014 itemis AG and others. All rights reserved.