Package org.eclipse.gef.mvc.fx.policies
Class DeletionPolicy
java.lang.Object
org.eclipse.gef.common.adapt.IAdaptable.Bound.Impl<IVisualPart<? extends javafx.scene.Node>>
org.eclipse.gef.mvc.fx.policies.AbstractPolicy
org.eclipse.gef.mvc.fx.policies.DeletionPolicy
- All Implemented Interfaces:
IAdaptable.Bound<IVisualPart<? extends javafx.scene.Node>>,IPolicy
The
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.
-
Property Summary
Properties inherited from class org.eclipse.gef.common.adapt.IAdaptable.Bound.Impl
adaptableProperties inherited from interface org.eclipse.gef.common.adapt.IAdaptable.Bound
adaptable -
Nested Class Summary
Nested classes/interfaces inherited from interface org.eclipse.gef.common.adapt.IAdaptable.Bound
IAdaptable.Bound.Impl<T extends IAdaptable> -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionprotected ITransactionalOperationCreates anITransactionalOperationthat is used to encapsulate the changes that are applied by thisAbstractPolicythrough its "work" methods.voiddelete(IContentPart<? extends javafx.scene.Node> contentPartToDelete) Deletes the givenIContentPartby removing theIContentPart's content from the parentIContentPart' content and by detaching the contents of all anchoredIContentParts from theIContentPart's content.protected AbstractCompositeOperationExtracts aAbstractCompositeOperationfrom the operation created bycreateOperation().protected DeselectOperationReturns theDeselectOperationused by thisDeletionPolicyto deselect the to be deleted parts.protected ChangeFocusOperationReturns theChangeFocusOperationused by thisDeletionPolicyto unfocus the to be deleted parts. .Methods inherited from class org.eclipse.gef.mvc.fx.policies.AbstractPolicy
checkInitialized, commit, getOperation, init, isInitialized, locallyExecuteOperation, rollbackMethods inherited from class org.eclipse.gef.common.adapt.IAdaptable.Bound.Impl
adaptableProperty, getAdaptable, setAdaptableMethods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface org.eclipse.gef.common.adapt.IAdaptable.Bound
adaptableProperty, getAdaptable, setAdaptable
-
Constructor Details
-
DeletionPolicy
public DeletionPolicy()
-
-
Method Details
-
createOperation
Description copied from class:AbstractPolicyCreates anITransactionalOperationthat is used to encapsulate the changes that are applied by thisAbstractPolicythrough its "work" methods. The created operation should allow forlocal executionat each time.- Specified by:
createOperationin classAbstractPolicy- Returns:
- A new
ITransactionalOperationto encapsulate all applied changes.
-
delete
Deletes the givenIContentPartby removing theIContentPart's content from the parentIContentPart' content and by detaching the contents of all anchoredIContentParts from theIContentPart's content.- Parameters:
contentPartToDelete- TheIContentPartto mark for deletion.
-
getCompositeOperation
Extracts aAbstractCompositeOperationfrom the operation created bycreateOperation(). The composite operation is used to combine individual content change operations.- Returns:
- The
AbstractCompositeOperationthat is used to combine the individual content change operations.
-
getDeselectOperation
Returns theDeselectOperationused by thisDeletionPolicyto deselect the to be deleted parts.- Returns:
- The
DeselectOperationthat is used.
-
getUnfocusOperation
Returns theChangeFocusOperationused by thisDeletionPolicyto unfocus the to be deleted parts. .- Returns:
- The
ChangeFocusOperationthat is used.
-