VR - The visual root node of the UI toolkit used, e.g.
javafx.scene.Node in case of JavaFX.public class DeletionPolicy<VR> extends AbstractTransactionPolicy<VR>
DeletionPolicy is an AbstractTransactionPolicy that
handles the deletion of content.
It handles the deletion of a IContentPart's content by initiating the
removal from the content parent via the ContentPolicy of the parent
IContentPart, as well as the detachment of anchored content elements
via the ContentPolicys of anchored IContentParts.
This policy should be registered at an IRootPart. It depends on
ContentPolicys being registered on all IContentParts that are
affected by the deletion.
adaptableIAdaptable.Bound.Impl<T extends IAdaptable>| Constructor and Description |
|---|
DeletionPolicy() |
| Modifier and Type | Method and Description |
|---|---|
protected ITransactionalOperation |
createOperation()
Creates an
ITransactionalOperation that is used to encapsulate
the changes that are applied by this AbstractTransactionPolicy
through its "work" methods. |
void |
delete(IContentPart<VR,? extends VR> contentPartToDelete)
Deletes the given
IContentPart by removing the
IContentPart's content from the parent IContentPart'
content and by detaching the contents of all anchored
IContentParts from the IContentPart's content. |
protected AbstractCompositeOperation |
getCompositeOperation()
Extracts a
AbstractCompositeOperation from the operation created
by createOperation(). |
protected DeselectOperation<VR> |
getDeselectOperation()
Returns the
DeselectOperation used by this DeletionPolicy
to deselect the to be deleted parts. |
protected AbstractCompositeOperation |
getDetachAnchoragesOperation()
Returns an
AbstractCompositeOperation that comprises all
DetachFromContentAnchorageOperation returned by the delegate
ContentPolicy. |
protected AbstractCompositeOperation |
getRemoveChildrenOperation()
Returns an
AbstractCompositeOperation that comprises all
RemoveContentChildOperation returned by the delegate
ContentPolicy. |
protected ChangeFocusOperation<VR> |
getUnfocusOperation()
Returns the
ChangeFocusOperation used by this
DeletionPolicy to unfocus the to be deleted parts. . |
checkInitialized, commit, getOperation, init, isInitialized, locallyExecuteOperation, rollbackadaptableProperty, getAdaptable, getHost, setAdaptableprotected ITransactionalOperation createOperation()
AbstractTransactionPolicyITransactionalOperation 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 AbstractTransactionPolicy<VR>ITransactionalOperation to encapsulate all applied
changes.public void delete(IContentPart<VR,? extends VR> contentPartToDelete)
IContentPart by removing the
IContentPart's content from the parent IContentPart'
content and by detaching the contents of all anchored
IContentParts from the IContentPart's content.contentPartToDelete - The IContentPart to mark for deletion.protected AbstractCompositeOperation getCompositeOperation()
AbstractCompositeOperation from the operation created
by createOperation(). The composite operation is used to combine
individual content change operations.AbstractCompositeOperation that is used to combine
the individual content change operations.protected DeselectOperation<VR> getDeselectOperation()
DeselectOperation used by this DeletionPolicy
to deselect the to be deleted parts.DeselectOperation that is used.protected AbstractCompositeOperation getDetachAnchoragesOperation()
AbstractCompositeOperation that comprises all
DetachFromContentAnchorageOperation returned by the delegate
ContentPolicy.AbstractCompositeOperation that is used for detaching
anchorages.protected AbstractCompositeOperation getRemoveChildrenOperation()
AbstractCompositeOperation that comprises all
RemoveContentChildOperation returned by the delegate
ContentPolicy.AbstractCompositeOperation that is used for removing
children.protected ChangeFocusOperation<VR> getUnfocusOperation()
ChangeFocusOperation used by this
DeletionPolicy to unfocus the to be deleted parts. .ChangeFocusOperation that is used.Copyright (c) 2014 itemis AG and others. All rights reserved.