|
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.gef.editpolicies.GraphicalEditPolicy
org.eclipse.gef.editpolicies.GraphicalNodeEditPolicy
org.eclipse.gmf.runtime.diagram.ui.editpolicies.GraphicalNodeEditPolicy
the graphical node edit policy
GraphicalNodeEditPolicy| Nested Class Summary | |
protected class |
GraphicalNodeEditPolicy.PromptAndCreateConnectionCommand
Gets a command that pops up a menu which allows the user to select which type of connection to be created and then creates the connection. |
| Field Summary |
| Fields inherited from class org.eclipse.gef.editpolicies.GraphicalNodeEditPolicy |
connectionFeedback, feedbackHelper |
| 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 | |
GraphicalNodeEditPolicy()
|
|
| Method Summary | |
protected Connection |
createDummyConnection(Request req)
|
Command |
getCommand(Request request)
|
protected INodeEditPart |
getConnectableEditPart()
get a connectable edit part |
protected Command |
getConnectionAndRelationshipCompleteCommand(CreateConnectionViewAndElementRequest request)
Gets the command to complete the creation of a new connection and relationship. |
protected Command |
getConnectionAndRelationshipCreateCommand(CreateConnectionViewAndElementRequest request)
Gets the command to start the creation of a new connection and relationship. |
protected Command |
getConnectionCompleteCommand(CreateConnectionRequest request)
Returns a command that will create the connection. |
protected Command |
getConnectionCompleteCommand(java.lang.Object connectionType,
CreateConnectionRequest request)
Gets the command to create a connection based on the request and the connection identifier. |
protected INodeEditPart |
getConnectionCompleteEditPart(Request request)
getConnectionCompleteEditPart This method is used when the connection is verified and made complete to retrieve the final connecting editpart to be used in the connection creation. |
protected Command |
getConnectionCreateCommand(CreateConnectionRequest request)
|
protected java.util.List |
getConnectionMenuContent(CreateConnectionRequest request)
Gets a list of all the connector items that will represent the connector choices and will appear in the popup menu. |
protected ConnectionAnchor |
getConnectionTargetAnchor(Request request)
getConnectionTargetAnchor Method used during reconnection to retrieve the appropriate target anchor based on a request. |
protected ConnectionRouter |
getDummyConnectionRouter(CreateConnectionRequest arg0)
|
protected ICommand |
getPromptAndCreateConnectionCommand(java.util.List content,
CreateConnectionRequest request)
Gets a command that pops up a menu which allows the user to select which type of connection to be created and then creates the connection. |
protected Command |
getReconnectSourceCommand(ReconnectRequest request)
|
protected Command |
getReconnectTargetCommand(ReconnectRequest request)
|
protected Command |
getReversedUnspecifiedConnectionCompleteCommand(CreateUnspecifiedTypeConnectionRequest request)
Gets the command to complete the creation of a new connection and relationship (if applicable) for an unspecified type request. |
protected Command |
getRoutingAdjustment(IAdaptable connection,
java.lang.String connectionHint,
Routing currentRouterType,
EditPart target)
getRoutingAdjustment method to adjust routing if the reorient has moved the connection into a different routing environment. |
protected java.lang.String |
getSemanticHint(Request request)
getSemanticHint Retrieves the semanticHint from the request regarding the type of elemen being manipulated. |
protected ConnectionAnchor |
getSourceConnectionAnchor(CreateConnectionRequest request)
|
protected ConnectionAnchor |
getTargetConnectionAnchor(CreateConnectionRequest request)
|
protected Command |
getUnspecifiedConnectionCompleteCommand(CreateUnspecifiedTypeConnectionRequest request)
Gets the command to complete the creation of a new connection and relationship (if applicable) for an unspecified type request. |
protected View |
getView()
get this edit policy's edit part View |
protected IAdaptable |
getViewAdapter()
Return the view adapter describing the element to be created. |
protected void |
setViewAdapter(IAdaptable viewAdapter)
Cache the view descriptor describing the connection to be create. |
| Methods inherited from class org.eclipse.gef.editpolicies.GraphicalNodeEditPolicy |
deactivate, eraseCreationFeedback, eraseSourceFeedback, eraseTargetConnectionFeedback, eraseTargetFeedback, getFeedbackHelper, getTargetEditPart, showCreationFeedback, showSourceFeedback, showTargetConnectionFeedback, showTargetFeedback |
| Methods inherited from class org.eclipse.gef.editpolicies.GraphicalEditPolicy |
addFeedback, getFeedbackLayer, getHostFigure, getLayer, removeFeedback |
| Methods inherited from class org.eclipse.gef.editpolicies.AbstractEditPolicy |
activate, debugFeedback, getHost, setHost, toString, understandsRequest |
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
| Constructor Detail |
public GraphicalNodeEditPolicy()
| Method Detail |
protected Connection createDummyConnection(Request req)
protected ConnectionRouter getDummyConnectionRouter(CreateConnectionRequest arg0)
protected ConnectionAnchor getSourceConnectionAnchor(CreateConnectionRequest request)
protected ConnectionAnchor getTargetConnectionAnchor(CreateConnectionRequest request)
protected INodeEditPart getConnectableEditPart()
protected INodeEditPart getConnectionCompleteEditPart(Request request)
request - Request giving some information about the user gesture.
protected ConnectionAnchor getConnectionTargetAnchor(Request request)
request - Request giving some information about the user gesture.
protected View getView()
View
protected java.lang.String getSemanticHint(Request request)
request - Request that is sent from the user gesture
protected Command getRoutingAdjustment(IAdaptable connection,
java.lang.String connectionHint,
Routing currentRouterType,
EditPart target)
connection - IAdaptable that is placeholder for not yet created connection.
Also adapts directly to a ConnectionEditPart in the case of a
reorient.connectionHint - String that is the semantic hint of the connection being
manipulatedcurrentRouterType - Integer current representation of the routing styletarget - EditPart that is being targeted by the request.
protected Command getReconnectTargetCommand(ReconnectRequest request)
protected Command getReconnectSourceCommand(ReconnectRequest request)
protected Command getConnectionCompleteCommand(CreateConnectionRequest request)
GraphicalNodeEditPolicy.getConnectionCompleteCommand(org.eclipse.gef.requests.CreateConnectionRequest)protected final void setViewAdapter(IAdaptable viewAdapter)
viewAdapter - protected final IAdaptable getViewAdapter()
View.classGraphicalNodeEditPolicy.setViewAdapter(IAdaptable)protected Command getConnectionCreateCommand(CreateConnectionRequest request)
public Command getCommand(Request request)
protected Command getConnectionAndRelationshipCreateCommand(CreateConnectionViewAndElementRequest request)
request -
protected Command getConnectionAndRelationshipCompleteCommand(CreateConnectionViewAndElementRequest request)
request -
protected Command getUnspecifiedConnectionCompleteCommand(CreateUnspecifiedTypeConnectionRequest request)
request - the unspecified type request
protected ICommand getPromptAndCreateConnectionCommand(java.util.List content,
CreateConnectionRequest request)
content - The list of items making up the content of the popup menu.request - The relevant create connection request.
protected Command getConnectionCompleteCommand(java.lang.Object connectionType,
CreateConnectionRequest request)
connectionType - the connection type as specified in
GraphicalNodeEditPolicy.getConnectionMenuContent(CreateConnectionRequest)request - the request, identifying the source and target
GraphicalNodeEditPolicy.getPromptAndCreateConnectionCommand(List, CreateConnectionRequest)protected java.util.List getConnectionMenuContent(CreateConnectionRequest request)
CreateUnspecifiedTypeConnectionRequest using the types it
holds or the types retrieved from the Modeling Assistant Service.
If a subclass wishes to provide additional element types they should
consider providing these in a Modeling Assistant Provider. If a subclass
wishes to provide connector choices that are not elements types they may
provide them here, in this case, the label provider for
GraphicalNodeEditPolicy.PromptAndCreateConnectionCommand may need to customized.
protected Command getReversedUnspecifiedConnectionCompleteCommand(CreateUnspecifiedTypeConnectionRequest request)
request - the reversed unspecified type 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.