org.argouml.uml.diagram.sequence.ui
Class ModeCreateLink

java.lang.Object
  |
  +--ModeCreate
        |
        +--org.argouml.uml.diagram.sequence.ui.ModeCreateLink

public class ModeCreateLink
extends ModeCreate

Mode to create a link between two figobjects. This mode extends ModeCreate and not ModeCreateEdge because ModeCreateEdge hides its variables a bit too much...

See Also:
Serialized Form

Field Summary
private  java.lang.Object _newEdge
          The new NetEdge that is being created
private  FigNode _sourceFigNode
          The FigNode on the NetNode that owns the start port
private  java.lang.Object _startPort
          The NetPort where the arc is paintn from
private  Fig _startPortFig
          The Fig that presents the starting NetPort
 
Constructor Summary
ModeCreateLink()
           
ModeCreateLink(Editor par)
           
 
Method Summary
 Fig createNewItem(java.awt.event.MouseEvent me, int snapX, int snapY)
           
 java.lang.String instructions()
           
 void mouseDragged(java.awt.event.MouseEvent me)
           
 void mousePressed(java.awt.event.MouseEvent me)
          On mousePressed determine what port the user is dragging from.
 void mouseReleased(java.awt.event.MouseEvent me)
          On mouseReleased, find the port in the destination node that's on the same height as the source port fig, ask the GraphModel to connect the two ports.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

_startPort

private java.lang.Object _startPort
The NetPort where the arc is paintn from


_startPortFig

private Fig _startPortFig
The Fig that presents the starting NetPort


_sourceFigNode

private FigNode _sourceFigNode
The FigNode on the NetNode that owns the start port


_newEdge

private java.lang.Object _newEdge
The new NetEdge that is being created

Constructor Detail

ModeCreateLink

public ModeCreateLink()

ModeCreateLink

public ModeCreateLink(Editor par)
Method Detail

createNewItem

public Fig createNewItem(java.awt.event.MouseEvent me,
                         int snapX,
                         int snapY)

instructions

public java.lang.String instructions()

mousePressed

public void mousePressed(java.awt.event.MouseEvent me)
On mousePressed determine what port the user is dragging from. The mousePressed event is sent via ModeSelect.


mouseReleased

public void mouseReleased(java.awt.event.MouseEvent me)
On mouseReleased, find the port in the destination node that's on the same height as the source port fig, ask the GraphModel to connect the two ports. If that connection is allowed, then construct a new FigEdge and add it to the Layer and send it to the back.


mouseDragged

public void mouseDragged(java.awt.event.MouseEvent me)


ArgoUML © 1996-2004 (20040306)ArgoUML HomepageArgoUML Developers' pageArgoUML Cookbook