| java.lang.Object com.opensymphony.workflow.designer.layout.SugiyamaLayoutAlgorithm
Inner Class :class CellWrapper implements Comparable | |
Method Summary | |
protected void | displayEdgeCrossesValues(List levels) | protected void | displayGridPositions(List levels) | protected void | displayPriorities(List levels) | protected void | drawGraph(JGraph jgraph, List levels, Point min, Point spacing) This Method draws the graph. | protected List | fillLevels(JGraph jgraph, CellView[] selectedCellViews, List rootVertexViews) Method fills the levels and stores them in the member levels. | protected void | fillLevels(JGraph jgraph, List levels, int level, VertexView vertexView) Fills the List for the specified level with a wrapper
for the MyGraphCell. | protected Point | findMinimumAndSpacing(CellView[] graphCellViews, Point spacing) calculates the minimum for the paint area. | protected boolean | move(boolean toRight, List currentLevel, int currentIndexInTheLevel, int currentPriority) | protected void | moveToBarycenter(JGraph jgraph, CellView[] allSelectedViews, List levels) | protected int | moveToBarycenter(JGraph jgraph, List levels, int levelIndex) | public void | perform(JGraph jgraph, boolean applyToAll, Properties configuration) Implementation.
First of all the Algorithm searches the roots from the
Graph. | protected List | searchRoots(JGraph jgraph, CellView[] selectedCellViews) Searches all Roots for the current Graph
First the method marks any Node as not visited. | protected void | searchRoots(JGraph jgraph, VertexView vertexViewToInspect, List roots) Searches Roots for the current Cell. | protected void | solveEdgeCrosses(JGraph jgraph, List levels) | protected int | solveEdgeCrosses(JGraph jgraph, boolean down, List levels, int levelIndex) | protected void | updateProgress4Movements() |
KEY_HORIZONTAL_SPACING | final public static String KEY_HORIZONTAL_SPACING(Code) | | |
KEY_VERTICAL_SPACING | final public static String KEY_VERTICAL_SPACING(Code) | | |
SUGIYAMA_CELL_WRAPPER | final public static String SUGIYAMA_CELL_WRAPPER(Code) | | Const to add the Cell Wrapper to the Nodes
|
SUGIYAMA_VISITED | final public static String SUGIYAMA_VISITED(Code) | | Const to add Attributes at the Nodes
|
gridAreaSize | protected int gridAreaSize(Code) | | represents the size of the grid in horizontal grid elements
|
iteration | int iteration(Code) | | Represents the current loop number
It was needed for the progress dialog
|
movements | List movements(Code) | | A List with Integer Objects. The List contains the
history of movements per loop
It was needed for the progress dialog
|
movementsCurrentLoop | int movementsCurrentLoop(Code) | | Represents the movements in the current loop.
It was needed for the progress dialog
|
movementsMax | int movementsMax(Code) | | Represents the maximum of movements in the current loop.
It was needed for the progress dialog
|
verbose | final protected boolean verbose(Code) | | Field for debug output
|
displayEdgeCrossesValues | protected void displayEdgeCrossesValues(List levels)(Code) | | Debugdisplay for the edge crosses indicators on the System out
|
displayGridPositions | protected void displayGridPositions(List levels)(Code) | | Debugdisplay for the grid positions on the System out
|
displayPriorities | protected void displayPriorities(List levels)(Code) | | Debugdisplay for the priorities on the System out
|
drawGraph | protected void drawGraph(JGraph jgraph, List levels, Point min, Point spacing)(Code) | | This Method draws the graph. For the horizontal position
we are using the grid position from each graphcell.
For the vertical position we are using the level position.
|
fillLevels | protected List fillLevels(JGraph jgraph, CellView[] selectedCellViews, List rootVertexViews)(Code) | | Method fills the levels and stores them in the member levels.
Each level was represended by a List with Cell Wrapper objects.
These Lists are the elements in the levels List.
|
fillLevels | protected void fillLevels(JGraph jgraph, List levels, int level, VertexView vertexView)(Code) | | Fills the List for the specified level with a wrapper
for the MyGraphCell. After that the method called for
each neighbor graph cell.
Parameters: level - The level for the graphCell |
findMinimumAndSpacing | protected Point findMinimumAndSpacing(CellView[] graphCellViews, Point spacing)(Code) | | calculates the minimum for the paint area.
|
move | protected boolean move(boolean toRight, List currentLevel, int currentIndexInTheLevel, int currentPriority)(Code) | | Parameters: toRight - true = try to move the currentWrapper to right; false = try to move the currentWrapper to left; Parameters: currentLevel - List which contains the CellWrappers for the current level Parameters: currentIndexInTheLevel - Parameters: currentPriority - The free GridPosition or -1 is position is not free. |
moveToBarycenter | protected void moveToBarycenter(JGraph jgraph, CellView[] allSelectedViews, List levels)(Code) | | |
moveToBarycenter | protected int moveToBarycenter(JGraph jgraph, List levels, int levelIndex)(Code) | | |
perform | public void perform(JGraph jgraph, boolean applyToAll, Properties configuration)(Code) | | Implementation.
First of all the Algorithm searches the roots from the
Graph. Starting from this roots the Algorithm creates
levels and stores them in the member levels .
The Member levels contains List Objects and the List 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. Last but not Least the method draws the Graph.
See Also: LayoutAlgorithm |
searchRoots | protected List searchRoots(JGraph jgraph, CellView[] selectedCellViews)(Code) | | Searches all Roots for the current Graph
First the method marks any Node as not visited.
Than calls searchRoots(MyGraphCell) for each
not visited Cell.
The Roots are stored in the List named roots
returns a List with the roots See Also: SugiyamaLayoutAlgorithm.searchRoots(JGraph,CellView[]) |
searchRoots | protected void searchRoots(JGraph jgraph, VertexView vertexViewToInspect, List roots)(Code) | | Searches Roots for the current Cell.
Therefore he looks at all Ports from the Cell.
At the Ports he looks for Edges.
At the Edges he looks for the Target.
If the Ports of the current Cell contains the target ReViewNodePort
he follows the edge to the source and looks at the
Cell for this source.
|
solveEdgeCrosses | protected void solveEdgeCrosses(JGraph jgraph, List levels)(Code) | | |
solveEdgeCrosses | protected int solveEdgeCrosses(JGraph jgraph, boolean down, List levels, int levelIndex)(Code) | | movements |
updateProgress4Movements | protected void updateProgress4Movements()(Code) | | Updates the progress based on the movements count
|
|
|