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

java.lang.Object
  extended byorg.tigris.gef.presentation.Fig
      extended byorg.tigris.gef.presentation.FigEdge
          extended byorg.tigris.gef.presentation.FigEdgePoly
              extended byorg.argouml.uml.diagram.ui.FigEdgeModelElement
                  extended byorg.argouml.uml.diagram.sequence.ui.FigMessage
All Implemented Interfaces:
ArgoEventListener, ArgoNotationEventListener, Cloneable, Connecter, DelayedVChangeListener, EventListener, org.tigris.gef.di.GraphEdge, org.tigris.gef.di.GraphicElement, Highlightable, KeyListener, MouseListener, NotationContext, PopupGenerator, PropertyChangeListener, Serializable, VetoableChangeListener
Direct Known Subclasses:
FigCallActionMessage, FigCreateActionMessage, FigDestroyActionMessage, FigReturnActionMessage

public abstract class FigMessage
extends FigEdgeModelElement

The fig for a link in a sequence diagram.

See Also:
Serialized Form

Field Summary
 
Fields inherited from class org.argouml.uml.diagram.ui.FigEdgeModelElement
notationProviderName
 
Fields inherited from class org.tigris.gef.presentation.FigEdgePoly
_initiallyLaidOut
 
Fields inherited from class org.tigris.gef.presentation.FigEdge
_arrowHeadEnd, _arrowHeadStart, _destFigNode, _highlight, _pathItems, _sourceFigNode, _useNearest
 
Fields inherited from class org.tigris.gef.presentation.Fig
_allowsSaving, _context, _dashes, _dashPeriod, _dashStyle, _filled, _h, _w, _x, _y, an, annotationOwner, annotationStatus, BORDER, MIN_SIZE, plotter
 
Constructor Summary
FigMessage()
          Constructor here for saving and loading purposes.
FigMessage(Object owner)
          Contructs a new figlink and sets the owner of the figlink.
 
Method Summary
 void computeRouteImpl()
          Computes the route of this FigMessage and computes the connectionpoints of the figlink to the ports.
 Object getAction()
          Returns the action attached to this link if any.
 FigClassifierRole getDestFigClassifierRole()
           
protected  Object getDestination()
          Returns the destination of the edge.
 MessageNode getDestMessageNode()
           
 Fig getDestPortFig()
           
 Object getMessage()
          Returns the message belonging to this link if there is one (otherwise null).
 Vector getPopUpActions(MouseEvent me)
          Build a collection of menu items relevant for a right-click popup menu on a message.
protected  Object getSource()
          Returns the source of the edge.
 FigClassifierRole getSourceFigClassifierRole()
           
 MessageNode getSourceMessageNode()
           
 Fig getSourcePortFig()
           
protected  void layoutEdge()
           
 Selection makeSelection()
          Returns a SelectionRerouteEdge object that manages selection and rerouting of the edge.
protected  boolean updateClassifiers()
          This won't work, so this implementation does nothing.
protected  void updateNameText()
          Call superclass to update text then recalculate group bounds
protected  void updateStereotypeText()
          Call superclass to update text then recalculate group bounds
 
Methods inherited from class org.argouml.uml.diagram.ui.FigEdgeModelElement
addElementListener, addElementListener, addElementListener, allowRemoveFromDiagram, canEdit, damage, delayedVetoableChange, deleteFromModel, getApplyStereotypeActions, getContextNotation, getDiElement, getEdgePort, getItalicLabelFont, getItemUID, getLabelFont, getName, getNameBounds, getNameFig, getPopupAddOffset, getRemoveDelegate, getSquaredDistance, getStereotypeFig, getTipString, hit, hitClarifier, indicateBounds, initNotationProviders, keyPressed, keyReleased, keyTyped, makeEdgePort, modelChanged, mouseClicked, mouseEntered, mouseExited, mousePressed, mouseReleased, notationAdded, notationChanged, notationProviderAdded, notationProviderRemoved, notationRemoved, paintClarifiers, postLoad, propertyChange, removeAllElementListeners, removeElementListener, removeFromDiagram, removeFromDiagramImpl, renderingChanged, setContextNotation, setDiElement, setItemUID, setLayer, setOwner, showHelp, superRemoveFromDiagram, textEdited, textEditStarted, updateListeners, vetoableChange
 
Methods inherited from class org.tigris.gef.presentation.FigEdgePoly
findAvoidPt, getPolygon, insertPoint, makeEdgeFig, moveVertex, paint, routingRectPoint, segOK, setEndPoints, setInitiallyLaidOut, setPoint, setPolygon, tryRoute
 
Methods inherited from class org.tigris.gef.presentation.FigEdge
addPathItem, calcBounds, cleanUp, computeRoute, contains, getBetweenNearestPoints, getBounds, getDashed, getDestArrowHead, getDestFigNode, getFig, getFirstPoint, getHighlight, getLastPoint, getLineColor, getLineWidth, getNumPoints, getPathItem, getPathItemFig, getPathItemFigs, getPathItemsRaw, getPerimeterLength, getPoint, getPoints, getPrivateData, getSourceArrowHead, getSourceFigNode, getXs, getYs, hasFillColor, hitFig, intersects, isReshapable, isResizable, isRotatable, paintArrowHeads, paintHighlightLine, paintPathItems, removePathItem, removePathItem, setBetweenNearestPoints, setDashed, setDestArrowHead, setDestFigNode, setDestPortFig, setFig, setHighlight, setLineColor, setLineWidth, setNumPoints, setPoint, setPoints, setSourceArrowHead, setSourceFigNode, setSourcePortFig, setXs, setYs, stuffPointAlongPerimeter, translateEdge, updatePathItemLocations
 
Methods inherited from class org.tigris.gef.presentation.Fig
addAnnotation, addPoint, addPropertyChangeListener, align, center, classNameAndBounds, clone, connectionPoint, contains, contains, countCornersContained, createDrag, endTrans, firePropChange, firePropChange, firePropChange, getAnnotationOwner, getAnnotationStrategy, getBounds, getCenter, getClosestPoint, getContext, getDashed01, getDashedString, getEnclosedFigs, getEnclosingFig, getFillColor, getFilled, getFilled01, getGravityPoints, getGroup, getHalfHeight, getHalfWidth, getHandleBox, getHeight, getId, getLayer, getLocation, getLocked, getMinimumSize, getOwner, getPreferredSize, getResource, getSingle, getSize, getTrapRect, getUseTrapRect, getVisState, getWidth, getX, getY, hasLineColor, initAnnotations, intersectsPerimeter, isAnnotation, isCopyable, isCutable, isLowerRightResizable, isMovable, isRemoveStarted, isSelectable, isSelected, isVisible, paint, pointAlongPerimeter, postSave, preSave, print, redraw, removeAnnotation, removePoint, removePropertyChangeListener, reorder, routingRect, savingAllowed, setAnnotationOwner, setAnnotationStatus, setAnnotationStrategy, setBounds, setBounds, setBoundsImpl, setCenter, setContext, setDashedString, setEnclosingFig, setFillColor, setFilled, setGroup, setHandleBox, setHeight, setLocation, setLocation, setLocked, setMovable, setPoint, setPoint, setPrivateData, setResizable, setResource, setSavingAllowed, setSize, setSize, setVisible, setWidth, setX, setY, stuffBounds, translate, translateAnnotations, translateImpl, unsetAnnotationOwner, updateAnnotationPositions, within
 
Methods inherited from class java.lang.Object
equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 
Methods inherited from interface org.argouml.cognitive.Highlightable
getHighlight, setHighlight
 
Methods inherited from interface org.tigris.gef.di.GraphicElement
getId, getOwner, routingRect
 

Constructor Detail

FigMessage

public FigMessage(Object owner)
Contructs a new figlink and sets the owner of the figlink.

Parameters:
owner - is the owner.

FigMessage

public FigMessage()
Constructor here for saving and loading purposes.

Method Detail

getPopUpActions

public Vector getPopUpActions(MouseEvent me)
Build a collection of menu items relevant for a right-click popup menu on a message.

Specified by:
getPopUpActions in interface PopupGenerator
Overrides:
getPopUpActions in class FigEdgeModelElement
Parameters:
me - a mouse event
Returns:
a collection of menu items
See Also:
PopupGenerator.getPopUpActions(java.awt.event.MouseEvent)

getAction

public Object getAction()
Returns the action attached to this link if any.

Returns:
the action attached to this link or null if there isn't any.

getSourcePortFig

public Fig getSourcePortFig()
See Also:
FigEdge.getSourcePortFig()

getDestPortFig

public Fig getDestPortFig()
See Also:
FigEdge.getDestPortFig()

computeRouteImpl

public void computeRouteImpl()
Computes the route of this FigMessage and computes the connectionpoints of the figlink to the ports. This depends on the action attached to the owner of the FigMessage. Also adds FigActivations etc or moves the FigClassifierRoles if necessary.

See Also:
FigEdge.computeRoute()

getSourceMessageNode

public MessageNode getSourceMessageNode()
Returns:
the node for the source port fig

getDestMessageNode

public MessageNode getDestMessageNode()
Returns:
the node for the destination port fig

getMessage

public Object getMessage()
Returns the message belonging to this link if there is one (otherwise null).

Returns:
the message.

layoutEdge

protected void layoutEdge()
See Also:
FigEdgePoly.layoutEdge()

getSource

protected Object getSource()
Description copied from class: FigEdgeModelElement
Returns the source of the edge. The source is the owner of the node the edge travels from in a binary relationship. For instance: for a classifierrole, this is the sender.

Overrides:
getSource in class FigEdgeModelElement
Returns:
a model element
See Also:
FigEdgeModelElement.getSource()

getDestination

protected Object getDestination()
Description copied from class: FigEdgeModelElement
Returns the destination of the edge. The destination is the owner of the node the edge travels to in a binary relationship. For instance: for a classifierrole, this is the receiver.

Overrides:
getDestination in class FigEdgeModelElement
Returns:
a model element
See Also:
FigEdgeModelElement.getDestination()

updateNameText

protected void updateNameText()
Call superclass to update text then recalculate group bounds

Overrides:
updateNameText in class FigEdgeModelElement
See Also:
FigEdgeModelElement.updateNameText()

updateStereotypeText

protected void updateStereotypeText()
Call superclass to update text then recalculate group bounds

Overrides:
updateStereotypeText in class FigEdgeModelElement
See Also:
FigEdgeModelElement.updateStereotypeText()

getSourceFigClassifierRole

public FigClassifierRole getSourceFigClassifierRole()
Returns:
the source figobject

getDestFigClassifierRole

public FigClassifierRole getDestFigClassifierRole()
Returns:
the destination fig object

updateClassifiers

protected boolean updateClassifiers()
This won't work, so this implementation does nothing.

Overrides:
updateClassifiers in class FigEdgeModelElement
Returns:
boolean whether or not the update was sucessful
See Also:
FigEdgeModelElement.updateClassifiers()

makeSelection

public Selection makeSelection()
Description copied from class: FigEdgeModelElement
Returns a SelectionRerouteEdge object that manages selection and rerouting of the edge.

Overrides:
makeSelection in class FigEdgeModelElement
Returns:
the SelectionRerouteEdge.
See Also:
Fig.makeSelection()


ArgoUML © 1996-2006ArgoUML HomepageArgoUML Developers' pageArgoUML Cookbook