Package org.eclipse.gef
Interface NodeEditPart
-
- All Superinterfaces:
EditPart,GraphicalEditPart,IAdaptable
public interface NodeEditPart extends GraphicalEditPart
A specializedGraphicalEditPartthat supports both target and sourceConnectionEditParts. This optional interface is used by the defaultConnectionEditPartimplementation and supporting classes to obtain the correctConnectionAnchorsfor theConnectionFigure. This interface offers a single access point for obtaining ConnectionAnchors at different times. The classes which rely on this interface are:AbstractConnectionEditPart- during refresh(), this interface is used to obtain the appropriate ConnectionAnchors for the figure.GraphicalNodeEditPolicy- during creation of a new connection, there is no ConnectionEditPart. Therefore, the source node EditPart is responsible for display feedback.ConnectionEndpointEditPolicy- when disconnecting the end of a connection and reattaching it to a new node, ConnectionEndpointEditPolicy uses this interface to obtain the proper anchors for diaplaying feedback.
-
-
Field Summary
-
Fields inherited from interface org.eclipse.gef.EditPart
SELECTED, SELECTED_NONE, SELECTED_PRIMARY
-
-
Method Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method Description org.eclipse.draw2d.ConnectionAnchorgetSourceConnectionAnchor(ConnectionEditPart connection)Returns theConnectionAnchorfor the specified source connection.org.eclipse.draw2d.ConnectionAnchorgetSourceConnectionAnchor(Request request)Returns the sourceConnectionAnchorfor the specified Request.org.eclipse.draw2d.ConnectionAnchorgetTargetConnectionAnchor(ConnectionEditPart connection)Returns theConnectionAnchorfor the specified target connection.org.eclipse.draw2d.ConnectionAnchorgetTargetConnectionAnchor(Request request)Returns the targetConnectionAnchorfor the specified Request.-
Methods inherited from interface org.eclipse.gef.EditPart
activate, addEditPartListener, addNotify, deactivate, eraseSourceFeedback, eraseTargetFeedback, getChildren, getCommand, getDragTracker, getEditPolicy, getModel, getParent, getRoot, getSelected, getTargetEditPart, getViewer, hasFocus, installEditPolicy, isActive, isSelectable, performRequest, refresh, removeEditPartListener, removeEditPolicy, removeNotify, setFocus, setModel, setParent, setSelected, showSourceFeedback, showTargetFeedback, understandsRequest
-
Methods inherited from interface org.eclipse.gef.GraphicalEditPart
addNodeListener, getContentPane, getFigure, getSourceConnections, getTargetConnections, removeNodeListener, setLayoutConstraint
-
Methods inherited from interface org.eclipse.core.runtime.IAdaptable
getAdapter
-
-
-
-
Method Detail
-
getSourceConnectionAnchor
org.eclipse.draw2d.ConnectionAnchor getSourceConnectionAnchor(ConnectionEditPart connection)
Returns theConnectionAnchorfor the specified source connection. This NodeEditPart is thesourceEditPart for the given connection.The anchor may be a function of the connection's model, the node's model, a combination of both, or it may not depend on anything all.
- Parameters:
connection- the ConnectionEditPart- Returns:
- the ConnectionAnchor for the given ConnectionEditPart
-
getTargetConnectionAnchor
org.eclipse.draw2d.ConnectionAnchor getTargetConnectionAnchor(ConnectionEditPart connection)
Returns theConnectionAnchorfor the specified target connection. This NodeEditPart is thetargetEditPart for the given connection.The anchor may be a function of the connection's model, the node's model, a combination of both, or it may not depend on anything all.
- Parameters:
connection- the ConnectionEditPart- Returns:
- the ConnectionAnchor for the given ConnectionEditPart
-
getSourceConnectionAnchor
org.eclipse.draw2d.ConnectionAnchor getSourceConnectionAnchor(Request request)
Returns the sourceConnectionAnchorfor the specified Request. The returned ConnectionAnchor is used only when displaying feedback. The Request is usually aLocationRequest, which provides the current mouse location.- Parameters:
request- a Request describing the current interaction- Returns:
- the ConnectionAnchor to use during feedback
-
getTargetConnectionAnchor
org.eclipse.draw2d.ConnectionAnchor getTargetConnectionAnchor(Request request)
Returns the targetConnectionAnchorfor the specified Request. The returned ConnectionAnchor is used only when displaying feedback. The Request is usually aLocationRequest, which provides the current mouse location.- Parameters:
request- a Request describing the current interaction- Returns:
- the ConnectionAnchor to use during feedback
-
-