|
|||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectorg.tigris.gef.base.Selection
org.tigris.gef.base.SelectionReshape
org.argouml.uml.diagram.ui.SelectionEdgeClarifiers
org.argouml.uml.diagram.ui.SelectionRerouteEdge
A general class for rerouting edges, achieved by delegating the re-routing logic to the graphmodels; extends functionality in SelectionEdgeClarifiers.
If a gragphmodel does not override canChangeConnectedNode() then rerouting is not possible and argo should behave as if rerouting had never been implemented.
Field Summary | |
private boolean |
armed
the re-routing capability it armed if the mouse was previously dragged. |
private FigNodeModelElement |
destFig
used to determine if the association is now to self, in which case The association needs automatic layout. |
private int |
pointIndex
the index of the point on the line of the message. |
private FigNodeModelElement |
sourceFig
used to determine if the association is now to self, in which case The association needs automatic layout. |
Fields inherited from class org.tigris.gef.base.SelectionReshape |
_selectedHandle |
Fields inherited from class org.tigris.gef.base.Selection |
_content, BORDER_WIDTH, HAND_SIZE |
Constructor Summary | |
SelectionRerouteEdge(FigEdgeModelElement feme)
Creates a new instance of SelectionRerouteEdge |
Method Summary | |
void |
mouseDragged(java.awt.event.MouseEvent me)
need to 'arm' the rerouting capability with mouseDragged(). |
void |
mousePressed(java.awt.event.MouseEvent me)
set up for re-routing. |
void |
mouseReleased(java.awt.event.MouseEvent me)
perform re-routing if src/dest nodes have changed. |
Methods inherited from class org.argouml.uml.diagram.ui.SelectionEdgeClarifiers |
paint |
Methods inherited from class org.tigris.gef.base.SelectionReshape |
dragHandle, hitHandle, keyPressed, keyReleased, keyTyped, updateEdgeEnds |
Methods inherited from class org.tigris.gef.base.Selection |
contains, contains, contains, damage, delete, dispose, endTrans, getBounds, getContent, getContentBounds, getLocation, getLocked, hit, hitHandle, mouseClicked, mouseEntered, mouseExited, mouseMoved, print, reorder, setcontent, stuffBounds, translate |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
private FigNodeModelElement sourceFig
private FigNodeModelElement destFig
private boolean armed
the re-routing capability it armed if the mouse was previously dragged.
prevents just selecting the message then clicking somewhere else on the diagram,
private int pointIndex
the index of the point on the line of the message.
0 = sender end
1..* = receiver end
Constructor Detail |
public SelectionRerouteEdge(FigEdgeModelElement feme)
Method Detail |
public void mousePressed(java.awt.event.MouseEvent me)
public void mouseDragged(java.awt.event.MouseEvent me)
need to 'arm' the rerouting capability with mouseDragged().
don't arm if the edtior's current mode is a figedge create mode, because once a new edge has been created it is not deselected, therefore on the next create an unwanted reroute is performed.
public void mouseReleased(java.awt.event.MouseEvent me)
perform re-routing if src/dest nodes have changed.
this method needs to be 'armed' by a previous mouseDragged() to avoid the situation where the user just clicks on the message then clicks on some unrelated Fig, without moving the association...
TODO: improve the fig finding algorithm to find the top most fig in the layer. will be useful for nested states in a statechart.
|
|||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
ArgoUML © 1996-2004 (20040316) | ArgoUML Homepage | ArgoUML Developers' page | ArgoUML Cookbook |