VR
- The visual root node of the UI toolkit used, e.g.
javafx.scene.Node in case of JavaFX.public abstract class AbstractInteractionPolicy<VR> extends AbstractPolicy<VR>
IPolicy
that handles an interaction.adaptable
IAdaptable.Bound.Impl<T extends IAdaptable>
Constructor and Description |
---|
AbstractInteractionPolicy() |
Modifier and Type | Method and Description |
---|---|
protected void |
commit(AbstractTransactionPolicy<VR> policy)
|
protected void |
init(AbstractTransactionPolicy<VR> policy)
If the given
IPolicy is not null , initializes it. |
protected void |
restoreRefreshVisuals(IVisualPart<VR,? extends VR> part)
Restores that the given
IVisualPart refreshes its visual if this
was the case prior to disabling the refresh of visuals. |
protected void |
rollback(AbstractTransactionPolicy<VR> policy)
If the given
IPolicy is not null , rolls it back. |
protected void |
storeAndDisableRefreshVisuals(IVisualPart<VR,? extends VR> part)
Disable that the given
IVisualPart refreshes its visual, if this
was not already the case (see
IVisualPart.setRefreshVisual(boolean) ). |
adaptableProperty, getAdaptable, getHost, setAdaptable
protected void commit(AbstractTransactionPolicy<VR> policy)
policy
- The IPolicy
to commit.protected void init(AbstractTransactionPolicy<VR> policy)
IPolicy
is not null
, initializes it.policy
- The IPolicy
to commit.protected void restoreRefreshVisuals(IVisualPart<VR,? extends VR> part)
IVisualPart
refreshes its visual if this
was the case prior to disabling the refresh of visuals.part
- The IVisualPart
for which refreshing of visuals is
restored.protected void rollback(AbstractTransactionPolicy<VR> policy)
IPolicy
is not null
, rolls it back.policy
- The IPolicy
to commit.protected void storeAndDisableRefreshVisuals(IVisualPart<VR,? extends VR> part)
IVisualPart
refreshes its visual, if this
was not already the case (see
IVisualPart.setRefreshVisual(boolean)
). Stores the state (whether
the part was still refreshing its visual or not) so it can be restored
later (see restoreRefreshVisuals(IVisualPart)
).part
- The IVisualPart
whose visual refresh is to be
disabled.Copyright (c) 2014 itemis AG and others. All rights reserved.