public class ResizePolicy extends AbstractPolicy
adaptableadaptableIAdaptable.Bound.Impl<T extends IAdaptable>| Constructor and Description |
|---|
ResizePolicy() |
| Modifier and Type | Method and Description |
|---|---|
protected void |
applySize(double dw,
double dh)
Apply the new size to the host.
|
ITransactionalOperation |
commit()
Returns an
ITransactionalOperation that performs all
manipulations applied by the policy since the previous AbstractPolicy.init()
call. |
protected Dimension |
computeApplicableDelta(double dw,
double dh)
Computes the applicable delta from the given delta width and delta height
values, i.e. respecting the part's minimum size.
|
protected ITransactionalOperation |
createOperation()
Creates an
ITransactionalOperation that is used to encapsulate
the changes that are applied by this AbstractPolicy through its
"work" methods. |
protected ITransactionalOperation |
createResizeContentOperation(ResizeOperation resizeOperation)
Create an operation to resize the content according to the given
ResizeOperation. |
protected Dimension |
getCurrentSize()
Returns the current size of the
IResizableContentPart. |
double |
getDeltaHeight()
Returns the delta height of the
resize
operation that is used by this policy. |
double |
getDeltaWidth()
Returns the delta width of the
resize
operation that is used by this policy. |
IResizableContentPart<? extends javafx.scene.Node> |
getHost()
|
protected Dimension |
getInitialSize()
Returns the initial size of the
IResizableContentPart. |
protected ResizeOperation |
getResizeOperation()
Returns the
ResizeOperation that is used by this
ResizePolicy. |
protected boolean |
isContentResizable()
Returns whether the content part supports a content resize operation.
|
void |
resize(double finalDw,
double finalDh)
Resizes the host by the given delta width and delta height.
|
protected void |
updateResizeOperation(double intendedDeltaWidth,
double intendedDeltaHeight)
Computes the applicable delta width and height from the given intended
delta values and updates the operation accordingly.
|
checkInitialized, getOperation, init, isInitialized, locallyExecuteOperation, rollbackadaptableProperty, getAdaptable, setAdaptableclone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitadaptableProperty, getAdaptable, setAdaptableprotected void applySize(double dw,
double dh)
dw - The width delta.dh - The height delta.public ITransactionalOperation commit()
AbstractPolicyITransactionalOperation that performs all
manipulations applied by the policy since the previous AbstractPolicy.init()
call.commit in interface IPolicycommit in class AbstractPolicyITransactionalOperation that performs all
manipulations applied by the policy since the last
AbstractPolicy.init() call.protected Dimension computeApplicableDelta(double dw, double dh)
dw - The width delta.dh - The height delta.Dimension containing the applicable delta based on the
given values.protected ITransactionalOperation createOperation()
AbstractPolicyITransactionalOperation that is used to encapsulate
the changes that are applied by this AbstractPolicy through its
"work" methods. The created operation should allow for
local execution at each time.createOperation in class AbstractPolicyITransactionalOperation to encapsulate all applied
changes.protected ITransactionalOperation createResizeContentOperation(ResizeOperation resizeOperation)
ResizeOperation.resizeOperation - The ResizeOperation for which to create a
ResizeContentOperation.protected Dimension getCurrentSize()
IResizableContentPart.public double getDeltaHeight()
resize
operation that is used by this policy.resize
operation that is used by this policy.public double getDeltaWidth()
resize
operation that is used by this policy.resize
operation that is used by this policy.public IResizableContentPart<? extends javafx.scene.Node> getHost()
IPolicyIPolicy.protected Dimension getInitialSize()
IResizableContentPart.protected ResizeOperation getResizeOperation()
ResizeOperation that is used by this
ResizePolicy.ResizeOperation used by this AbstractPolicy.protected boolean isContentResizable()
true if content resize is supported,
false otherwise.public void resize(double finalDw,
double finalDh)
finalDw - The delta width.finalDh - The delta height.protected void updateResizeOperation(double intendedDeltaWidth,
double intendedDeltaHeight)
intendedDeltaWidth - The intended width delta.intendedDeltaHeight - The intended height delta.Copyright (c) 2014, 2016 itemis AG and others. All rights reserved.