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

java.lang.Object
  |
  +--FigEdgePoly
        |
        +--org.argouml.uml.diagram.ui.FigEdgeModelElement
              |
              +--org.argouml.uml.diagram.use_case.ui.FigExtend
All Implemented Interfaces:
ArgoEventListener, ArgoNotationEventListener, DelayedVChangeListener, java.util.EventListener, java.awt.event.KeyListener, java.awt.event.MouseListener, NotationContext, java.beans.PropertyChangeListener, 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

Field Summary
protected  FigText _condition
          The condition expression.
protected  FigGroup _fg
          The group of label and condition.
protected  FigText _label
          The «extend» label.
 
Fields inherited from class org.argouml.uml.diagram.ui.FigEdgeModelElement
_name, _stereo, cat, ITALIC_LABEL_FONT, LABEL_FONT, MARGIN
 
Constructor Summary
FigExtend()
          Deprecated. As of ArgoUml version 0.9.8, use FigExtend(Object), since that sets the owner.
FigExtend(java.lang.Object edge)
          The main constructor.
 
Method Summary
protected  boolean canEdit(Fig f)
          Define whether the given fig can be edited (it can't).
protected  void modelChanged(MElementEvent e)
          This is called after any part of the UML MModelElement has changed.
 void paint(java.awt.Graphics g)
           
 void setFig(Fig f)
          Set a new fig to represent this edge.
 
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, postLoad, propertyChange, propertySet, recovered, removed, renderingChanged, roleAdded, roleRemoved, setItemUID, setOwner, textEdited, updateClassifiers, updateStereotypeText, vetoableChange
 
Methods inherited from class java.lang.Object
clone, equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

_label

protected FigText _label

The «extend» label.


_condition

protected FigText _condition

The condition expression.


_fg

protected FigGroup _fg

The group of label and condition.

Constructor Detail

FigExtend

public FigExtend()
Deprecated. As of ArgoUml version 0.9.8, 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(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.

Parameters:
f - The fig to use.

canEdit

protected boolean canEdit(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(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 #startTrans() and #endTrans() so GEF will get the redrawing right.

Overrides:
modelChanged in class FigEdgeModelElement

paint

public void paint(java.awt.Graphics g)


ArgoUML © 1996-2003 (20030919)ArgoUML Project HomeArgoUML Cookbook