public class FXResizeRelocatePolicy extends AbstractPolicy<javafx.scene.Node> implements ITransactional
FXResizeRelocatePolicy
is a transactional
policy
that handles the resize and relocation of its
host
.Modifier and Type | Field and Description |
---|---|
protected boolean |
initialized
Stores the initialized flag for this policy, i.e.
|
Constructor and Description |
---|
FXResizeRelocatePolicy() |
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 double |
getMinimumHeight()
Returns the minimum height.
|
protected double |
getMinimumWidth()
Returns the minimum width.
|
protected FXResizePolicy |
getResizePolicy()
Returns the
FXResizePolicy that is installed on the
host . |
protected FXTransformPolicy |
getTransformPolicy()
Returns the
FXTransformPolicy that is installed on the
host . |
void |
init()
Initializes the policy, so that the policy's "work" methods can be used.
|
void |
performResizeRelocate(double dx,
double dy,
double dw,
double dh)
Performs resize and relocation based on the given deltas by using the
getTransformPolicy() and getResizePolicy() . |
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
IUndoableOperation
that performs all manipulations
applied by the policy since the last ITransactional.init()
call.protected double getMinimumHeight()
protected double getMinimumWidth()
protected FXResizePolicy getResizePolicy()
FXResizePolicy
that is installed on the
host
.FXResizePolicy
that is installed on the
host
.protected FXTransformPolicy getTransformPolicy()
FXTransformPolicy
that is installed on the
host
.FXTransformPolicy
that is installed on the
host
.public void init()
ITransactional
IllegalStateException
. It is safe to call ITransactional.init()
multiple times in sequence.init
in interface ITransactional
public void performResizeRelocate(double dx, double dy, double dw, double dh)
getTransformPolicy()
and getResizePolicy()
.dx
- The horizontal relocation delta.dy
- The vertical relocation delta.dw
- The horizontal resize delta.dh
- The vertical resize delta.Copyright (c) 2014 itemis AG and others. All rights reserved.