org.argouml.uml.diagram.ui
Class FigAssociation

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
All Implemented Interfaces:
ArgoEventListener, ArgoNotationEventListener, Cloneable, org.tigris.gef.presentation.Connecter, DelayedVChangeListener, EventListener, org.tigris.gef.ui.Highlightable, KeyListener, MouseListener, NotationContext, org.tigris.gef.ui.PopupGenerator, PropertyChangeListener, Serializable, VetoableChangeListener
Direct Known Subclasses:
FigAssociationClass, FigAssociationRole

public class FigAssociation
extends FigEdgeModelElement

This class represents an association Fig on a diagram.

See Also:
Serialized Form

Nested Class Summary
 
Nested classes inherited from class org.tigris.gef.presentation.FigEdge
 
Field Summary
private  org.tigris.gef.presentation.ArrowHead destArrowHead
           
private  FigTextGroup destGroup
          Group for the FigTexts concerning the dest association end.
private  org.tigris.gef.presentation.FigText destMult
           
private  org.tigris.gef.presentation.FigText destOrdering
           
private  org.tigris.gef.presentation.FigText destRole
           
private  FigTextGroup middleGroup
          Group for the FigTexts concerning the name and stereotype of the association itself.
private static org.tigris.gef.presentation.ArrowHead NAV_AGGREGATE
           
private static org.tigris.gef.presentation.ArrowHead NAV_COMP
           
(package private) static long serialVersionUID
           
private  org.tigris.gef.presentation.ArrowHead sourceArrowHead
           
private  FigTextGroup srcGroup
          Group for the FigTexts concerning the source association end.
private  org.tigris.gef.presentation.FigText srcMult
           
private  org.tigris.gef.presentation.FigText srcOrdering
           
private  org.tigris.gef.presentation.FigText srcRole
           
private static boolean SUPPRESS_BIDIRECTIONAL_ARROWS
           
 
Fields inherited from class org.argouml.uml.diagram.ui.FigEdgeModelElement
BUNDLE, POPUP_ADD_OFFSET
 
Fields inherited from class org.tigris.gef.presentation.FigEdgePoly
_initiallyLaidOut
 
Fields inherited from class org.tigris.gef.presentation.FigEdge
_arrowHeadEnd, _arrowHeadStart, _destFigNode, _fig, _highlight, _pathItems, _sourceFigNode, _useNearest
 
Fields inherited from class org.tigris.gef.presentation.Fig
_allowsSaving, _context, _dashes, _dashPeriod, _dashStyle, _displayed, _fillColor, _filled, _group, _h, _layer, _lineColor, _lineWidth, _locked, _resource, _selected, _shown, _w, _x, _y, an, annotationOwner, annotationStatus, BORDER, MIN_SIZE
 
Constructor Summary
FigAssociation()
          Main constructor Don't call this constructor directly.
FigAssociation(Object edge, org.tigris.gef.base.Layer lay)
          Constructor that hooks the Fig to an existing UML element.
 
Method Summary
private  org.tigris.gef.presentation.ArrowHead chooseArrowHead(Object ak, boolean nav)
           
protected  FigTextGroup getMiddleGroup()
           
private  String getOrderingName(Object orderingKind)
          Returns the name of the OrderingKind.
 Vector getPopUpActions(MouseEvent me)
           
protected  void modelChanged(PropertyChangeEvent e)
          This is called after any part of the UML MModelElement has changed.
 void paint(Graphics g)
           
 void setOwner(Object association)
           
protected  void textEdited(org.tigris.gef.presentation.FigText ft)
          This method is called after the user finishes editing a text field that is in the FigEdgeModelElement.
protected  void updateAbstract()
          Updates the name if modelchanged receives an "isAbstract" event.
private  void updateEnd(org.tigris.gef.presentation.FigText multiToUpdate, org.tigris.gef.presentation.FigText roleToUpdate, org.tigris.gef.presentation.FigText orderingToUpdate, Object end)
           
 
Methods inherited from class org.argouml.uml.diagram.ui.FigEdgeModelElement
allowRemoveFromDiagram, canEdit, damage, delayedVetoableChange, deleteFromModel, finalize, getContextNotation, getDestination, getItalicLabelFont, getItemUID, getLabelFont, getNameFig, getSource, getSquaredDistance, getStereotypeFig, getTipString, hit, hitClarifier, keyPressed, keyReleased, keyTyped, makeSelection, mouseClicked, mouseEntered, mouseExited, mousePressed, mouseReleased, notationAdded, notationChanged, notationProviderAdded, notationProviderRemoved, notationRemoved, paintClarifiers, postLoad, propertyChange, removeFromDiagram, renderingChanged, setItemUID, updateClassifiers, updateNameText, updateStereotypeText, vetoableChange
 
Methods inherited from class org.tigris.gef.presentation.FigEdgePoly
computeRoute, findAvoidPt, insertPoint, layoutEdge, makeEdgeFig, moveVertex, routingRectPoint, segOK, setEndPoints, setInitiallyLaidOut, setPoint, tryRoute
 
Methods inherited from class org.tigris.gef.presentation.FigEdge
addPathItem, calcBounds, cleanUp, contains, getBetweenNearestPoints, getBounds, 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, setPoints, setPoints, setPrivateData, 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, delete, dispose, drawDashedLine, drawDashedPerimeter, endTrans, firePropChange, firePropChange, firePropChange, getAnnotationOwner, getAnnotationStrategy, 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, isCopieable, isCopyable, isCutable, isDisplayed, isLowerRightResizable, isMovable, isSelected, isVisible, OK, pointAlongPerimeter, postSave, preSave, print, redraw, removeAnnotation, removeAnnotation, removePoint, removePropertyChangeListener, reorder, routingRect, savingAllowed, setAnnotationOwner, setAnnotationStatus, setAnnotationStrategy, setBounds, setBounds, setCenter, setContext, setDashedString, setDisplayed, setEnclosingFig, setFillColor, setFilled, setGroup, setHandleBox, setHeight, setLayer, setLocation, setLocation, setLocked, setMovable, setPoint, setPoint, setPoints, setPoints, setResizable, setResource, setSavingAllowed, setSelected, setSingle, setSize, setSize, setVisible, setVisState, setWidth, setX, setY, stuffBounds, translate, translateAnnotations, unsetAnnotationOwner, updateAnnotationPositions, updateVisState, within
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 
Methods inherited from interface org.tigris.gef.ui.Highlightable
addPropertyChangeListener, removePropertyChangeListener
 

Field Detail

SUPPRESS_BIDIRECTIONAL_ARROWS

private static final boolean SUPPRESS_BIDIRECTIONAL_ARROWS
See Also:
Constant Field Values

srcGroup

private FigTextGroup srcGroup
Group for the FigTexts concerning the source association end.


destGroup

private FigTextGroup destGroup
Group for the FigTexts concerning the dest association end.


middleGroup

private FigTextGroup middleGroup
Group for the FigTexts concerning the name and stereotype of the association itself.


srcMult

private org.tigris.gef.presentation.FigText srcMult

srcRole

private org.tigris.gef.presentation.FigText srcRole

destMult

private org.tigris.gef.presentation.FigText destMult

destRole

private org.tigris.gef.presentation.FigText destRole

srcOrdering

private org.tigris.gef.presentation.FigText srcOrdering

destOrdering

private org.tigris.gef.presentation.FigText destOrdering

sourceArrowHead

private org.tigris.gef.presentation.ArrowHead sourceArrowHead

destArrowHead

private org.tigris.gef.presentation.ArrowHead destArrowHead

NAV_AGGREGATE

private static final org.tigris.gef.presentation.ArrowHead NAV_AGGREGATE

NAV_COMP

private static final org.tigris.gef.presentation.ArrowHead NAV_COMP

serialVersionUID

static final long serialVersionUID
See Also:
Constant Field Values
Constructor Detail

FigAssociation

public FigAssociation()
Main constructor Don't call this constructor directly. It is public since this is necessary for loading. Use the FigAssociation(Object, Layer) constructor instead!


FigAssociation

public FigAssociation(Object edge,
                      org.tigris.gef.base.Layer lay)
Constructor that hooks the Fig to an existing UML element.

Parameters:
edge - the UMl element
lay - the layer
Method Detail

setOwner

public void setOwner(Object association)
Overrides:
setOwner in class FigEdgeModelElement
See Also:
Fig.setOwner(java.lang.Object)

textEdited

protected void textEdited(org.tigris.gef.presentation.FigText ft)
Description copied from class: FigEdgeModelElement
This method is called after the user finishes editing a text field that is in the FigEdgeModelElement. Determine which field and update the model. This class handles the name, subclasses should override to handle other text elements.

Overrides:
textEdited in class FigEdgeModelElement
Parameters:
ft - the text Fig that has been edited
See Also:
FigEdgeModelElement.textEdited(org.tigris.gef.presentation.FigText)

updateEnd

private void updateEnd(org.tigris.gef.presentation.FigText multiToUpdate,
                       org.tigris.gef.presentation.FigText roleToUpdate,
                       org.tigris.gef.presentation.FigText orderingToUpdate,
                       Object end)

modelChanged

protected void modelChanged(PropertyChangeEvent e)
Description copied from class: FigEdgeModelElement
This is called after any part of the UML MModelElement has changed. This method automatically updates the name FigText. Subclasses should override and update other parts.

Overrides:
modelChanged in class FigEdgeModelElement
Parameters:
e - the event
See Also:
FigEdgeModelElement.modelChanged(java.beans.PropertyChangeEvent)

chooseArrowHead

private org.tigris.gef.presentation.ArrowHead chooseArrowHead(Object ak,
                                                              boolean nav)
Parameters:
ak - Object of type AggregationKind
nav - the result of a Model.getFacade().isNavigable(AssociationEnd)
Returns:
the ArrowHead chosen

getPopUpActions

public Vector getPopUpActions(MouseEvent me)
Specified by:
getPopUpActions in interface org.tigris.gef.ui.PopupGenerator
Overrides:
getPopUpActions in class FigEdgeModelElement
See Also:
PopupGenerator.getPopUpActions(java.awt.event.MouseEvent)

getOrderingName

private String getOrderingName(Object orderingKind)
Returns the name of the OrderingKind.

Returns:
"{ordered}", "{sorted}" or "" if null or "unordered"

updateAbstract

protected void updateAbstract()
Updates the name if modelchanged receives an "isAbstract" event.


paint

public void paint(Graphics g)
See Also:
Fig.paint(java.awt.Graphics)

getMiddleGroup

protected FigTextGroup getMiddleGroup()
Returns:
Returns the middleGroup.


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