public abstract class ComponentEditPolicy extends AbstractEditPolicy
ORPHAN is forwarded to the parent EditPart for it to handle.
DELETE is also forwarded to the parent EditPart, but subclasses may
also contribute to the delete by overriding
createDeleteCommand(GroupRequest).
This EditPolicy is not a
GraphicalEditPolicy, and should not be
used to show feedback or interact with the host's visuals in any way.
This EditPolicy should not be used with
ConnectionEditPart. Connections do not really have a
parent; use ConnectionEditPolicy.
COMPONENT_ROLE, CONNECTION_BENDPOINTS_ROLE, CONNECTION_ENDPOINTS_ROLE, CONNECTION_ROLE, CONTAINER_ROLE, DIRECT_EDIT_ROLE, GRAPHICAL_NODE_ROLE, LAYOUT_ROLE, NODE_ROLE, PRIMARY_DRAG_ROLE, SELECTION_FEEDBACK_ROLE, TREE_CONTAINER_ROLEREQ_ADD, REQ_ALIGN, REQ_ALIGN_CHILDREN, REQ_CLONE, REQ_CONNECTION_END, REQ_CONNECTION_START, REQ_CREATE, REQ_CREATE_BENDPOINT, REQ_DELETE, REQ_DELETE_DEPENDANT, REQ_DIRECT_EDIT, REQ_MOVE, REQ_MOVE_BENDPOINT, REQ_MOVE_CHILDREN, REQ_OPEN, REQ_ORPHAN, REQ_ORPHAN_CHILDREN, REQ_RECONNECT_SOURCE, REQ_RECONNECT_TARGET, REQ_RESIZE, REQ_RESIZE_CHILDREN, REQ_SELECTION, REQ_SELECTION_HOVER| Constructor and Description |
|---|
ComponentEditPolicy() |
| Modifier and Type | Method and Description |
|---|---|
protected Command |
createDeleteCommand(GroupRequest deleteRequest)
Override to contribute to the component's being deleted.
|
Command |
getCommand(Request request)
Factors the incoming Request into ORPHANs and DELETEs.
|
protected Command |
getDeleteCommand(GroupRequest request)
Calls and returns
createDeleteCommand(GroupRequest). |
protected Command |
getOrphanCommand()
Returns the command contribution for orphaning this component from its
container.
|
activate, deactivate, debugFeedback, eraseSourceFeedback, eraseTargetFeedback, getHost, getTargetEditPart, setHost, showSourceFeedback, showTargetFeedback, toString, understandsRequestprotected Command createDeleteCommand(GroupRequest deleteRequest)
deleteRequest - the DeleteRequestnull or a contribution to the deletepublic Command getCommand(Request request)
getCommand in interface EditPolicygetCommand in class AbstractEditPolicyrequest - the Requestnull or a Command contributionEditPolicy.getCommand(Request)protected Command getDeleteCommand(GroupRequest request)
createDeleteCommand(GroupRequest). This method
is here for historical reasons and used to perform additional function.request - the DeleteRequestprotected Command getOrphanCommand()
Copyright (c) IBM Corp. and others 2000, 2011. All Rights Reserved.