|
Runtime | ||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||||
java.lang.Objectorg.eclipse.gef.editpolicies.AbstractEditPolicy
org.eclipse.gmf.runtime.diagram.ui.editpolicies.CreationEditPolicy
This edit policy returns the command that will create a new notational view for a the given request.
| Field Summary |
| 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_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 Summary | |
CreationEditPolicy()
|
|
| Method Summary | |
Command |
getCommand(Request request)
|
protected Command |
getCreateCommand(CreateViewRequest request)
Called in response to a REQ_CREATE request. |
protected Command |
getCreateElementAndViewCommand(CreateViewAndElementRequest request)
Method getCreateElementAndViewCommand. |
protected Command |
getReparentCommand(ChangeBoundsRequest request)
return a command to reparent both the semantic and view elements. |
protected ICommand |
getReparentCommand(IGraphicalEditPart gep)
Return the command to reparent the supplied editpart's semantic and notation elements. |
protected ICommand |
getReparentViewCommand(IGraphicalEditPart gep)
Return the command to reparent the supplied editpart's view only. |
EditPart |
getTargetEditPart(Request request)
Return the host if this editpolicy understands the supplied request. |
protected boolean |
shouldReparent(EObject element,
EObject newContext)
Determines if a semantic reparent is being performed. |
boolean |
understandsRequest(Request request)
Understands REQ_CREATE and REQ_ADD request types. |
| Methods inherited from class org.eclipse.gef.editpolicies.AbstractEditPolicy |
activate, deactivate, debugFeedback, eraseSourceFeedback, eraseTargetFeedback, getHost, setHost, showSourceFeedback, showTargetFeedback, toString |
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
| Constructor Detail |
public CreationEditPolicy()
| Method Detail |
public Command getCommand(Request request)
EditPolicy.getCommand(org.eclipse.gef.Request)public boolean understandsRequest(Request request)
protected boolean shouldReparent(EObject element,
EObject newContext)
element - element being reparentednewContext - the new container element
newContext.\; otherwise false.protected Command getReparentCommand(ChangeBoundsRequest request)
request - the request
protected ICommand getReparentCommand(IGraphicalEditPart gep)
gep - the editpart being reparented
protected ICommand getReparentViewCommand(IGraphicalEditPart gep)
gep - the editpart being reparented
protected Command getCreateCommand(CreateViewRequest request)
CreateCommandfor each of the request's view descriptor.
request - a create request (understands instances of
CreateViewRequest).
protected Command getCreateElementAndViewCommand(CreateViewAndElementRequest request)
request -
public EditPart getTargetEditPart(Request request)
|
Runtime | ||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||||
Guidelines for using Eclipse APIs.
Copyright (c) IBM Corp., Borland Software Corp., and others 2005,2006. All rights reserved.