|
Modelers | |||||||||
| 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
org.topcased.modeler.edit.GraphEdgeEditPart
public class GraphEdgeEditPart
This edit part offers basic methods for edge elements.
Edge elements can optionnaly have some edge objects.
Creation : 30 nov. 2004
| Nested Class Summary | |
|---|---|
protected class |
GraphEdgeEditPart.GraphEdgeEditPartListener
Listener that filters GraphEdge events and handles it : update graphics, connections... |
| Nested classes/interfaces inherited from class org.eclipse.gef.editparts.AbstractConnectionEditPart |
|---|
org.eclipse.gef.editparts.AbstractConnectionEditPart.DefaultAccessibleAnchorProvider |
| Nested classes/interfaces inherited from class org.eclipse.gef.editparts.AbstractGraphicalEditPart |
|---|
org.eclipse.gef.editparts.AbstractGraphicalEditPart.AccessibleGraphicalEditPart |
| Nested classes/interfaces inherited from class org.eclipse.gef.editparts.AbstractEditPart |
|---|
org.eclipse.gef.editparts.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 | |
|---|---|
GraphEdgeEditPart(GraphEdge conn)
Constructor |
|
| Method Summary | |
|---|---|
void |
activate()
|
void |
addNotify()
|
protected void |
createEditPolicies()
|
protected org.eclipse.draw2d.IFigure |
createFigure()
|
protected org.eclipse.gef.SnapToHelper |
createSnapToHelper()
|
void |
deactivate()
|
java.lang.Object |
getAdapter(java.lang.Class key)
|
protected org.eclipse.swt.graphics.Color |
getDefaultBackgroundColor()
Deprecated. should not be used anymore |
protected org.eclipse.swt.graphics.Font |
getDefaultFont()
Return the default font of this type of element |
protected org.eclipse.swt.graphics.Color |
getDefaultForegroundColor()
Return the default foreground color of this type of element |
protected org.eclipse.draw2d.ConnectionRouter |
getDefaultRouter(org.eclipse.gmf.runtime.draw2d.ui.internal.figures.ConnectionLayerEx cLayer)
Returns the default router for this edge. |
protected DiagramElementListener |
getDiagramElementListener()
Returns the listener used to listen the graphical model object |
org.eclipse.gef.DragTracker |
getDragTracker(org.eclipse.gef.Request req)
|
IEdgeObjectFigure |
getEdgeObjectFigure(EdgeObject edgeObject)
Get the edge object figure for the given edge object. Subclass must implements this method to return the appropriate edge object figure. |
EList |
getEdgeObjects()
Get the list of edge objects. |
protected GraphEdge |
getGraphEdge()
Return the GraphEdge |
protected int |
getLineStyle()
Return the line style of the edge |
protected int |
getLineWidth()
Return the line width of the edge |
protected Adapter |
getModelListener()
Returns the generic model listener |
protected java.util.List |
getModelSourceConnections()
|
protected java.util.List |
getModelTargetConnections()
|
protected org.eclipse.draw2d.ConnectionRouter |
getRouter(org.eclipse.gmf.runtime.draw2d.ui.internal.figures.ConnectionLayerEx cLayer)
Returns the router for this edge. |
org.eclipse.draw2d.ConnectionAnchor |
getSourceConnectionAnchor(org.eclipse.gef.ConnectionEditPart connection)
|
org.eclipse.draw2d.ConnectionAnchor |
getSourceConnectionAnchor(org.eclipse.gef.Request request)
|
org.eclipse.draw2d.ConnectionAnchor |
getTargetConnectionAnchor(org.eclipse.gef.ConnectionEditPart connection)
|
org.eclipse.draw2d.ConnectionAnchor |
getTargetConnectionAnchor(org.eclipse.gef.Request request)
|
protected void |
handleModelChanged(Notification msg)
Refresh datas due to a property that has changed |
protected void |
handlePropertyChanged(Notification msg)
Deprecated. use handleModelChanged instead |
protected void |
listenToConnectors()
Refresh the listening of connectors |
void |
refresh()
Invoke the editpart's refresh mechanism. |
protected void |
refreshBendpoints()
refresh the bendpoints owned by the EditPart's Edge |
protected void |
refreshColors()
Refresh the background and the foreground Colors of the GraphNode |
protected void |
refreshEdgeObjects()
Refresh the objects associated to this connection |
protected void |
refreshRouter()
installes a router on the edit part, depending on the Routing Property |
protected void |
refreshTextAndFont()
Refresh the text to display at the top and the current Font of the GraphNode |
protected void |
refreshVisible()
Refresh the visbility state of the current object |
protected void |
refreshVisuals()
Refresh the visuals |
protected void |
updateEdgeObject(EdgeObject edgeObject)
A location property of an edge object has changed. |
protected void |
updateModelListening(java.lang.Object oldValue,
java.lang.Object newValue)
This method updates the listening on added or removed objects |
| Methods inherited from class org.eclipse.gef.editparts.AbstractConnectionEditPart |
|---|
activateFigure, deactivateFigure, getConnectionFigure, getSource, getSourceConnectionAnchor, getTarget, getTargetConnectionAnchor, refreshSourceAnchor, refreshTargetAnchor, removeNotify, setParent, setSource, setTarget |
| Methods inherited from class org.eclipse.gef.editparts.AbstractGraphicalEditPart |
|---|
addChildVisual, addNodeListener, addSourceConnection, addTargetConnection, createConnection, createOrFindConnection, fireRemovingSourceConnection, fireRemovingTargetConnection, fireSourceConnectionAdded, fireTargetConnectionAdded, getContentPane, getFigure, getLayer, getSourceConnections, getTargetConnections, primAddSourceConnection, primAddTargetConnection, primRemoveSourceConnection, primRemoveTargetConnection, refreshSourceConnections, refreshTargetConnections, registerVisuals, removeChildVisual, removeNodeListener, removeSourceConnection, removeTargetConnection, reorderChild, reorderSourceConnection, reorderTargetConnection, setFigure, setLayoutConstraint, unregisterVisuals |
| Methods inherited from class org.eclipse.gef.editparts.AbstractEditPart |
|---|
activateEditPolicies, addChild, addEditPartListener, createChild, deactivateEditPolicies, debug, debugFeedback, eraseSourceFeedback, eraseTargetFeedback, fireActivated, fireChildAdded, fireDeactivated, fireRemovingChild, fireSelectionChanged, getAccessibleEditPart, getChildren, getCommand, getEditPolicy, getEditPolicyIterator, getEventListeners, getFlag, getModel, getModelChildren, getParent, getRoot, getSelected, getTargetEditPart, getViewer, hasFocus, installEditPolicy, isActive, isSelectable, performRequest, refreshChildren, register, registerAccessibility, registerModel, removeChild, removeEditPartListener, removeEditPolicy, setFlag, setFocus, setModel, setSelected, showSourceFeedback, showTargetFeedback, toString, understandsRequest, unregister, unregisterAccessibility, unregisterModel |
| 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 |
|---|
addEditPartListener, eraseSourceFeedback, eraseTargetFeedback, getChildren, getCommand, getEditPolicy, getModel, getParent, getRoot, getSelected, getTargetEditPart, getViewer, hasFocus, installEditPolicy, isActive, isSelectable, performRequest, removeEditPartListener, removeEditPolicy, removeNotify, setFocus, setModel, setParent, setSelected, showSourceFeedback, showTargetFeedback, understandsRequest |
| Constructor Detail |
|---|
public GraphEdgeEditPart(GraphEdge conn)
conn - the model object| Method Detail |
|---|
public java.lang.Object getAdapter(java.lang.Class key)
getAdapter in interface org.eclipse.core.runtime.IAdaptablegetAdapter in class org.eclipse.gef.editparts.AbstractConnectionEditPartAbstractGraphicalEditPart.getAdapter(java.lang.Class)protected org.eclipse.gef.SnapToHelper createSnapToHelper()
protected Adapter getModelListener()
protected DiagramElementListener getDiagramElementListener()
public void activate()
activate in interface org.eclipse.gef.EditPartactivate in class org.eclipse.gef.editparts.AbstractGraphicalEditPartEditPart.activate()public void deactivate()
deactivate in interface org.eclipse.gef.EditPartdeactivate in class org.eclipse.gef.editparts.AbstractGraphicalEditPartEditPart.deactivate()public org.eclipse.gef.DragTracker getDragTracker(org.eclipse.gef.Request req)
getDragTracker in interface org.eclipse.gef.EditPartgetDragTracker in class org.eclipse.gef.editparts.AbstractConnectionEditPartEditPart.getDragTracker(org.eclipse.gef.Request)protected void createEditPolicies()
createEditPolicies in class org.eclipse.gef.editparts.AbstractEditPartAbstractEditPart.createEditPolicies()protected org.eclipse.draw2d.IFigure createFigure()
createFigure in class org.eclipse.gef.editparts.AbstractConnectionEditPartAbstractGraphicalEditPart.createFigure()public void addNotify()
addNotify in interface org.eclipse.gef.EditPartaddNotify in class org.eclipse.gef.editparts.AbstractConnectionEditPartEditPart.addNotify()protected void refreshRouter()
Routing Property
protected org.eclipse.draw2d.ConnectionRouter getRouter(org.eclipse.gmf.runtime.draw2d.ui.internal.figures.ConnectionLayerEx cLayer)
cLayer - the connection layer
protected org.eclipse.draw2d.ConnectionRouter getDefaultRouter(org.eclipse.gmf.runtime.draw2d.ui.internal.figures.ConnectionLayerEx cLayer)
cLayer - the connection layer
protected GraphEdge getGraphEdge()
protected void handleModelChanged(Notification msg)
msg - the Notification messageprotected void handlePropertyChanged(Notification msg)
public void refresh()
refresh in interface org.eclipse.gef.EditPartrefresh in class org.eclipse.gef.editparts.AbstractConnectionEditPartprotected void refreshVisuals()
refreshVisuals in class org.eclipse.gef.editparts.AbstractEditPartAbstractEditPart.refreshVisuals()protected void refreshVisible()
protected void refreshEdgeObjects()
protected void refreshColors()
protected void refreshTextAndFont()
protected void refreshBendpoints()
Edge
protected org.eclipse.swt.graphics.Color getDefaultForegroundColor()
protected org.eclipse.swt.graphics.Color getDefaultBackgroundColor()
protected org.eclipse.swt.graphics.Font getDefaultFont()
protected int getLineWidth()
protected int getLineStyle()
public EList getEdgeObjects()
public IEdgeObjectFigure getEdgeObjectFigure(EdgeObject edgeObject)
null.
edgeObject - an edge object
protected void updateEdgeObject(EdgeObject edgeObject)
IEdgeObjectFigure location.
edgeObject - an updated edge objectprotected void listenToConnectors()
protected java.util.List getModelSourceConnections()
getModelSourceConnections in class org.eclipse.gef.editparts.AbstractGraphicalEditPartAbstractGraphicalEditPart.getModelSourceConnections()protected java.util.List getModelTargetConnections()
getModelTargetConnections in class org.eclipse.gef.editparts.AbstractGraphicalEditPartAbstractGraphicalEditPart.getModelTargetConnections()public org.eclipse.draw2d.ConnectionAnchor getSourceConnectionAnchor(org.eclipse.gef.ConnectionEditPart connection)
getSourceConnectionAnchor in interface org.eclipse.gef.NodeEditPartNodeEditPart.getSourceConnectionAnchor(org.eclipse.gef.ConnectionEditPart)public org.eclipse.draw2d.ConnectionAnchor getSourceConnectionAnchor(org.eclipse.gef.Request request)
getSourceConnectionAnchor in interface org.eclipse.gef.NodeEditPartNodeEditPart.getSourceConnectionAnchor(org.eclipse.gef.Request)public org.eclipse.draw2d.ConnectionAnchor getTargetConnectionAnchor(org.eclipse.gef.ConnectionEditPart connection)
getTargetConnectionAnchor in interface org.eclipse.gef.NodeEditPartNodeEditPart.getTargetConnectionAnchor(org.eclipse.gef.ConnectionEditPart)public org.eclipse.draw2d.ConnectionAnchor getTargetConnectionAnchor(org.eclipse.gef.Request request)
getTargetConnectionAnchor in interface org.eclipse.gef.NodeEditPartNodeEditPart.getTargetConnectionAnchor(org.eclipse.gef.Request)
protected void updateModelListening(java.lang.Object oldValue,
java.lang.Object newValue)
oldValue - the old ObjectnewValue - the new Object
|
Modelers | |||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
Copyright (c) 2005 TOPCASED Contributors 2005 - 2007. All rights reserved.