|
|||||||||||
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
org.argouml.uml.diagram.static_structure.layout.ClassdiagramNote
This class overrides some of the aspects of ClassdiagramNodes to simplify the positioning of notes nearby the commented nodes.
Field Summary | |
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. |
Constructor Summary | |
ClassdiagramNote(org.tigris.gef.presentation.FigNode f)
|
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) |
private ClassdiagramNode |
first()
Return the first node to which this note is attached to. |
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
Constructor Detail |
public ClassdiagramNote(org.tigris.gef.presentation.FigNode f)
f
- the figMethod Detail |
public int getTypeOrderNumer()
ClassdiagramNode
getTypeOrderNumer
in class ClassdiagramNode
ClassdiagramNode.getTypeOrderNumer()
public float calculateWeight()
ClassdiagramNode
calculateWeight
in class ClassdiagramNode
ClassdiagramNode.calculateWeight()
public int getRank()
ClassdiagramNode
getRank
in class ClassdiagramNode
ClassdiagramNode.getRank()
public float getWeight()
ClassdiagramNode
getWeight
in class ClassdiagramNode
ClassdiagramNode.getWeight()
public boolean isStandalone()
ClassdiagramNode
isStandalone
in class ClassdiagramNode
ClassdiagramNode.isStandalone()
private ClassdiagramNode first()
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 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 Dimension getSize()
getSize
in interface LayoutedNode
public float getSubtreeWeight()
public Vector getUplinks()
public boolean isComment()
public boolean isPackage()
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 |