|
|||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectorg.argouml.uml.diagram.static_structure.layout.ClassdiagramNode
This class represents a node in the classdiagram (a class, interface or package).
Things a node has to know:
Field Summary | |
private int |
column
Attribute column represents the current column of this node. |
private Vector |
downlinks
Attribute downlinks represents the nodes that contain the figures, which are sources of edges with the figure of this node as destination. |
private int |
edgeOffset
Offset used for edges, which have this node as the "upper" node |
private org.tigris.gef.presentation.FigNode |
figure
Attribute figure represents the figure that this ClassdiagramNode represents during the layout process. |
static int |
NOCOLUMN
Constant to be used as an initializer when this node is not placed at an column. |
static int |
NORANK
Constant to be used as an initializer when this node has no rank assigned yet. |
static int |
NOWEIGHT
Constant to be used as an initializer when this node has no weight. |
private int |
placementHint
Attribute placementHint keeps information about preferred positioning |
private int |
rank
Attribute rank represents the current rank (i.e. |
private static float |
uplinkFactor
|
private Vector |
uplinks
Attribute uplinks represents the nodes that contain the figures, which are destinations of edges with the figure of this node as source. |
private float |
weight
This attribute stores the 'weight' of this node. |
Constructor Summary | |
ClassdiagramNode(org.tigris.gef.presentation.FigNode f)
Operation ClassdiagramNode creates a new ClassdiagramNode. |
Method Summary | |
void |
addDownlink(ClassdiagramNode newDownlink)
Operation setDownlinks changes the value of the attribute _downlinks. |
void |
addRank(int n)
Add a constant to the rank of this node. |
void |
addUplink(ClassdiagramNode newUplink)
Add an uplink to this node. |
float |
calculateWeight()
Calculate the weight of this node. |
int |
compareTo(Object arg0)
The "natural order" for ClassdiagramNodes is defined by: First standalone, then linked nodes First Packages, then Interfaces/Classes/Notes increasing rank (rownumber) decreasing weight name of model object increasing hashcode (for uniqueness) |
int |
getColumn()
Operation getColumn returns the value of the attribute _column. |
Vector |
getDownlinks()
Get the downlinks of this node. |
int |
getEdgeOffset()
Get the offset which shall be used for edges with this node as parent. |
org.tigris.gef.presentation.FigNode |
getFigure()
Get the underlying figure of this node |
int |
getLevel()
Get the level in the inheritance hierarchy for this node. |
Point |
getLocation()
Get the location of the underlying figure in the diagram. |
int |
getPlacementHint()
Get the current placementhint. |
int |
getRank()
Get the rank of this node. |
Dimension |
getSize()
Operation getSize returns the size of the figure associated with this layout node. |
float |
getSubtreeWeight()
Get the weight of the subtree defined by this node. |
int |
getTypeOrderNumer()
Get the type order number of this node. |
Vector |
getUplinks()
Get the uplinks of this node. |
float |
getWeight()
Return the weight of this node, which is used for positioning in a row. |
boolean |
isComment()
Check if this node is associated with a note. |
boolean |
isPackage()
Check if this node is associated with a package. |
boolean |
isStandalone()
Test whether this node has no connection to other nodes. |
void |
setColumn(int newColumn)
Set the column of this node. |
void |
setEdgeOffset(int newOffset)
Set the offset for edges to this node. |
void |
setFigure(org.tigris.gef.presentation.FigNode newFigure)
Operation setFigure changes the value of the attribute _figure. |
void |
setLocation(Point newLocation)
Operation setLocation set the new location of the associated figure in the diagram. |
void |
setPlacementHint(int hint)
A placementhint gives an indication where it might be feasible to place this node. |
void |
setRank(int newRank)
Operation setRank changes the value of the attribute _rank. |
void |
setWeight(float w)
Set the weight for this node. |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
public static final int NOCOLUMN
public static final int NORANK
public static final int NOWEIGHT
private int column
private Vector downlinks
private int edgeOffset
private org.tigris.gef.presentation.FigNode figure
private int placementHint
private int rank
private Vector uplinks
private float weight
private static float uplinkFactor
Constructor Detail |
public ClassdiagramNode(org.tigris.gef.presentation.FigNode f)
f
- represents the figure in the diagram, that peers this layout
node.Method Detail |
public void addDownlink(ClassdiagramNode newDownlink)
newDownlink
- Represents the new value of _downlinks.public void addRank(int n)
n
- The value to add.public void addUplink(ClassdiagramNode newUplink)
newUplink
- represents the new uplinks.public float calculateWeight()
public int compareTo(Object arg0)
compareTo
in interface Comparable
Comparable.compareTo(java.lang.Object)
public int getColumn()
public Vector getDownlinks()
public int getEdgeOffset()
public org.tigris.gef.presentation.FigNode getFigure()
public int getLevel()
public Point getLocation()
getLocation
in interface LayoutedNode
public int getPlacementHint()
public int getRank()
public Dimension getSize()
getSize
in interface LayoutedNode
public float getSubtreeWeight()
public int getTypeOrderNumer()
public Vector getUplinks()
public float getWeight()
public boolean isComment()
public boolean isPackage()
public boolean isStandalone()
public void setColumn(int newColumn)
public void setEdgeOffset(int newOffset)
public void setFigure(org.tigris.gef.presentation.FigNode newFigure)
newFigure
- represents the new value of _figure.public void setLocation(Point newLocation)
setLocation
in interface LayoutedNode
newLocation
- represents the new location for this figure.public void setPlacementHint(int hint)
hint
- x coordinate of the desired placementpublic void setRank(int newRank)
newRank
- represents the new value of _rank.public void setWeight(float w)
|
|||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
ArgoUML © 1996-2004 (20050222) | ArgoUML Homepage | ArgoUML Developers' page | ArgoUML Cookbook |