|
GEF (MVC) 3.9.0.201308190730 |
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectorg.eclipse.gef.editparts.AbstractEditPart
org.eclipse.gef.editparts.AbstractGraphicalEditPart
org.eclipse.gef.editparts.AbstractConnectionEditPart
public abstract class AbstractConnectionEditPart
The base implementation for ConnectionEditPart.
| Nested Class Summary | |
|---|---|
protected class |
AbstractConnectionEditPart.DefaultAccessibleAnchorProvider
Provides accessibility support for when connections are also themselves nodes. |
| Nested classes/interfaces inherited from class org.eclipse.gef.editparts.AbstractGraphicalEditPart |
|---|
AbstractGraphicalEditPart.AccessibleGraphicalEditPart |
| Nested classes/interfaces inherited from class org.eclipse.gef.editparts.AbstractEditPart |
|---|
AbstractEditPart.EditPolicyIterator |
| Field Summary |
|---|
| Fields inherited from class org.eclipse.gef.editparts.AbstractGraphicalEditPart |
|---|
figure, sourceConnections, targetConnections |
| Fields inherited from class org.eclipse.gef.editparts.AbstractEditPart |
|---|
children, FLAG_ACTIVE, FLAG_FOCUS, MAX_FLAG |
| Fields inherited from interface org.eclipse.gef.EditPart |
|---|
SELECTED, SELECTED_NONE, SELECTED_PRIMARY |
| Fields inherited from interface org.eclipse.gef.LayerConstants |
|---|
CONNECTION_LAYER, FEEDBACK_LAYER, GRID_LAYER, GUIDE_LAYER, HANDLE_LAYER, PRIMARY_LAYER, PRINTABLE_LAYERS, SCALABLE_LAYERS, SCALED_FEEDBACK_LAYER |
| 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 | |
|---|---|
AbstractConnectionEditPart()
|
|
| Method Summary | |
|---|---|
protected void |
activateFigure()
Activates the Figure representing this, by setting up the start and end connections, and adding the figure to the Connection Layer. |
void |
addNotify()
Called after the EditPart has been added to its parent. |
protected IFigure |
createFigure()
Returns a newly created Figure to represent these type of EditParts. |
protected void |
deactivateFigure()
Deactivates the Figure representing this, by removing it from the connection layer, and resetting the source and target connections to null. |
java.lang.Object |
getAdapter(java.lang.Class adapter)
AbstractConnectionEditPart extends getAdapter() to overrides
the AbstractConnectionEditPart.DefaultAccessibleAnchorProvider adapter returned by the superclass. |
Connection |
getConnectionFigure()
Convenience method for casting this GraphicalEditPart's Figure to a Connection |
DragTracker |
getDragTracker(Request req)
Overridden to return a default DragTracker for
GraphicalEditParts. |
EditPart |
getSource()
|
protected ConnectionAnchor |
getSourceConnectionAnchor()
Returns the ConnectionAnchor for the source end of
the connection. |
EditPart |
getTarget()
|
protected ConnectionAnchor |
getTargetConnectionAnchor()
Returns the ConnectionAnchor for the target end of
the connection. |
void |
refresh()
Extended here to also refresh the ConnectionAnchors. |
protected void |
refreshSourceAnchor()
Updates the source ConnectionAnchor. |
protected void |
refreshTargetAnchor()
Updates the target ConnectionAnchor. |
void |
removeNotify()
Extended here to remove the ConnectionEditPart's connection figure from the connection layer. |
void |
setParent(EditPart parent)
Extended to implement automatic addNotify and removeNotify handling. |
void |
setSource(EditPart editPart)
Sets the source EditPart of this connection. |
void |
setTarget(EditPart editPart)
Sets the target EditPart of this connection. |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
| 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, deactivate, eraseSourceFeedback, eraseTargetFeedback, getChildren, getCommand, getEditPolicy, getModel, getParent, getRoot, getSelected, getTargetEditPart, getViewer, hasFocus, installEditPolicy, isActive, isSelectable, performRequest, removeEditPartListener, removeEditPolicy, setFocus, setModel, setSelected, showSourceFeedback, showTargetFeedback, understandsRequest |
| Constructor Detail |
|---|
public AbstractConnectionEditPart()
| Method Detail |
|---|
protected void activateFigure()
AbstractGraphicalEditPart.deactivate()public void addNotify()
EditPart
addNotify in interface EditPartaddNotify in class AbstractGraphicalEditPartEditPart.addNotify()protected IFigure createFigure()
createFigure in class AbstractGraphicalEditPartprotected void deactivateFigure()
null.
public java.lang.Object getAdapter(java.lang.Class adapter)
AbstractConnectionEditPart extends getAdapter() to overrides
the AbstractConnectionEditPart.DefaultAccessibleAnchorProvider adapter returned by the superclass.
When treating a connection as a node for other connections, it makes
sense to target its midpoint, and not the edge of its bounds.
getAdapter in interface IAdaptablegetAdapter in class AbstractGraphicalEditPartadapter - the adapter Class
AbstractConnectionEditPart.DefaultAccessibleAnchorProvider,
AbstractGraphicalEditPart.getAdapter(Class)public Connection getConnectionFigure()
Connection
public DragTracker getDragTracker(Request req)
AbstractGraphicalEditPartDragTracker for
GraphicalEditParts.
getDragTracker in interface EditPartgetDragTracker in class AbstractGraphicalEditPartreq - a Request indicating the context of the drag
null or a DragTrackerEditPart.getDragTracker(Request)public EditPart getSource()
getSource in interface ConnectionEditPartConnectionEditPart.getSource()public EditPart getTarget()
getTarget in interface ConnectionEditPartConnectionEditPart.getTarget()protected ConnectionAnchor getSourceConnectionAnchor()
ConnectionAnchor for the source end of
the connection. If the source is an instance of NodeEditPart,
that interface will be used to determine the proper ConnectionAnchor. If
the source is not an instance of NodeEditPart, this method
should be overridden to return the correct ConnectionAnchor. Failure to
do this will cause a default anchor to be used so that the connection
figure will be made visible to the developer.
protected ConnectionAnchor getTargetConnectionAnchor()
ConnectionAnchor for the target end of
the connection. If the target is an instance of NodeEditPart,
that interface will be used to determine the proper ConnectionAnchor. If
the target is not an instance of NodeEditPart, this method
should be overridden to return the correct ConnectionAnchor. Failure to
do this will cause a default anchor to be used so that the connection
figure will be made visible to the developer.
public void refresh()
refresh in interface EditPartrefresh in class AbstractGraphicalEditPartEditPart.refresh()protected void refreshSourceAnchor()
getSourceConnectionAnchor() if necessary, and not this method.
protected void refreshTargetAnchor()
getTargetConnectionAnchor() if necessary, and not this method.
public void removeNotify()
removeNotify in interface EditPartremoveNotify in class AbstractGraphicalEditPartEditPart.removeNotify()public void setParent(EditPart parent)
setParent in interface EditPartsetParent in class AbstractEditPartparent - the parent EditPartEditPart.setParent(EditPart)public void setSource(EditPart editPart)
setSource in interface ConnectionEditParteditPart - EditPart which is the source.public void setTarget(EditPart editPart)
setTarget in interface ConnectionEditParteditPart - EditPart which is the target.
|
GEF (MVC) 3.9.0.201308190730 |
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||