org.argouml.uml.diagram.sequence.ui
Class SequenceDiagramLayout

java.lang.Object
  extended byorg.tigris.gef.base.Layer
      extended byorg.tigris.gef.base.LayerDiagram
          extended byorg.tigris.gef.base.LayerPerspective
              extended byorg.tigris.gef.base.LayerPerspectiveMutable
                  extended byorg.argouml.uml.diagram.sequence.ui.SequenceDiagramLayout
All Implemented Interfaces:
java.util.EventListener, org.tigris.gef.graph.GraphListener, java.io.Serializable

public class SequenceDiagramLayout
extends org.tigris.gef.base.LayerPerspectiveMutable

The layer on which the figs in a sequence diagram are placed. Also responsible for distributing figs on the diagram if a fig is added or removed.

See Also:
Serialized Form

Field Summary
private  java.util.LinkedList _figObjectsX
          Linked list with all fig objects sorted by x coordinate in it
private  int _heighestObjectHeight
          The heighest height of the outer box of a figobject.
static int DIAGRAM_LEFT_MARGE
          The distance between the left side of the diagram and the first FigObject.
static int DIAGRAM_TOP_MARGE
          The distance between the top side of the diagram and the top of the highest FigObject
static int LINK_DISTANCE
          The vertical distance between two links
static int OBJECT_DISTANCE
          The distance between two objects on the sequence diagram.
 
Fields inherited from class org.tigris.gef.base.LayerPerspectiveMutable
 
Fields inherited from class org.tigris.gef.base.LayerPerspective
_allowedNetClasses, _controller, _edgeRenderer, _gm, _nodeRenderer, _nodeTypeRegions, GAP
 
Fields inherited from class org.tigris.gef.base.LayerDiagram
_nextLayerNumbered
 
Fields inherited from class org.tigris.gef.base.Layer
_editors, _onMenu
 
Constructor Summary
SequenceDiagramLayout(java.lang.String name, org.tigris.gef.graph.MutableGraphModel gm)
           
 
Method Summary
 void add(org.tigris.gef.presentation.Fig f)
           
 void addNode(int position, Node node)
           
 void deleted(org.tigris.gef.presentation.Fig f)
           
private  void distributeFigObjects(org.tigris.gef.presentation.Fig f)
          Distributes the fig objects contained in _figObjectsX over the sequencediagram.
 java.util.List getFigLinks(int y)
          Returns a list with all FigLinks that intersect with the given y coordinate.
 void nodeAdded(org.tigris.gef.graph.GraphEvent ge)
           
 void putInPosition(org.tigris.gef.presentation.Fig f)
           
private  void reshuffelFigObjectsX(org.tigris.gef.presentation.Fig f)
           
 void updateActivations()
           
 
Methods inherited from class org.tigris.gef.base.LayerPerspectiveMutable
getGraphModel, getMutableGraphModel, remove, setGraphModel, setMutableGraphModel
 
Methods inherited from class org.tigris.gef.base.LayerPerspective
addNodeTypeRegion, allowNetClass, bumpOffOtherNodesIn, edgeAdded, edgeRemoved, getGraphController, getGraphEdgeRenderer, getGraphNodeRenderer, graphChanged, nodeRemoved, setGraphController, setGraphEdgeRenderer, setGraphNodeRenderer, shouldShow
 
Methods inherited from class org.tigris.gef.base.LayerDiagram
bringForward, bringInFrontOf, bringToFront, elements, getContents, getContents, getPortFig, hit, indexOf, insertAt, numberWordFor, paintContents, paintContents, postLoad, postSave, preSave, presentationCountFor, presentationFor, removeAll, reorder, sendBackward, sendToBack
 
Methods inherited from class org.tigris.gef.base.Layer
addEditor, adjust, calcDrawingArea, clone, damageAll, elementsIn, getContentsEdgesOnly, getContentsEdgesOnly, getContentsNoEdges, getContentsNoEdges, getEditors, getEditors, getGrayed, getHidden, getLocked, getName, getOnMenu, getPerspectiveType, getScale, isAlwaysOnTop, nodesIn, paint, paint, paintGrayContents, print, refreshEditors, removeEditor, setAlwaysOnTop, setGrayed, setHidden, setLocked, setName, setOnMenu, setPerspectiveType, setScale, toString
 
Methods inherited from class java.lang.Object
equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Field Detail

OBJECT_DISTANCE

public static final int OBJECT_DISTANCE
The distance between two objects on the sequence diagram.

See Also:
Constant Field Values

DIAGRAM_LEFT_MARGE

public static final int DIAGRAM_LEFT_MARGE
The distance between the left side of the diagram and the first FigObject.

See Also:
Constant Field Values

DIAGRAM_TOP_MARGE

public static final int DIAGRAM_TOP_MARGE
The distance between the top side of the diagram and the top of the highest FigObject

See Also:
Constant Field Values

LINK_DISTANCE

public static final int LINK_DISTANCE
The vertical distance between two links

See Also:
Constant Field Values

_figObjectsX

private java.util.LinkedList _figObjectsX
Linked list with all fig objects sorted by x coordinate in it


_heighestObjectHeight

private int _heighestObjectHeight
The heighest height of the outer box of a figobject.

Constructor Detail

SequenceDiagramLayout

public SequenceDiagramLayout(java.lang.String name,
                             org.tigris.gef.graph.MutableGraphModel gm)
Method Detail

putInPosition

public void putInPosition(org.tigris.gef.presentation.Fig f)
See Also:
LayerPerspective.putInPosition(Fig)

distributeFigObjects

private void distributeFigObjects(org.tigris.gef.presentation.Fig f)
Distributes the fig objects contained in _figObjectsX over the sequencediagram.

Parameters:
f -

nodeAdded

public void nodeAdded(org.tigris.gef.graph.GraphEvent ge)
See Also:
GraphListener.nodeAdded(GraphEvent)

add

public void add(org.tigris.gef.presentation.Fig f)
See Also:
Layer.add(org.tigris.gef.presentation.Fig)

reshuffelFigObjectsX

private void reshuffelFigObjectsX(org.tigris.gef.presentation.Fig f)

deleted

public void deleted(org.tigris.gef.presentation.Fig f)
See Also:
Layer.deleted(org.tigris.gef.presentation.Fig)

updateActivations

public void updateActivations()

getFigLinks

public java.util.List getFigLinks(int y)
Returns a list with all FigLinks that intersect with the given y coordinate.

Parameters:
y -
Returns:
the list with FigLinks.

addNode

public void addNode(int position,
                    Node node)


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