public class FXResizePolicy extends AbstractPolicy<javafx.scene.Node> implements ITransactional
ITransactional.NoOperation, ITransactional.UnexecutableOperation| Modifier and Type | Field and Description |
|---|---|
protected boolean |
initialized
Stores the initialized flag for this policy, i.e.
|
protected ForwardUndoCompositeOperation |
resizeAndRevealOperation
The
ForwardUndoCompositeOperation that assembles the resize
operation and the reveal operation. |
protected FXResizeNodeOperation |
resizeOperation
The
FXResizeNodeOperation that is used to resize the host's
visual. |
NOOP, UNEXECUTABLE| Constructor and Description |
|---|
FXResizePolicy() |
| Modifier and Type | Method and Description |
|---|---|
ITransactionalOperation |
commit()
Returns an
ITransactionalOperation that performs all
manipulations applied by the policy since the last ITransactional.init() call. |
protected Dimension |
getInitialSize(javafx.scene.Node visualToResize)
Returns the current size of the passed-in
Node, i.e. the width
and height of its layout-bounds. |
protected double |
getMinimumHeight()
Returns the minimum height.
|
protected double |
getMinimumWidth()
Returns the minimum width.
|
protected javafx.scene.Node |
getVisualToResize()
Returns the
Node that should be resized. |
void |
init()
Initializes the policy, so that the policy's "work" methods can be used.
|
void |
performResize(double dw,
double dh)
Resizes the
visual by the given delta width
and delta height. |
protected void |
updateOperation(double layoutDw,
double layoutDh)
Updates the resize operation to use the given delta width and delta
height.
|
commit, disableRefreshVisuals, enableRefreshVisuals, getAdaptable, getHost, init, setAdaptableprotected boolean initialized
protected FXResizeNodeOperation resizeOperation
FXResizeNodeOperation that is used to resize the host's
visual.protected ForwardUndoCompositeOperation resizeAndRevealOperation
ForwardUndoCompositeOperation that assembles the resize
operation and the reveal operation.public ITransactionalOperation commit()
ITransactionalITransactionalOperation 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.
You can return ITransactional.NOOP if no changes have to be applied. The domain
will filter out all ITransactional.NOOPs before their execution.
You can return ITransactional.UNEXECUTABLE to prevent any composite operation
that contains the ITransactional.UNEXECUTABLE from execution.
commit in interface ITransactionalITransactionalOperation that performs all
manipulations applied by the policy since the last
ITransactional.init() call.protected Dimension getInitialSize(javafx.scene.Node visualToResize)
Node, i.e. the width
and height of its layout-bounds.visualToResize - The Node for which to return the current size.Node.protected double getMinimumHeight()
Node cannot be
changed below this limit.protected double getMinimumWidth()
Node cannot be changed
below this limit.protected javafx.scene.Node getVisualToResize()
Node that should be resized. Per default, this is the
host's visual.Node that should be resized.public void init()
ITransactionalIllegalStateException. It is safe to call ITransactional.init()
multiple times in sequence.init in interface ITransactionalpublic void performResize(double dw,
double dh)
visual by the given delta width
and delta height.dw - The delta width.dh - The delta height.protected void updateOperation(double layoutDw,
double layoutDh)
layoutDw - The new delta width.layoutDh - The new delta height.Copyright (c) 2014 itemis AG and others. All rights reserved.