gov.nih.nci.cagrid.graph.uml.classdiagram
Class ClassdiagramNote

java.lang.Object
  extended by gov.nih.nci.cagrid.graph.uml.classdiagram.ClassdiagramNode
      extended by gov.nih.nci.cagrid.graph.uml.classdiagram.ClassdiagramNote
All Implemented Interfaces:
LayoutedNode, LayoutedObject, java.lang.Comparable

public class ClassdiagramNote
extends ClassdiagramNode

This class overrides some of the aspects of ClassdiagramNodes to simplify the positioning of notes nearby the commented nodes.

Author:
David Gunkel

Field Summary
 
Fields inherited from class gov.nih.nci.cagrid.graph.uml.classdiagram.ClassdiagramNode
NOCOLUMN, NORANK, NOWEIGHT
 
Constructor Summary
ClassdiagramNote(org.tigris.gef.presentation.FigNode f)
           
 
Method Summary
 float calculateWeight()
          Calculate the weight of this node.
 int getRank()
          Get the rank of this node.
 int getTypeOrderNumer()
          Get the type order number of this node.
 float getWeight()
          Return the weight of this node, which is used for positioning in a row.
 boolean isStandalone()
          Test whether this node has no connection to other nodes.
 
Methods inherited from class gov.nih.nci.cagrid.graph.uml.classdiagram.ClassdiagramNode
addDownlink, addRank, addUplink, compareTo, getColumn, getDownlinks, getEdgeOffset, getFigure, getLevel, getLocation, getPlacementHint, getSize, getUplinks, isComment, isPackage, setColumn, setEdgeOffset, setFigure, setLocation, setPlacementHint, setRank, setWeight
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

ClassdiagramNote

public ClassdiagramNote(org.tigris.gef.presentation.FigNode f)
Parameters:
f - the fig
Method Detail

getTypeOrderNumer

public int getTypeOrderNumer()
Description copied from class: ClassdiagramNode
Get the type order number of this node. This number may be used to influence the sort order of ClassdiagramNodes.

Overrides:
getTypeOrderNumer in class ClassdiagramNode
Returns:
Type order number.
See Also:
org.argouml.uml.diagram.static_structure.layout.ClassdiagramNode#getTypeOrderNumer()

calculateWeight

public float calculateWeight()
Description copied from class: ClassdiagramNode
Calculate the weight of this node. The function distinguishes between note-nodes and standard-nodes, because a note shall be positioned to the right of its first related node, if it exists. Therefor the weight is a function of the weight of the related node. For standard-nodes the weight is a function of up-/downlinks, column and uplink factor.

Overrides:
calculateWeight in class ClassdiagramNode
Returns:
The weight of this node.
See Also:
org.argouml.uml.diagram.static_structure.layout.ClassdiagramNode#calculateWeight()

getRank

public int getRank()
Description copied from class: ClassdiagramNode
Get the rank of this node.

Overrides:
getRank in class ClassdiagramNode
Returns:
The rank for this node.
See Also:
org.argouml.uml.diagram.static_structure.layout.ClassdiagramNode#getRank()

getWeight

public float getWeight()
Description copied from class: ClassdiagramNode
Return the weight of this node, which is used for positioning in a row.

Overrides:
getWeight in class ClassdiagramNode
Returns:
The weight of this node.
See Also:
org.argouml.uml.diagram.static_structure.layout.ClassdiagramNode#getWeight()

isStandalone

public boolean isStandalone()
Description copied from class: ClassdiagramNode
Test whether this node has no connection to other nodes. Return true if node has no connections, false otherwise.

Overrides:
isStandalone in class ClassdiagramNode
Returns:
Result of test.
See Also:
org.argouml.uml.diagram.static_structure.layout.ClassdiagramNode#isStandalone()