|
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.OpenEditPolicy
Open Shape Edit Policy
This edit policy handles double click (open) gestures on shapes. When the user
double clicks on an edit part, GEF creates a REQ_OPEN request and subclasses of this
edit policy should handle that request. This policy should be installed with the
policy role OPEN_ROLE. Normally, the corresponding edit policy role
would be defined in EditPolicy, but no such role currently exists.
This edit policy is different from "DirectEditPolicy" even though both are a result of a double click on a representation in a diagram. With the DIRECT_EDIT_ROLE, some type of in-diagram editing is performed (e.g., modify a text label, move line segment nodes, etc.). The OPEN_ROLE policy is typically installed on edit part whose underlying data can only be examined/modified by opening another editor window. For example, if an edit part represented another diagram, then an "open" request on that edit part should result in the corresponding diagram being opened in another editor window.
Although edit policies for both DIRECT_EDIT_ROLE and OPEN_ROLE could be installed on an edit part, typically only one of these roles is appropriate.
| 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 | |
OpenEditPolicy()
|
|
| Method Summary | |
Command |
getCommand(Request request)
Intercept a command request for REQ_OPEN. |
protected abstract Command |
getOpenCommand(Request request)
Returns the Command to perform the open request. |
EditPart |
getTargetEditPart(Request request)
By default, the target edit part is the host edit part. |
boolean |
understandsRequest(Request request)
Determine if the request type is supported by this edit policy. |
| 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 OpenEditPolicy()
| Method Detail |
protected abstract Command getOpenCommand(Request request)
Command to perform the open request.
request - the Request
public Command getCommand(Request request)
EditPolicy.getCommand(org.eclipse.gef.Request)public boolean understandsRequest(Request request)
EditPolicy.understandsRequest(org.eclipse.gef.Request)public EditPart getTargetEditPart(Request request)
EditPolicy.getTargetEditPart(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.