public class FXResizeConnectionPolicy extends FXResizePolicy
FXResizeConnectionPolicy
is a specialization of the
FXResizePolicy
that performs a resize of an Connection
visual
by proportionally relocating its bend points.Constructor and Description |
---|
FXResizeConnectionPolicy() |
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 |
createResizeContentOperation()
Create an operation to resize 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> |
getIndicesOfMovableAnchors()
Returns the indices of all movable anchors.
|
void |
init()
Initializes the policy, so that the policy's "work" methods can be used.
|
protected boolean |
isContentResizable()
Returns whether the content part supports a content resize operation.
|
protected void |
updateResizeOperation(double dw,
double dh)
Update the resize operation to the new final dh and dw values.
|
getCurrentSize, getMinimumHeight, getMinimumWidth, getResizeOperation, getVisualToResize
applySize, getInitialSize, resize
checkInitialized, getOperation, isInitialized, locallyExecuteOperation, rollback
getAdaptable, setAdaptable
public ITransactionalOperation commit()
AbstractTransactionPolicy
ITransactionalOperation
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 AbstractResizePolicy<javafx.scene.Node>
ITransactionalOperation
that performs all
manipulations applied by the policy since the last
AbstractTransactionPolicy.init()
call.protected ITransactionalOperation createOperation()
AbstractTransactionPolicy
ITransactionalOperation
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 FXResizePolicy
ITransactionalOperation
to encapsulate all applied
changes.protected ITransactionalOperation createResizeContentOperation()
AbstractResizePolicy
createResizeContentOperation
in class AbstractResizePolicy<javafx.scene.Node>
protected FXBendConnectionOperation getBendConnectionOperation()
FXBendConnectionOperation
to be used by this policy.FXBendConnectionOperation
used to resize the visual.public IVisualPart<javafx.scene.Node,Connection> getHost()
IPolicy
getHost
in interface IPolicy<javafx.scene.Node>
getHost
in class AbstractPolicy<javafx.scene.Node>
IPolicy
.protected java.util.List<java.lang.Integer> getIndicesOfMovableAnchors()
List
of Integer
s specifying the anchors to
relocate.public void init()
AbstractTransactionPolicy
IllegalStateException
. It is safe to call AbstractTransactionPolicy.init()
multiple times in sequence.init
in class AbstractResizePolicy<javafx.scene.Node>
protected boolean isContentResizable()
AbstractResizePolicy
isContentResizable
in class AbstractResizePolicy<javafx.scene.Node>
true
if content resize is supported,
false
otherwise.protected void updateResizeOperation(double dw, double dh)
AbstractResizePolicy
updateResizeOperation
in class FXResizePolicy
dw
- The new final width delta.dh
- The new final height delta.Copyright (c) 2014 itemis AG and others. All rights reserved.