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

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.

### 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
`TransformLabelPolicy()`

### Method Summary

All Methods Instance Methods Concrete Methods
`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.

### 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`

### Constructor Detail

#### TransformLabelPolicy

    public TransformLabelPolicy()

### Method Detail

#### getHost

    public AbstractLabelPart getHost()

Specified by:
  `getHost` in interface `IPolicy`
Overrides:
  `getHost` in class `TransformPolicy`

#### 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 of `ZestProperties.EXTERNAL_LABEL__NE`, `ZestProperties.LABEL__NE`, `ZestProperties.SOURCE_LABEL__E`, or `ZestProperties.TARGET_LABEL__E`.
Returns:
  The reference position in scene coordinates.

#### init

    public void init()

Specified by:
  `init` in interface `IPolicy`
Overrides:
  `init` in class `TransformPolicy`

#### preserveLabelOffset

    public boolean preserveLabelOffset()

Enforce that label is preserved at its respective relative location.

Returns:
  Whether the position was adjusted or not.