org.argouml.uml.diagram.state.ui
Class FigTransition

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.state.ui.FigTransition
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

public class FigTransition
extends FigEdgeModelElement

This class represents the graphical representation of a transition on a diagram.

See Also:
Serialized Form

Nested Class Summary
 
Nested classes inherited from class org.tigris.gef.presentation.FigEdge
 
Field Summary
private  boolean dashed
          If dashed is true, then the transition represents "object flow".
private  org.tigris.gef.presentation.ArrowHeadGreater endArrow
           
 
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
FigTransition()
          The main constructor
FigTransition(Object edge)
          The constructor that hooks the Fig into an existing UML element
FigTransition(Object edge, org.tigris.gef.base.Layer lay)
          The constructor that hooks the Fig into an existing UML element.
 
Method Summary
protected  int[] flip(int[] ps)
          Deprecated. by mvw in V0.17.1. Use your own routine, or document this one and remove the deprecation.
protected  Object getDestination()
          Returns the destination of the edge.
protected  Object getSource()
          Returns the source of the edge.
protected  void modelChanged(PropertyChangeEvent e)
          This is called after any part of the UML ModelElement has changed.
 void paint(Graphics g)
           
 void setFig(org.tigris.gef.presentation.Fig f)
           
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 updateNameText()
          Updates the name text box.
 
Methods inherited from class org.argouml.uml.diagram.ui.FigEdgeModelElement
allowRemoveFromDiagram, canEdit, damage, delayedVetoableChange, deleteFromModel, finalize, getContextNotation, getItalicLabelFont, getItemUID, getLabelFont, getNameFig, getPopUpActions, 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, setOwner, updateClassifiers, 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, 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

endArrow

private org.tigris.gef.presentation.ArrowHeadGreater endArrow

dashed

private boolean dashed
If dashed is true, then the transition represents "object flow". If the line is solid, then it represents "control flow".

Constructor Detail

FigTransition

public FigTransition()
The main constructor


FigTransition

public FigTransition(Object edge,
                     org.tigris.gef.base.Layer lay)
The constructor that hooks the Fig into an existing UML element. It also adapts the line to be dashed if the source or destination is an ObjectFlowState.

Parameters:
edge - the UML element
lay - the layer

FigTransition

public FigTransition(Object edge)
The constructor that hooks the Fig into an existing UML element

Parameters:
edge - the UML element
Method Detail

setFig

public void setFig(org.tigris.gef.presentation.Fig f)
See Also:
FigEdge.setFig(org.tigris.gef.presentation.Fig)

textEdited

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. 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)

modelChanged

protected void modelChanged(PropertyChangeEvent e)
This is called after any part of the UML ModelElement 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)

flip

protected int[] flip(int[] ps)
Deprecated. by mvw in V0.17.1. Use your own routine, or document this one and remove the deprecation.

This function is not called anywhere. And it is not documented. Let's deprecate it, just in case.

Parameters:
ps - ?
Returns:
?

getDestination

protected Object getDestination()
Description copied from class: FigEdgeModelElement
Returns the destination of the edge. The destination is the owner of the node the edge travels to in a binary relationship. For instance: for a classifierrole, this is the receiver.

Overrides:
getDestination in class FigEdgeModelElement
Returns:
Object
See Also:
FigEdgeModelElement.getDestination()

getSource

protected Object getSource()
Description copied from class: FigEdgeModelElement
Returns the source of the edge. The source is the owner of the node the edge travels from in a binary relationship. For instance: for a classifierrole, this is the sender.

Overrides:
getSource in class FigEdgeModelElement
Returns:
MModelElement
See Also:
FigEdgeModelElement.getSource()

paint

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

updateNameText

protected void updateNameText()
Updates the name text box. In case of a transition the name text box contains:

The contents of the text box is generated by the Generator

Overrides:
updateNameText in class FigEdgeModelElement
See Also:
FigEdgeModelElement.updateNameText()


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