org.eclipse.gef.editpolicies
Class ComponentEditPolicy
java.lang.Object
|
+--org.eclipse.gef.editpolicies.AbstractEditPolicy
|
+--org.eclipse.gef.editpolicies.ComponentEditPolicy
- All Implemented Interfaces:
- EditPolicy, RequestConstants
- Direct Known Subclasses:
- RootComponentEditPolicy
- public abstract class ComponentEditPolicy
- extends AbstractEditPolicy
| Fields inherited from interface org.eclipse.gef.EditPolicy |
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_ROLE |
| Fields inherited from interface org.eclipse.gef.RequestConstants |
REQ_ADD, REQ_ALIGN, REQ_ALIGN_CHILD, REQ_ALIGN_CHILDREN, REQ_ANCESTOR_DELETED, REQ_CONNECTION_END, REQ_CONNECTION_START, REQ_CREATE, REQ_CREATE_BENDPOINT, REQ_DELETE, REQ_DELETE_BENDPOINT, REQ_DELETE_DEPENDANT, REQ_DIRECT_EDIT, REQ_MOVE, REQ_MOVE_BENDPOINT, REQ_MOVE_CHILD, REQ_MOVE_CHILDREN, REQ_ORPHAN, REQ_ORPHAN_CHILDREN, REQ_RECONNECT_END, REQ_RECONNECT_SOURCE, REQ_RECONNECT_START, REQ_RECONNECT_TARGET, REQ_RESIZE, REQ_RESIZE_CHILD, REQ_RESIZE_CHILDREN, REQ_SELECTION, REQ_SELECTION_HOVER, REQ_SOURCE_DELETED, REQ_TARGET_DELETED |
| Methods inherited from class org.eclipse.gef.editpolicies.AbstractEditPolicy |
activate, deactivate, debugFeedback, eraseSourceFeedback, eraseTargetFeedback, getHost, getTargetEditPart, initialize, setHost, showSourceFeedback, showTargetFeedback, toString, understandsRequest |
ComponentEditPolicy
public ComponentEditPolicy()
createDeleteCommand
protected abstract Command createDeleteCommand(DeleteRequest req)
getCommand
public Command getCommand(Request request)
- Get the command that performs an operation
of the type indicated by @commandString on the
receiver. Data needed to create the command is
contained in @tool
Possible values for the commandString depend on
the tool. Default tools send "create" and "move".
- Overrides:
getCommand in class AbstractEditPolicy
- Parameters:
commandString - java.lang.String The type of command to createcommandData - org.eclipse.gef.ICommandData Data needed to create the command- Returns:
- org.eclipse.gef.commands.ICommand The command that performs the operation
getDeleteCommand
protected Command getDeleteCommand(DeleteRequest request)
- Create a delete command to delete the receiver from the composition
getOrphanCommand
protected Command getOrphanCommand()
- Returns any contribution to orphaning this component from its container.
It is unusual that a child would have any additional orphaning requirements.
The orphan is typically handled by the parent's ContainerEditPolicy.
- See Also:
ContainerEditPolicy