public class FXRelocateConnectionPolicy extends FXTransformPolicy
FXRelocateConnectionPolicy
is an FXTransformPolicy
that
is adjusted for the relocation of an FXConnection
. It uses an
FXBendOperation
to update the anchors of the FXConnection
according to the applied translation.initialized, TRANSFORMATION_PROVIDER_ROLE
Constructor and Description |
---|
FXRelocateConnectionPolicy() |
Modifier and Type | Method and Description |
---|---|
IUndoableOperation |
commit()
Returns an
IUndoableOperation that performs all manipulations
applied by the policy since the last ITransactional.init() call. |
protected java.util.List<java.lang.Integer> |
getIndicesOfMovableAnchors()
Returns the indices of all movable anchors.
|
void |
init()
Initializes the policy, so that the policy's "work" methods can be used.
|
protected void |
locallyExecuteOperation()
Executes the current operation without pushing it onto the operation
history.
|
void |
setConcatenation(AffineTransform transform)
Concatenates the given
AffineTransform to the initial
transformation. |
void |
setPreConcatenation(AffineTransform transform)
Concatenates the initial transformation to the given
AffineTransform . |
void |
setTransform(AffineTransform newTransform)
Changes the
host's transformation to the given
AffineTransform . |
getNodeTransform, getSnapToGridOffset
commit, disableRefreshVisuals, enableRefreshVisuals, getAdaptable, getHost, init, setAdaptable
public IUndoableOperation commit()
ITransactional
IUndoableOperation
that performs all manipulations
applied by the policy since the last ITransactional.init()
call. When called
multiple times in sequence, only the first call will yield an operation,
the subsequent calls will yield null
.commit
in interface ITransactional
commit
in class FXTransformPolicy
IUndoableOperation
that performs all manipulations
applied by the policy since the last ITransactional.init()
call.protected java.util.List<java.lang.Integer> getIndicesOfMovableAnchors()
List
of Integer
s specifying the anchors to
relocate.public void init()
ITransactional
IllegalStateException
. It is safe to call ITransactional.init()
multiple times in sequence.init
in interface ITransactional
init
in class FXTransformPolicy
protected void locallyExecuteOperation()
public void setConcatenation(AffineTransform transform)
FXTransformPolicy
AffineTransform
to the initial
transformation.setConcatenation
in class FXTransformPolicy
transform
- The AffineTransform
that is concatenated to the
initial transformation.public void setPreConcatenation(AffineTransform transform)
FXTransformPolicy
AffineTransform
.setPreConcatenation
in class FXTransformPolicy
transform
- The AffineTransform
to which the initial
transformation is concatenated.public void setTransform(AffineTransform newTransform)
FXTransformPolicy
host's
transformation to the given
AffineTransform
.setTransform
in class FXTransformPolicy
newTransform
- The new AffineTransform
for the host
.Copyright (c) 2014 itemis AG and others. All rights reserved.