|
|||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectde.uni_paderborn.fujaba.layout.AbstractLayouter
de.uni_paderborn.fujaba.layout.classdiag.ClassdiagramLayouter
This class implements a layout algoritms for class diagrams. The class has been taken from Argo UML source code.
Field Summary | |
private int |
hGap
The horizontal gap between nodes. |
private java.util.Vector |
layoutedClassNodes
_layoutedClassNodes is a convenience which holds a subset of _layoutedObjects (only ClassNodes) |
private java.util.Vector |
layoutedObjects
Attribute _layoutedObjects holds the objects to layout. |
private static org.apache.log4j.Logger |
LOG
Logger for logging events. |
private int |
maxPackageRank
No comment provided by developer, please add a comment to improve documentation. |
static ClassdiagramLayouter |
theInstance
Make this class a Singleton. |
private int |
vGap
The vertical gap between nodes. |
private int |
vMax
The maximum of elements in a particular row |
private int |
xPos
internal |
private int |
yPos
internal |
Fields inherited from class de.uni_paderborn.fujaba.layout.AbstractLayouter |
|
Constructor Summary | |
private |
ClassdiagramLayouter()
Constructor for class ClassdiagramLayouter |
Method Summary | |
void |
add(ClassdiagramNode obj)
Add a ClassdiagramNode to layout. |
void |
add(LayoutedObject obj)
Add a object to layout. |
static ClassdiagramLayouter |
get()
No comment provided by developer, please add a comment to improve documentation. |
ClassdiagramNode |
getClassdiagramNode(int index)
Get a ClassdiagramNode from the layouted objects. |
private ClassdiagramNode |
getClassdiagramNode4owner(UMLIncrement m)
Search the nodes in this classdiagram for a node with a given owner. |
private java.util.Vector |
getClassdiagramNodes()
extract the ClassdiagramNodes from all layouted objects |
private int |
getColumns(int row)
Get the number of elements in a given row |
protected int |
getHGap()
Get the horizontal gap between nodes. |
java.awt.Dimension |
getMinimumDiagramSize()
Operation getMinimumDiagramSize returns the minimum diagram size after the layout process. |
LayoutedObject |
getObject(int index)
Operation getObject returns a object with a given index from the layouter. |
LayoutedObject[] |
getObjects()
Operation getObjects returns all the objects currently participating in the layout process. |
private ClassdiagramNode[] |
getObjectsInRow(int row)
Operation getObject InRow returns all the objects for a given row. |
private int |
getRowHeight(int row)
calculate the height of the row |
private int |
getRows()
Get the number of rows in this diagram. |
protected int |
getVGap()
Get the vertical gap between nodes. |
private void |
init(UMLDiagram curDiagram,
int hGap,
int vGap)
This init method is mainly for convenience, so we don't have add every node manually to the layouter. |
void |
layout()
Operation layout implements the actual layout algorithm. |
(package private) void |
layoutPackages()
position the packages of the diagram |
private void |
rankPackagesAndMoveClassesBelow(java.util.HashMap maptoAssocClasses)
No comment provided by developer, please add a comment to improve documentation. |
void |
reLayout(FSAContainer currentCanvas)
No comment provided by developer, please add a comment to improve documentation. |
void |
remove(LayoutedObject obj)
Remove a object from the layout process. |
private void |
weightAndPlaceClasses()
No comment provided by developer, please add a comment to improve documentation. |
Methods inherited from class de.uni_paderborn.fujaba.layout.AbstractLayouter |
checkVisited, getChild, getFrame, getFromToFrame, getHorizDist, getLeft, getPreferredLen, getPresetAdjustment, getRevMyLayouter, getVertDist, innerLayout, isLastCondition, refreshOptions, removeYou, searchStart, setHorizDist, setLastCondition, setLeft, setPresetAdjustment, setRevMyLayouter, setVertDist |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
public static ClassdiagramLayouter theInstance
private static final org.apache.log4j.Logger LOG
private java.util.Vector layoutedObjects
private java.util.Vector layoutedClassNodes
private int maxPackageRank
private int hGap
private int vGap
private int vMax
private int xPos
private int yPos
Constructor Detail |
private ClassdiagramLayouter()
Method Detail |
public static ClassdiagramLayouter get()
private void init(UMLDiagram curDiagram, int hGap, int vGap)
curDiagram
- No description providedhGap
- No description providedvGap
- No description providedpublic void add(LayoutedObject obj)
add
in interface Layouter
obj
- represents the object to layout.public void add(ClassdiagramNode obj)
obj
- represents the object to layout.public void remove(LayoutedObject obj)
remove
in interface Layouter
obj
- represents the object to remove.public LayoutedObject[] getObjects()
getObjects
in interface Layouter
public LayoutedObject getObject(int index)
getObject
in interface Layouter
index
- represents the index of this object in the layouter.
public ClassdiagramNode getClassdiagramNode(int index)
index
- represents the index of this ClassdiagramNode.
private java.util.Vector getClassdiagramNodes()
public void layout()
layout
in interface Layouter
private void rankPackagesAndMoveClassesBelow(java.util.HashMap maptoAssocClasses)
maptoAssocClasses
- No description providedprivate void weightAndPlaceClasses()
void layoutPackages()
private ClassdiagramNode getClassdiagramNode4owner(UMLIncrement m)
m
- No description provided
public java.awt.Dimension getMinimumDiagramSize()
getMinimumDiagramSize
in interface Layouter
private int getRows()
private int getRowHeight(int row)
row
- the row to calculate
private int getColumns(int row)
row
- The row to check.
private ClassdiagramNode[] getObjectsInRow(int row)
row
- represents the row of the returned objects.
protected int getVGap()
protected int getHGap()
public void reLayout(FSAContainer currentCanvas) throws java.lang.InterruptedException
reLayout
in class AbstractLayouter
currentCanvas
- No description provided
java.lang.InterruptedException
- Exception description not provided
|
|||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |