uci.uml.visual
Class FigEdgeModelElement

java.lang.Object
  |
  +--uci.gef.Fig
        |
        +--uci.gef.FigEdge
              |
              +--uci.gef.FigEdgePoly
                    |
                    +--uci.uml.visual.FigEdgeModelElement
Direct Known Subclasses:
FigAssociation, FigAssociationRole, FigDependency, FigGeneralization, FigLink, FigRealization, FigTransition

public abstract class FigEdgeModelElement
extends FigEdgePoly
implements VetoableChangeListener, DelayedVChangeListener, MouseListener, KeyListener, PropertyChangeListener

Abstract class to display diagram arcs for UML ModelElements that look like arcs and that have editiable names.

See Also:
Serialized Form

Inner classes inherited from class uci.gef.FigEdge
FigEdge.PathItem
 
Field Summary
protected  FigText _name
           
protected  FigText _stereo
           
static Font ITALIC_LABEL_FONT
           
static Font LABEL_FONT
           
 int MARGIN
           
 
Fields inherited from class uci.gef.FigEdgePoly
_initiallyLaidOut
 
Fields inherited from class uci.gef.FigEdge
_arrowHeadEnd, _arrowHeadStart, _destFigNode, _destPortFig, _fig, _highlight, _pathItems, _sourceFigNode, _sourcePortFig, _useNearest
 
Fields inherited from class uci.gef.Fig
_dashes, _fillColor, _filled, _group, _h, _layer, _lineColor, _lineWidth, _locked, _w, _x, _y, BORDER, DASH_ARRAYS, DASHED_CHOICES, MIN_SIZE
 
Constructor Summary
FigEdgeModelElement()
          Partially construct a new FigNode.
FigEdgeModelElement(Object edge)
           
 
Method Summary
protected  boolean canEdit(Fig f)
           
 void delayedVetoableChange(PropertyChangeEvent pce)
           
 FigText getNameFig()
           
 Vector getPopUpActions(MouseEvent me)
           
 int getSquaredDistance(Point p1, Point p2)
           
 FigText getStereotypeFig()
           
 String getTipString(MouseEvent me)
           
 ToDoItem hitClarifier(int x, int y)
           
 void keyPressed(KeyEvent ke)
           
 void keyReleased(KeyEvent ke)
          not used, do nothing.
 void keyTyped(KeyEvent ke)
           
 Selection makeSelection()
           
protected  void modelChanged()
          This is called aftern any part of the UML ModelElement has changed.
 void mouseClicked(MouseEvent me)
          If the user double clicks on anu part of this FigNode, pass it down to one of the internal Figs.
 void mouseEntered(MouseEvent me)
           
 void mouseExited(MouseEvent me)
           
 void mousePressed(MouseEvent me)
           
 void mouseReleased(MouseEvent me)
           
 void paintClarifiers(Graphics g)
           
 void propertyChange(PropertyChangeEvent pve)
           
 void setOwner(Object own)
           
protected  void textEdited(FigText ft)
          This method is called after the user finishes editing a text field that is in the FigEdgeModelElement.
 void updateNameText()
           
 void updateStereotypeText()
           
 void vetoableChange(PropertyChangeEvent pce)
           
 
Methods inherited from class uci.gef.FigEdgePoly
computeRoute, findAvoidPt, insertPoint, layoutEdge, makeEdgeFig, moveVertex, paint, routingRectPoint, segOK, setEndPoints, setInitiallyLaidOut, setPoints, tryRoute
 
Methods inherited from class uci.gef.FigEdge
addPathItem, calcBounds, cleanUp, contains, delete, getBetweenNearestPoints, getBounds, getDashed, getDestArrowHead, getDestFigNode, getDestPortFig, getFig, getFirstPoint, getHighlight, getLastPoint, getLineColor, getLineWidth, getNumPoints, getPathItem, getPathItemsRaw, getPerimeterLength, getPoints, getPoints, getSourceArrowHead, getSourceFigNode, getSourcePortFig, getXs, getYs, hit, hitFig, intersects, isReshapable, isResizable, isRotatable, paintArrowHeads, paintHighlightLine, paintPathItems, postLoad, removePathItem, setBetweenNearestPoints, setDashed, setDestArrowHead, setDestFigNode, setDestPortFig, setFig, setHighlight, setLineColor, setLineWidth, setNumPoints, setPoints, setPoints, setSourceArrowHead, setSourceFigNode, setSourcePortFig, setXs, setYs, stuffPointAlongPerimeter, translateEdge, updatePathItemLocations
 
Methods inherited from class uci.gef.Fig
addPoint, addPropertyChangeListener, align, center, classNameAndBounds, clone, connectionPoint, contains, contains, countCornersContained, createDrag, damage, dispose, drawDashedLine, drawDashedPerimeter, endTrans, firePropChange, firePropChange, firePropChange, getClosestPoint, getDashed01, getDashedString, getEnclosedFigs, getEnclosingFig, getFillColor, getFilled, getFilled01, getGravityPoints, getGroup, getHalfHeight, getHalfWidth, getHeight, getId, getLayer, getLocation, getLocked, getMinimumSize, getOwner, getPreferedSize, getSize, getTrapRect, getUseTrapRect, getWidth, getX, getY, isLowerRightResizable, isMovable, OK, pointAlongPerimeter, postSave, preSave, print, removePoint, removePropertyChangeListener, reorder, routingRect, setBounds, setBounds, setDashedString, setEnclosingFig, setFillColor, setFilled, setGroup, setHeight, setLayer, setLocation, setLocation, setLocked, setPoints, setPoints, setSize, setSize, setWidth, setX, setY, startTrans, stuffBounds, translate, within
 
Methods inherited from class java.lang.Object
equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

LABEL_FONT

public static Font LABEL_FONT

ITALIC_LABEL_FONT

public static Font ITALIC_LABEL_FONT

MARGIN

public final int MARGIN

_name

protected FigText _name

_stereo

protected FigText _stereo
Constructor Detail

FigEdgeModelElement

public FigEdgeModelElement()
Partially construct a new FigNode. This method creates the _name element that holds the name of the model element and adds itself as a listener.

FigEdgeModelElement

public FigEdgeModelElement(Object edge)
Method Detail

getTipString

public String getTipString(MouseEvent me)
Overrides:
getTipString in class Fig

getPopUpActions

public Vector getPopUpActions(MouseEvent me)
Overrides:
getPopUpActions in class Fig

getSquaredDistance

public int getSquaredDistance(Point p1,
                              Point p2)

paintClarifiers

public void paintClarifiers(Graphics g)

hitClarifier

public ToDoItem hitClarifier(int x,
                             int y)

makeSelection

public Selection makeSelection()
Overrides:
makeSelection in class Fig

getNameFig

public FigText getNameFig()

getStereotypeFig

public FigText getStereotypeFig()

vetoableChange

public void vetoableChange(PropertyChangeEvent pce)
Specified by:
vetoableChange in interface VetoableChangeListener

delayedVetoableChange

public void delayedVetoableChange(PropertyChangeEvent pce)
Specified by:
delayedVetoableChange in interface DelayedVChangeListener

propertyChange

public void propertyChange(PropertyChangeEvent pve)
Specified by:
propertyChange in interface PropertyChangeListener
Overrides:
propertyChange in class FigEdge

textEdited

protected void textEdited(FigText ft)
                   throws PropertyVetoException
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.

canEdit

protected boolean canEdit(Fig f)

mousePressed

public void mousePressed(MouseEvent me)
Specified by:
mousePressed in interface MouseListener

mouseReleased

public void mouseReleased(MouseEvent me)
Specified by:
mouseReleased in interface MouseListener

mouseEntered

public void mouseEntered(MouseEvent me)
Specified by:
mouseEntered in interface MouseListener

mouseExited

public void mouseExited(MouseEvent me)
Specified by:
mouseExited in interface MouseListener

mouseClicked

public void mouseClicked(MouseEvent me)
If the user double clicks on anu part of this FigNode, pass it down to one of the internal Figs. This allows the user to initiate direct text editing.
Specified by:
mouseClicked in interface MouseListener

keyPressed

public void keyPressed(KeyEvent ke)
Specified by:
keyPressed in interface KeyListener

keyReleased

public void keyReleased(KeyEvent ke)
not used, do nothing.
Specified by:
keyReleased in interface KeyListener

keyTyped

public void keyTyped(KeyEvent ke)
Specified by:
keyTyped in interface KeyListener

modelChanged

protected void modelChanged()
This is called aftern any part of the UML ModelElement has changed. This method automatically updates the name FigText. Subclasses should override and update other parts.

updateNameText

public void updateNameText()

updateStereotypeText

public void updateStereotypeText()

setOwner

public void setOwner(Object own)
Overrides:
setOwner in class FigEdge