Eclipse GEF
2.1

org.eclipse.gef
Interface NodeEditPart

All Superinterfaces:
EditPart, GraphicalEditPart, IAdaptable

public interface NodeEditPart
extends GraphicalEditPart

A specialized GraphicalEditPart that supports both target and source ConnectionEditParts. This optional interface is used by the default ConnectionEditPart implementation and supporting classes to obtain the correct ConnectionAnchors for the Connection Figure. This interface offers a single access point for obtaining ConnectionAnchors at different times. The classes which rely on this interface are:


Field Summary
 
Fields inherited from interface org.eclipse.gef.EditPart
SELECTED, SELECTED_NONE, SELECTED_PRIMARY
 
Method Summary
 ConnectionAnchor getSourceConnectionAnchor(ConnectionEditPart connection)
          Returns the ConnectionAnchor for the specified source connection.
 ConnectionAnchor getSourceConnectionAnchor(Request request)
          Returns the source ConnectionAnchor for the specified Request.
 ConnectionAnchor getTargetConnectionAnchor(ConnectionEditPart connection)
          Returns the ConnectionAnchor for the specified target connection.
 ConnectionAnchor getTargetConnectionAnchor(Request request)
          Returns the target ConnectionAnchor for the specified Request.
 
Methods inherited from interface org.eclipse.gef.GraphicalEditPart
addNodeListener, getContentPane, getFigure, getSourceConnections, getTargetConnections, removeNodeListener, setLayoutConstraint
 
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.core.runtime.IAdaptable
getAdapter
 

Method Detail

getSourceConnectionAnchor

public ConnectionAnchor getSourceConnectionAnchor(ConnectionEditPart connection)
Returns the ConnectionAnchor for the specified source connection. This NodeEditPart is the source EditPart 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

public ConnectionAnchor getTargetConnectionAnchor(ConnectionEditPart connection)
Returns the ConnectionAnchor for the specified target connection. This NodeEditPart is the target EditPart 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

public ConnectionAnchor getSourceConnectionAnchor(Request request)
Returns the source ConnectionAnchor for the specified Request. The returned ConnectionAnchor is used only when displaying feedback. The Request is usually a LocationRequest, which provides the current mouse location.

Parameters:
request - a Request describing the current interaction
Returns:
the ConnectionAnchor to use during feedback

getTargetConnectionAnchor

public ConnectionAnchor getTargetConnectionAnchor(Request request)
Returns the target ConnectionAnchor for the specified Request. The returned ConnectionAnchor is used only when displaying feedback. The Request is usually a LocationRequest, which provides the current mouse location.

Parameters:
request - a Request describing the current interaction
Returns:
the ConnectionAnchor to use during feedback

Eclipse GEF
2.1

Copyright (c) IBM Corp. and others 2000, 2003. All Rights Reserved.