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

java.lang.Object
  extended byorg.tigris.gef.base.ModeImpl
      extended byorg.tigris.gef.base.FigModifyingModeImpl
          extended byorg.tigris.gef.base.ModeCreate
              extended byorg.argouml.uml.diagram.sequence.ui.ModeCreateMessage
All Implemented Interfaces:
EventListener, FigModifyingMode, KeyListener, Mode, MouseListener, MouseMotionListener, Serializable

public class ModeCreateMessage
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
 
Fields inherited from class org.tigris.gef.base.ModeCreate
_defaultHeight, _defaultWidth, _newItem, anchorX, anchorY
 
Fields inherited from class org.tigris.gef.base.FigModifyingModeImpl
editor
 
Fields inherited from class org.tigris.gef.base.ModeImpl
_args
 
Constructor Summary
ModeCreateMessage()
          The constructor.
ModeCreateMessage(Editor par)
          The constructor.
 
Method Summary
 Fig createNewItem(MouseEvent me, int snapX, int snapY)
           
 String instructions()
           
 void mouseDragged(MouseEvent me)
           
 void mousePressed(MouseEvent me)
          On mousePressed determine what port the user is dragging from.
 void mouseReleased(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 org.tigris.gef.base.ModeCreate
createFig, creationDrag, getInitialCursor, keyTyped, paint
 
Methods inherited from class org.tigris.gef.base.FigModifyingModeImpl
done, getEditor, isFigEnclosedIn, paint, print, print, setCursor, setEditor
 
Methods inherited from class org.tigris.gef.base.ModeImpl
canExit, getArg, getArgs, init, keyPressed, keyReleased, leave, mouseClicked, mouseEntered, mouseExited, mouseMoved, setArg, setArgs, start
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 
Methods inherited from interface org.tigris.gef.base.Mode
canExit, getArg, getArgs, init, setArg, setArgs, start
 

Constructor Detail

ModeCreateMessage

public ModeCreateMessage()
The constructor.


ModeCreateMessage

public ModeCreateMessage(Editor par)
The constructor.

Parameters:
par - the editor
Method Detail

createNewItem

public Fig createNewItem(MouseEvent me,
                         int snapX,
                         int snapY)
See Also:
ModeCreate.createNewItem( java.awt.event.MouseEvent, int, int)

instructions

public String instructions()
See Also:
FigModifyingMode.instructions()

mousePressed

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

See Also:
MouseListener.mousePressed(java.awt.event.MouseEvent)

mouseReleased

public void mouseReleased(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.

See Also:
MouseListener.mouseReleased(java.awt.event.MouseEvent)

mouseDragged

public void mouseDragged(MouseEvent me)
See Also:
MouseMotionListener.mouseDragged(java.awt.event.MouseEvent)


ArgoUML © 1996-2006ArgoUML HomepageArgoUML Developers' pageArgoUML Cookbook