org.argouml.uml.diagram.collaboration.ui
Class FigAssociationRole

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.ui.FigAssociation
                      extended byorg.argouml.uml.diagram.collaboration.ui.FigAssociationRole
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

public class FigAssociationRole
extends FigAssociation

This class represents the Fig of an AssociationRole for a collaboration diagram.

See Also:
Serialized Form

Field Summary
 
Fields inherited from class org.argouml.uml.diagram.ui.FigAssociation
notationProviderDestRole, notationProviderSrcRole
 
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
FigAssociationRole()
          Main Constructor
FigAssociationRole(Object edge, Layer lay)
          Constructor for FigAssociationRole.
 
Method Summary
 void addMessage(FigMessage message)
           
protected  void initNotationProviders(Object own)
          Create the NotationProviders.
protected  void textEditStarted(FigText ft)
          This method is called when the user doubleclicked on the text field, and starts editing.
 void updateListeners(Object oldOwner, Object newOwner)
          Implementations of this method should register/unregister the fig for all (model)events.
 
Methods inherited from class org.argouml.uml.diagram.ui.FigAssociation
getMiddleGroup, getPopUpActions, layoutEdge, modelChanged, paint, paintClarifiers, propertyChange, renderingChanged, textEdited, updateAbstract
 
Methods inherited from class org.argouml.uml.diagram.ui.FigEdgeModelElement
addElementListener, addElementListener, addElementListener, allowRemoveFromDiagram, canEdit, damage, delayedVetoableChange, deleteFromModel, getApplyStereotypeActions, getContextNotation, getDestination, getDiElement, getEdgePort, getItalicLabelFont, getItemUID, getLabelFont, getName, getNameBounds, getNameFig, getPopupAddOffset, getRemoveDelegate, getSource, getSquaredDistance, getStereotypeFig, getTipString, hit, hitClarifier, indicateBounds, keyPressed, keyReleased, keyTyped, makeEdgePort, makeSelection, mouseClicked, mouseEntered, mouseExited, mousePressed, mouseReleased, notationAdded, notationChanged, notationProviderAdded, notationProviderRemoved, notationRemoved, postLoad, removeAllElementListeners, removeElementListener, removeFromDiagram, removeFromDiagramImpl, setContextNotation, setDiElement, setItemUID, setLayer, setOwner, showHelp, superRemoveFromDiagram, updateClassifiers, updateNameText, updateStereotypeText, vetoableChange
 
Methods inherited from class org.tigris.gef.presentation.FigEdgePoly
computeRouteImpl, 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, getDestPortFig, getFig, getFirstPoint, getHighlight, getLastPoint, getLineColor, getLineWidth, getNumPoints, getPathItem, getPathItemFig, getPathItemFigs, getPathItemsRaw, getPerimeterLength, getPoint, getPoints, getPrivateData, getSourceArrowHead, getSourceFigNode, getSourcePortFig, 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, 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

FigAssociationRole

public FigAssociationRole()
Main Constructor


FigAssociationRole

public FigAssociationRole(Object edge,
                          Layer lay)
Constructor for FigAssociationRole.

Parameters:
edge - the owning UML element
lay - the layer
Method Detail

initNotationProviders

protected void initNotationProviders(Object own)
Create the NotationProviders.

Overrides:
initNotationProviders in class FigAssociation
Parameters:
own - the current owner
See Also:
FigNodeModelElement.initNotationProviders(java.lang.Object)

updateListeners

public void updateListeners(Object oldOwner,
                            Object newOwner)
Description copied from class: FigEdgeModelElement
Implementations of this method should register/unregister the fig for all (model)events. For FigEdgeModelElement only the fig itself is registered as listening to events fired by the owner itself. But for, for example, FigAssociation the fig must also register for events fired by the stereotypes of the owner.

This function is used in UMLDiagram, which removes all listeners to all Figs when a diagram is not displayed, and restore them when it becomes visible again.

In this case, it is not imperative that indeed ALL listeners are updated, as long as the ones removed get added again and vice versa.

Additionally, this function may be used by the modelChanged() function.

In this case, it IS imperative that all listeners get removed / added.

Overrides:
updateListeners in class FigAssociation
See Also:
org.argouml.uml.diagram.ui.FigAssociation#updateListeners( java.lang.Object)

addMessage

public void addMessage(FigMessage message)
Parameters:
message - the message to be added

textEditStarted

protected void textEditStarted(FigText ft)
Description copied from class: FigEdgeModelElement
This method is called when the user doubleclicked on the text field, and starts editing. Subclasses should overrule this field to e.g. supply help to the user about the used format.

It is also possible to alter the text to be edited already here, e.g. by adding the stereotype in front of the name, but that seems not user-friendly.

Overrides:
textEditStarted in class FigAssociation
See Also:
FigEdgeModelElement.textEditStarted(org.tigris.gef.presentation.FigText)


ArgoUML © 1996-2006ArgoUML HomepageArgoUML Developers' pageArgoUML Cookbook