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

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.SequenceDiagramLayer
All Implemented Interfaces:
EventListener, GraphListener, Serializable

public class SequenceDiagramLayer
extends 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
static int DIAGRAM_LEFT_MARGIN
          The distance between the left side of the diagram and the first FigClassifierRole.
static int DIAGRAM_TOP_MARGIN
          The distance between the top side of the diagram and the top of the highest FigClassifierRole.
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.LayerPerspective
_allowedNetClasses, _nodeTypeRegions, GAP
 
Fields inherited from class org.tigris.gef.base.LayerDiagram
_nextLayerNumbered
 
Fields inherited from class org.tigris.gef.base.Layer
_onMenu
 
Constructor Summary
SequenceDiagramLayer(String name, MutableGraphModel gm)
          The constructor.
 
Method Summary
 void add(Fig f)
           
 void contractDiagram(int startNodeIndex, int numberOfNodes)
           
 void deleted(Fig f)
           
 void expandDiagram(int startNodeIndex, int numberOfNodes)
           
 List getFigMessages(int y)
          Returns a list with all FigMessages that intersect with the given y coordinate.
static int getNodeIndex(int y)
          Return the node index at a certain y point.
 void nodeAdded(GraphEvent ge)
           
 void putInPosition(Fig f)
           
 void remove(Fig f)
           
 void updateActivations()
          Update Activations.
 
Methods inherited from class org.tigris.gef.base.LayerPerspectiveMutable
getGraphModel, getMutableGraphModel, 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, contains, elements, getContents, getPortFig, hit, indexOf, insertAt, numberWordFor, paintContents, paintContents, postLoad, postSave, preSave, presentationCountFor, presentationFor, presentationsFor, removeAll, reorder, sendBackward, sendToBack
 
Methods inherited from class org.tigris.gef.base.Layer
addEditor, adjust, calcDrawingArea, clone, damageAll, elementsIn, getContentsEdgesOnly, getContentsNoEdges, 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_MARGIN

public static final int DIAGRAM_LEFT_MARGIN
The distance between the left side of the diagram and the first FigClassifierRole.

See Also:
Constant Field Values

DIAGRAM_TOP_MARGIN

public static final int DIAGRAM_TOP_MARGIN
The distance between the top side of the diagram and the top of the highest FigClassifierRole.

See Also:
Constant Field Values

LINK_DISTANCE

public static final int LINK_DISTANCE
The vertical distance between two links.

See Also:
Constant Field Values
Constructor Detail

SequenceDiagramLayer

public SequenceDiagramLayer(String name,
                            MutableGraphModel gm)
The constructor.

Parameters:
name - the name
gm - the graph model
Method Detail

putInPosition

public void putInPosition(Fig f)
See Also:
LayerPerspective.putInPosition(Fig)

nodeAdded

public void nodeAdded(GraphEvent ge)
See Also:
GraphListener.nodeAdded(GraphEvent)

add

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

getNodeIndex

public static int getNodeIndex(int y)
Return the node index at a certain y point.

Parameters:
y - The point.
Returns:
The node index.

contractDiagram

public void contractDiagram(int startNodeIndex,
                            int numberOfNodes)

expandDiagram

public void expandDiagram(int startNodeIndex,
                          int numberOfNodes)

deleted

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

updateActivations

public void updateActivations()
Update Activations. First removes all current activation boxes, then adds new ones to all figobject depending on the state of the nodes.


remove

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

getFigMessages

public List getFigMessages(int y)
Returns a list with all FigMessages that intersect with the given y coordinate.

Parameters:
y - is the given y coordinate.
Returns:
the list with FigMessages.


ArgoUML © 1996-2006ArgoUML HomepageArgoUML Developers' pageArgoUML Cookbook