org.argouml.uml.diagram.use_case.ui
Class FigExtend

java.lang.Object
  |
  +--org.tigris.gef.presentation.Fig
        |
        +--org.tigris.gef.presentation.FigEdge
              |
              +--org.tigris.gef.presentation.FigEdgePoly
                    |
                    +--org.argouml.uml.diagram.ui.FigEdgeModelElement
                          |
                          +--org.argouml.uml.diagram.use_case.ui.FigExtend
All Implemented Interfaces:
ArgoEventListener, ArgoNotationEventListener, java.lang.Cloneable, DelayedVChangeListener, java.util.EventListener, org.tigris.gef.ui.Highlightable, java.awt.event.KeyListener, ru.novosoft.uml.MElementListener, java.awt.event.MouseListener, NotationContext, org.tigris.gef.ui.PopupGenerator, java.beans.PropertyChangeListener, java.io.Serializable, java.beans.VetoableChangeListener

public class FigExtend
extends FigEdgeModelElement

A fig for use with extend relationships on use case diagrams.

Realised as a dotted line with an open arrow head and the label «extend» together with any condition alongside.

See Also:
Serialized Form

Inner classes inherited from class org.tigris.gef.presentation.FigEdge
org.tigris.gef.presentation.FigEdge.PathItem
 
Field Summary
protected  org.tigris.gef.presentation.FigText _condition
          The condition expression.
protected  org.tigris.gef.presentation.FigGroup _fg
          The group of label and condition.
protected  org.tigris.gef.presentation.FigText _label
          The «extend» label.
 
Fields inherited from class org.argouml.uml.diagram.ui.FigEdgeModelElement
_name, _stereo, cat, ITALIC_LABEL_FONT, LABEL_FONT, MARGIN
 
Fields inherited from class org.tigris.gef.presentation.FigEdgePoly
_initiallyLaidOut
 
Fields inherited from class org.tigris.gef.presentation.FigEdge
_arrowHeadEnd, _arrowHeadStart, _destFigNode, _destPortFig, _fig, _highlight, _pathItems, _sourceFigNode, _sourcePortFig, _useNearest
 
Fields inherited from class org.tigris.gef.presentation.Fig
_allowsSaving, _context, _dashes, _displayed, _fillColor, _filled, _group, _h, _layer, _lineColor, _lineWidth, _locked, _resource, _shown, _w, _x, _y, an, annotationOwner, annotationStatus, BORDER, DASH_ARRAYS, DASHED_CHOICES, MIN_SIZE
 
Constructor Summary
FigExtend()
          Deprecated. use FigExtend(Object), since that sets the owner.
FigExtend(java.lang.Object edge)
          The main constructor.
 
Method Summary
protected  boolean canEdit(org.tigris.gef.presentation.Fig f)
          Define whether the given fig can be edited (it can't).
protected  void modelChanged(ru.novosoft.uml.MElementEvent e)
          This is called after any part of the UML MModelElement has changed.
 void setFig(org.tigris.gef.presentation.Fig f)
          Set a new fig to represent this edge. We invoke the superclass accessor.
 
Methods inherited from class org.argouml.uml.diagram.ui.FigEdgeModelElement
damage, delayedVetoableChange, delete, dispose, finalize, getContextNotation, getDestination, getItemUID, getNameFig, getPopUpActions, getSource, getSquaredDistance, getStereotypeFig, getTipString, hit, hitClarifier, keyPressed, keyReleased, keyTyped, listRoleItemSet, makeSelection, mouseClicked, mouseEntered, mouseExited, mousePressed, mouseReleased, notationAdded, notationChanged, notationProviderAdded, notationProviderRemoved, notationRemoved, paintClarifiers, propertyChange, propertySet, recovered, removed, renderingChanged, roleAdded, roleRemoved, setItemUID, setOwner, textEdited, updateClassifiers, updateStereotypeText, vetoableChange
 
Methods inherited from class org.tigris.gef.presentation.FigEdgePoly
computeRoute, findAvoidPt, insertPoint, layoutEdge, makeEdgeFig, moveVertex, paint, routingRectPoint, segOK, setEndPoints, setInitiallyLaidOut, setPoints, tryRoute
 
Methods inherited from class org.tigris.gef.presentation.FigEdge
addPathItem, calcBounds, cleanUp, contains, getBetweenNearestPoints, getBounds, getDashed, getDestArrowHead, getDestFigNode, getDestPortFig, getFig, getFirstPoint, getHighlight, getLastPoint, getLineColor, getLineWidth, getNumPoints, getPathItem, getPathItemFig, getPathItemFigs, getPathItemsRaw, getPerimeterLength, getPoints, getPoints, getPrivateData, getSourceArrowHead, getSourceFigNode, getSourcePortFig, getXs, getYs, hitFig, intersects, isReshapable, isResizable, isRotatable, paintArrowHeads, paintHighlightLine, paintPathItems, postLoad, removePathItem, removePathItem, setBetweenNearestPoints, setDashed, setDestArrowHead, setDestFigNode, setDestPortFig, setHighlight, setLineColor, setLineWidth, setNumPoints, 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, 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, getPreferedSize, getResource, getSize, getTrapRect, getUseTrapRect, getVisState, getWidth, getX, getY, initAnnotations, isAnnotation, isDisplayed, isLowerRightResizable, isMovable, OK, pointAlongPerimeter, postSave, preSave, print, 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, setPoints, setPoints, setResource, setSavingAllowed, setSize, setSize, setVisState, setWidth, setX, setY, startTrans, stuffBounds, translate, 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

_label

protected org.tigris.gef.presentation.FigText _label

The «extend» label.


_condition

protected org.tigris.gef.presentation.FigText _condition

The condition expression.


_fg

protected org.tigris.gef.presentation.FigGroup _fg

The group of label and condition.

Constructor Detail

FigExtend

public FigExtend()
Deprecated. use FigExtend(Object), since that sets the owner.

The default constructor, but should never be called directly (use FigExtend(Object), since that sets the owner. However we can't mark it as private, since GEF expects to be able to call this when creating the diagram.


FigExtend

public FigExtend(java.lang.Object edge)

The main constructor. Builds the FigEdge required and makes the given edge object its owner.

Parameters:
edge - The edge that will own the fig
Method Detail

setFig

public void setFig(org.tigris.gef.presentation.Fig f)

Set a new fig to represent this edge.

We invoke the superclass accessor. Then change aspects of the new fig that are not as we want. In this case to use dashed lines.

Overrides:
setFig in class org.tigris.gef.presentation.FigEdge
Parameters:
f - The fig to use.

canEdit

protected boolean canEdit(org.tigris.gef.presentation.Fig f)

Define whether the given fig can be edited (it can't).

Overrides:
canEdit in class FigEdgeModelElement
Parameters:
f - The fig about which the enquiry is being made. Ignored in this implementation.
Returns:
false under all circumstances.

modelChanged

protected void modelChanged(ru.novosoft.uml.MElementEvent e)

This is called after any part of the UML MModelElement has changed. This method automatically updates things specific to this fig. Subclasses should override and update other parts.

We reset the condition text. We really ought to check that there has actually been a change, but for now we do it every time. We do it within Fig.startTrans() and Fig.endTrans() so GEF will get the redrawing right.

Overrides:
modelChanged in class FigEdgeModelElement


ArgoUML (c) 1996-2002
ArgoUML Project Home
ArgoUML Cookbook