public class LabelOffsetSupport extends IAdaptable.Bound.Impl<IViewer>
LabelOffsetSupport can be used to preserve label positions during
interaction w.r.t. their reference positions.adaptableIAdaptable.Bound.Impl<T extends IAdaptable>| Constructor and Description |
|---|
LabelOffsetSupport() |
| Modifier and Type | Method and Description |
|---|---|
void |
abort()
Aborts preserving of label offsets by calling
AbstractPolicy.rollback() on the individual
TransformLabelPolicies. |
void |
commit()
Commits preserving of label offsets by calling
TransformPolicy.commit() on the individual
TransformLabelPolicies and executing the
resulting operations on the IDomain of the viewer. |
protected java.util.List<AbstractLabelPart> |
getEdgeLabelParts(EdgePart edgePart)
Returns the
AbstractLabelParts attached to the given
EdgePart. |
protected java.util.List<AbstractLabelPart> |
getLabelParts(java.util.List<? extends IVisualPart<? extends javafx.scene.Node>> targets)
Computes the
AbstractLabelParts that are attached to the targets
of this LabelOffsetSupport. |
protected java.util.List<AbstractLabelPart> |
getNodeLabelParts(NodePart nodePart)
Returns the
AbstractLabelParts attached to the given
NodePart. |
void |
init(java.util.List<? extends IVisualPart<? extends javafx.scene.Node>> targets) |
void |
preserveLabelOffsets()
Preserves label offsets by calling
TransformLabelPolicy.preserveLabelOffset() on the individual
TransformLabelPolicies. |
adaptableProperty, getAdaptable, setAdaptablepublic void abort()
AbstractPolicy.rollback() on the individual
TransformLabelPolicies.public void commit()
TransformPolicy.commit() on the individual
TransformLabelPolicies and executing the
resulting operations on the IDomain of the viewer.protected java.util.List<AbstractLabelPart> getEdgeLabelParts(EdgePart edgePart)
AbstractLabelParts attached to the given
EdgePart.edgePart - The EdgePart for which to determine the label parts.AbstractLabelParts attached to the given
EdgePart.protected java.util.List<AbstractLabelPart> getLabelParts(java.util.List<? extends IVisualPart<? extends javafx.scene.Node>> targets)
AbstractLabelParts that are attached to the targets
of this LabelOffsetSupport. Ingores label parts that are already
contained in the targets.targets - List of target IVisualParts.AbstractLabelParts that should be relocated.protected java.util.List<AbstractLabelPart> getNodeLabelParts(NodePart nodePart)
AbstractLabelParts attached to the given
NodePart.nodePart - The NodePart for which to determine the label parts.AbstractLabelParts attached to the given
NodePart.public void init(java.util.List<? extends IVisualPart<? extends javafx.scene.Node>> targets)
targets - The IVisualParts for which to relocate the attached
AbstractLabelParts.public void preserveLabelOffsets()
TransformLabelPolicy.preserveLabelOffset() on the individual
TransformLabelPolicies.Copyright (c) 2014 itemis AG and others. All rights reserved.