public class DeletionPolicy extends AbstractPolicy
DeletionPolicy is an AbstractPolicy 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.
adaptableadaptableIAdaptable.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 AbstractPolicy through its
"work" methods. |
void |
delete(IContentPart<? extends javafx.scene.Node> 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 |
getDeselectOperation()
Returns the
DeselectOperation used by this DeletionPolicy
to deselect the to be deleted parts. |
protected ChangeFocusOperation |
getUnfocusOperation()
Returns the
ChangeFocusOperation used by this
DeletionPolicy to unfocus the to be deleted parts. . |
checkInitialized, commit, getOperation, init, isInitialized, locallyExecuteOperation, rollbackadaptableProperty, getAdaptable, setAdaptableclone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitadaptableProperty, getAdaptable, setAdaptableprotected 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.public void delete(IContentPart<? extends javafx.scene.Node> 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 getDeselectOperation()
DeselectOperation used by this DeletionPolicy
to deselect the to be deleted parts.DeselectOperation that is used.protected ChangeFocusOperation getUnfocusOperation()
ChangeFocusOperation used by this
DeletionPolicy to unfocus the to be deleted parts. .ChangeFocusOperation that is used.Copyright (c) 2014, 2016 itemis AG and others. All rights reserved.