|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.ObjectaminePlatform.util.graph.RelaxOntology
Arranges the nodes with the Sugiyama Layout Algorithm.
Nested Class Summary | |
(package private) class |
RelaxOntology.CellWrapper
cell wrapper contains all values for one node |
Field Summary | |
protected int |
gridAreaSize
represents the size of the grid in horizontal grid elements |
(package private) int |
iteration
Represents the current loop number It was needed for the progress dialog |
(package private) java.util.List |
levels
|
(package private) int |
MaxChild
|
(package private) java.util.List |
movements
A list with Integer Objects. |
(package private) int |
movementsCurrentLoop
Represents the movements in the current loop. |
(package private) int |
movementsMax
Represents the maximum of movements in the current loop. |
(package private) java.util.ArrayList |
selectedCellViews
|
Constructor Summary | |
RelaxOntology()
|
Method Summary | |
protected java.util.List |
fillLevels(java.util.ArrayList selectedCellViews,
java.util.List rootVertexViews)
Method fills the levels and stores them in the member levels. |
protected void |
fillLevels(java.util.List levels,
int level,
VisualNode vertexView)
Fills the Vector for the specified level with a wrapper for the VGraph. |
java.awt.Point |
getSpacing()
Returns the spacing. |
void |
initRelaxOntology()
|
protected boolean |
isSelected(VisualNode cell)
Detects whether the specified cell has been marked selected. |
protected void |
markSelected(java.util.ArrayList selectedCellViews,
boolean addMark)
Adds an attribute to the specified selected cell views. |
protected boolean |
move(boolean toRight,
java.util.List currentLevel,
int currentIndexInTheLevel,
int currentPriority)
|
protected void |
moveToBarycenter(java.util.ArrayList allSelectedViews,
java.util.List levels)
|
protected int |
moveToBarycenter(java.util.List levels,
int levelIndex)
|
protected java.util.ArrayList |
NeighbourInLevel(java.util.List level,
RelaxOntology.CellWrapper wrapper)
|
protected void |
relaxGraph(java.util.List levels,
java.awt.Point min,
java.awt.Point spacing)
This Method relax the graph. |
void |
run(VisualGraph graph)
Implementation. |
protected java.util.List |
searchRoots(java.util.ArrayList selectedCellViews)
Searches all Roots for the current Graph The Roots are stored in the Vector named roots |
protected void |
searchRoots(VisualNode vertexViewToInspect,
java.util.List roots)
Searches Roots for the current Cell. |
void |
setSpacing(java.awt.Point spacing)
Sets grid spacing. |
protected int |
solveEdgeCrosses(boolean down,
java.util.List levels,
int levelIndex)
|
protected void |
solveEdgeCrosses(java.util.List levels)
|
protected void |
updateProgress4Movements()
Updates the progress based on the movements count |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
protected int gridAreaSize
java.util.List movements
int movementsCurrentLoop
int movementsMax
int iteration
java.util.ArrayList selectedCellViews
java.util.List levels
int MaxChild
Constructor Detail |
public RelaxOntology()
Method Detail |
public void initRelaxOntology()
public void run(VisualGraph graph)
levels
.
The Member levels contains Vector Objects and the Vector per level
contains Cell Wrapper Objects. After that the Algorithm
tries to solve the edge crosses from level to level and
goes top down and bottom up. After minimization of the
edge crosses the algorithm moves each node to its
bary center.
graph
- VisualGraph instanceprotected void markSelected(java.util.ArrayList selectedCellViews, boolean addMark)
selectedCellViews
- the specified cell viewsaddMark
- true to add the mark, false to remove the markprotected boolean isSelected(VisualNode cell)
cell
- the cell to inspect
protected java.util.List searchRoots(java.util.ArrayList selectedCellViews)
protected void searchRoots(VisualNode vertexViewToInspect, java.util.List roots)
protected java.util.List fillLevels(java.util.ArrayList selectedCellViews, java.util.List rootVertexViews)
levels
Vector.
protected void fillLevels(java.util.List levels, int level, VisualNode vertexView)
protected void updateProgress4Movements()
protected void solveEdgeCrosses(java.util.List levels)
protected int solveEdgeCrosses(boolean down, java.util.List levels, int levelIndex)
protected void moveToBarycenter(java.util.ArrayList allSelectedViews, java.util.List levels)
protected int moveToBarycenter(java.util.List levels, int levelIndex)
protected boolean move(boolean toRight, java.util.List currentLevel, int currentIndexInTheLevel, int currentPriority)
toRight
- true = try to move the currentWrapper to right; false = try to move the currentWrapper to left;currentLevel
- List which contains the CellWrappers for the current levelcurrentIndexInTheLevel
- currentPriority
-
protected java.util.ArrayList NeighbourInLevel(java.util.List level, RelaxOntology.CellWrapper wrapper)
protected void relaxGraph(java.util.List levels, java.awt.Point min, java.awt.Point spacing)
public java.awt.Point getSpacing()
setSpacing(java.awt.Point)
public void setSpacing(java.awt.Point spacing)
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |