|
GEF v2.0 | ||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||
java.lang.Object
|
+--org.eclipse.gef.editparts.AbstractEditPart
|
+--org.eclipse.gef.editparts.AbstractGraphicalEditPart
|
+--org.eclipse.gef.editparts.AbstractConnectionEditPart
Provides support for connections based EditParts.
| Inner classes inherited from class org.eclipse.gef.editparts.AbstractGraphicalEditPart |
AbstractGraphicalEditPart.AccessibleGraphicalEditPart, AbstractGraphicalEditPart.DefaultAccessibleAnchorProvider |
| Inner classes inherited from class org.eclipse.gef.editparts.AbstractEditPart |
AbstractEditPart.EditPolicyIterator |
| Fields inherited from class org.eclipse.gef.editparts.AbstractGraphicalEditPart |
figure, handles, sourceConnections, targetConnections |
| Fields inherited from class org.eclipse.gef.editparts.AbstractEditPart |
children, eventListeners, FLAG_ACTIVE, FLAG_FOCUS, FLAG_INITIALIZED, 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, HANDLE_LAYER, PRIMARY_LAYER |
| Constructor Summary | |
AbstractConnectionEditPart()
|
|
| Method Summary | |
void |
activateFigure()
Activates the Figure representing this, by setting up the start and end connections, and adding the figure to the Connection Layer. |
protected void |
createEditPolicies()
Creates
the initial EditPolicies and reserves slots for dynamic ones. |
protected IFigure |
createFigure()
Returns a newly created Figure to represent these type of EditParts. |
void |
deactivateFigure()
Deactivates the Figure representing this, by removing it from the connection layer, and resetting the source and target connections to null. |
void |
dispose()
Called when the EditPart will no longer be used. |
protected void |
doInitialize()
Initializes the entire state of the EditPart. |
Object |
getAdapter(Class adapter)
Returns the adapter of the given type, for example: IPropertySource. |
Connection |
getConnectionFigure()
Returns the Figure representing the connection. |
DragTracker |
getDragTracker(Request req)
Return a drag tracker for dragging this EditPart. |
EditPart |
getSource()
Returns the source EditPart |
protected ConnectionAnchor |
getSourceConnectionAnchor()
If the source is an instance of GraphicalNodeEditPart, it returns the anchor associated with it, else it returns null |
EditPart |
getTarget()
Returns the target EditPart |
protected ConnectionAnchor |
getTargetConnectionAnchor()
If the target is an instance of NodeEditPart, it returns the anchor associated with it, else it returns null |
void |
refresh()
Called to force a refresh of all properties displayed by this EditPart. |
protected void |
refreshSourceAnchor()
|
protected void |
refreshTargetAnchor()
|
void |
setParent(EditPart parent)
Sets the parent. |
void |
setSource(EditPart editPart)
Sets the source EditPart of this connection. |
void |
setTarget(EditPart editPart)
Sets the target EditPart of this connection. |
protected boolean |
shouldInitialize()
Updates this EditPart. |
| 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 |
getContentPane, getFigure, getSourceConnections, getTargetConnections, setLayoutConstraint |
| Methods inherited from interface org.eclipse.gef.EditPart |
activate, addEditPartListener, deactivate, eraseSourceFeedback, eraseTargetFeedback, getChildren, getCommand, getEditPolicy, getKeyHandler, getModel, getParent, getRoot, getSelected, getTargetEditPart, hasFocus, installEditPolicy, performRequest, removeEditPartListener, removeEditPolicy, setFocus, setModel, setSelected, showSourceFeedback, showTargetFeedback, understandsRequest |
| Constructor Detail |
public AbstractConnectionEditPart()
| Method Detail |
public void activateFigure()
AbstractGraphicalEditPart.deactivate()protected void createEditPolicies()
AbstractEditPart
Creates
the initial EditPolicies and reserves slots for dynamic ones.
Should be overridden to install the inital edit policies based on the
model's initial state.
null can be used to reserve a "slot", should there be
some desire to guarantee the ordering of EditPolcies.createEditPolicies in class AbstractEditPartorg.eclipse.gef.editparts.AbstractEditPartAbstractEditPart.doInitialize(),
AbstractEditPart.installEditPolicy(Object, EditPolicy)protected IFigure createFigure()
createFigure in class AbstractGraphicalEditPartpublic void deactivateFigure()
null.public void dispose()
EditPartEditPart.deactivate(), such as unregistering
itself from the Viewer.dispose in interface EditPartdispose in class AbstractGraphicalEditPartprotected void doInitialize()
AbstractEditPartdoInitialize in class AbstractEditPartpublic Object getAdapter(Class adapter)
AbstractEditPart
Returns the adapter of the given type, for example: IPropertySource.
If your model implements IPropertySource, or if it is IAdaptable then there
is no reason to override this method. Or, if you do not need propertysheet
support.
EditParts are the objects sent out as selection to other viewers. If you have
viewers that require additional adapter types, return them here.getAdapter in interface IAdaptablegetAdapter in class AbstractGraphicalEditPartorg.eclipse.gef.editparts.AbstractEditPartIAdaptablepublic Connection getConnectionFigure()
public DragTracker getDragTracker(Request req)
EditPartSelectionTool
makes such requests, but other Tools may also do so.getDragTracker in interface EditPartgetDragTracker in class AbstractGraphicalEditPartorg.eclipse.gef.editparts.AbstractGraphicalEditPartRequest - A Request describing the type of drag.public EditPart getSource()
getSource in interface ConnectionEditPartpublic EditPart getTarget()
getTarget in interface ConnectionEditPartprotected ConnectionAnchor getSourceConnectionAnchor()
nullprotected ConnectionAnchor getTargetConnectionAnchor()
nullpublic void refresh()
EditPartrefresh in interface EditPartrefresh in class AbstractGraphicalEditPartprotected void refreshSourceAnchor()
protected void refreshTargetAnchor()
public void setParent(EditPart parent)
EditPart
Sets the parent. This should only be called by the managing EditPart.setParent in interface EditPartsetParent in class AbstractEditPartpublic 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.protected boolean shouldInitialize()
AbstractGraphicalEditPartshouldInitialize in class AbstractGraphicalEditPart
|
GEF v2.0 | ||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||