public class FXTransformConnectionPolicy extends FXTransformPolicy
FXTransformConnectionPolicy is an FXTransformPolicy that
is adjusted for the relocation of an Connection. It uses an
FXBendConnectionOperation to update the anchors of the
Connection according to the applied translation.adaptableIAdaptable.Bound.Impl<T extends IAdaptable>TRANSFORM_PROVIDER_KEY| Constructor and Description |
|---|
FXTransformConnectionPolicy() |
| Modifier and Type | Method and Description |
|---|---|
ITransactionalOperation |
commit()
Returns an
ITransactionalOperation that performs all
manipulations applied by the policy since the last AbstractTransactionPolicy.init() call. |
protected ITransactionalOperation |
createOperation()
Creates an
ITransactionalOperation that is used to encapsulate
the changes that are applied by this AbstractTransactionPolicy
through its "work" methods. |
protected ITransactionalOperation |
createTransformContentOperation()
Returns an operation to transform the content.
|
protected FXBendConnectionOperation |
getBendConnectionOperation()
Returns the
FXBendConnectionOperation to be used by this policy. |
IVisualPart<javafx.scene.Node,Connection> |
getHost()
|
protected java.util.List<java.lang.Integer> |
getIndicesOfUnconnectedAnchors()
Returns the indices of all movable anchors.
|
void |
init()
Initializes the policy, so that the policy's "work" methods can be used.
|
protected boolean |
isContentTransformable()
Returns whether the content can be transformed.
|
protected void |
updateTransformOperation(AffineTransform newTransform)
Updates the operation that was created within
AbstractTransactionPolicy.createOperation()
so that it will set the host's transformation to match
the given AffineTransform upon execution. |
getCurrentTransformapplyTransform, createPostTransform, createPreTransform, getInitialTransform, getSnapToGridOffset, setPostRotate, setPostScale, setPostTransform, setPostTranslate, setPreRotate, setPreScale, setPreTransform, setPreTranslate, setTransform, updateTransformcheckInitialized, getOperation, isInitialized, locallyExecuteOperation, rollbackadaptableProperty, getAdaptable, setAdaptablepublic ITransactionalOperation commit()
AbstractTransactionPolicyITransactionalOperation that performs all
manipulations applied by the policy since the last AbstractTransactionPolicy.init() call.
When called multiple times in sequence, only the first call will yield an
operation, the subsequent calls will yield null.commit in class AbstractTransformPolicy<javafx.scene.Node>ITransactionalOperation that performs all
manipulations applied by the policy since the last
AbstractTransactionPolicy.init() call.protected ITransactionalOperation createOperation()
AbstractTransactionPolicyITransactionalOperation that is used to encapsulate
the changes that are applied by this AbstractTransactionPolicy
through its "work" methods. The created operation should allow for
local execution at each time.createOperation in class FXTransformPolicyITransactionalOperation to encapsulate all applied
changes.protected ITransactionalOperation createTransformContentOperation()
AbstractTransformPolicycreateTransformContentOperation in class AbstractTransformPolicy<javafx.scene.Node>protected FXBendConnectionOperation getBendConnectionOperation()
FXBendConnectionOperation to be used by this policy.FXBendConnectionOperation used to transform the
visual.public IVisualPart<javafx.scene.Node,Connection> getHost()
IPolicygetHost in interface IPolicy<javafx.scene.Node>getHost in class AbstractPolicy<javafx.scene.Node>IPolicy.protected java.util.List<java.lang.Integer> getIndicesOfUnconnectedAnchors()
List of Integers specifying the anchors to
relocate.public void init()
AbstractTransactionPolicyIllegalStateException. It is safe to call AbstractTransactionPolicy.init()
multiple times in sequence.init in class AbstractTransformPolicy<javafx.scene.Node>protected boolean isContentTransformable()
AbstractTransformPolicyisContentTransformable in class AbstractTransformPolicy<javafx.scene.Node>true if the content can be transformed,
false otherwise.protected void updateTransformOperation(AffineTransform newTransform)
AbstractTransformPolicyAbstractTransactionPolicy.createOperation()
so that it will set the host's transformation to match
the given AffineTransform upon execution.updateTransformOperation in class FXTransformPolicynewTransform - The new transformation for the host.Copyright (c) 2014 itemis AG and others. All rights reserved.