Java Doc for SugiyamaLayoutAlgorithm.java in  » Workflow-Engines » OSWorkflow » com » opensymphony » workflow » designer » layout » Java Source Code / Java DocumentationJava Source Code and Java Documentation

Java Source Code / Java Documentation
1. 6.0 JDK Core
2. 6.0 JDK Modules
3. 6.0 JDK Modules com.sun
4. 6.0 JDK Modules com.sun.java
5. 6.0 JDK Modules sun
6. 6.0 JDK Platform
7. Ajax
8. Apache Harmony Java SE
9. Aspect oriented
10. Authentication Authorization
11. Blogger System
12. Build
13. Byte Code
14. Cache
15. Chart
16. Chat
17. Code Analyzer
18. Collaboration
19. Content Management System
20. Database Client
21. Database DBMS
22. Database JDBC Connection Pool
23. Database ORM
24. Development
25. EJB Server geronimo
26. EJB Server GlassFish
27. EJB Server JBoss 4.2.1
28. EJB Server resin 3.1.5
29. ERP CRM Financial
30. ESB
31. Forum
32. GIS
33. Graphic Library
34. Groupware
35. HTML Parser
36. IDE
37. IDE Eclipse
38. IDE Netbeans
39. Installer
40. Internationalization Localization
41. Inversion of Control
42. Issue Tracking
43. J2EE
44. JBoss
45. JMS
46. JMX
47. Library
48. Mail Clients
49. Net
50. Parser
51. PDF
52. Portal
53. Profiler
54. Project Management
55. Report
56. RSS RDF
57. Rule Engine
58. Science
59. Scripting
60. Search Engine
61. Security
62. Sevlet Container
63. Source Control
64. Swing Library
65. Template Engine
66. Test Coverage
67. Testing
68. UML
69. Web Crawler
70. Web Framework
71. Web Mail
72. Web Server
73. Web Services
74. Web Services apache cxf 2.0.1
75. Web Services AXIS2
76. Wiki Engine
77. Workflow Engines
78. XML
79. XML UI
Java
Java Tutorial
Java Open Source
Jar File Download
Java Articles
Java Products
Java by API
Photoshop Tutorials
Maya Tutorials
Flash Tutorials
3ds-Max Tutorials
Illustrator Tutorials
GIMP Tutorials
C# / C Sharp
C# / CSharp Tutorial
C# / CSharp Open Source
ASP.Net
ASP.NET Tutorial
JavaScript DHTML
JavaScript Tutorial
JavaScript Reference
HTML / CSS
HTML CSS Reference
C / ANSI-C
C Tutorial
C++
C++ Tutorial
Ruby
PHP
Python
Python Tutorial
Python Open Source
SQL Server / T-SQL
SQL Server / T-SQL Tutorial
Oracle PL / SQL
Oracle PL/SQL Tutorial
PostgreSQL
SQL / MySQL
MySQL Tutorial
VB.Net
VB.Net Tutorial
Flash / Flex / ActionScript
VBA / Excel / Access / Word
XML
XML Tutorial
Microsoft Office PowerPoint 2007 Tutorial
Microsoft Office Excel 2007 Tutorial
Microsoft Office Word 2007 Tutorial
Java Source Code / Java Documentation » Workflow Engines » OSWorkflow » com.opensymphony.workflow.designer.layout 
Source Cross Reference  Class Diagram Java Document (Java Doc) 


java.lang.Object
   com.opensymphony.workflow.designer.layout.SugiyamaLayoutAlgorithm

SugiyamaLayoutAlgorithm
public class SugiyamaLayoutAlgorithm implements LayoutAlgorithm(Code)
Arranges the nodes with the Sugiyama Layout Algorithm.
Link to the algorithm


author:
   Sven Luzar

version:
   1.0 init

Inner Class :class CellWrapper implements Comparable

Field Summary
final public static  StringKEY_HORIZONTAL_SPACING
    
final public static  StringKEY_VERTICAL_SPACING
    
final public static  StringSUGIYAMA_CELL_WRAPPER
    
final public static  StringSUGIYAMA_VISITED
    
protected  intgridAreaSize
    
 intiteration
    
 Listmovements
     A List with Integer Objects.
 intmovementsCurrentLoop
     Represents the movements in the current loop.
 intmovementsMax
     Represents the maximum of movements in the current loop.
final protected  booleanverbose
    


Method Summary
protected  voiddisplayEdgeCrossesValues(List levels)
    
protected  voiddisplayGridPositions(List levels)
    
protected  voiddisplayPriorities(List levels)
    
protected  voiddrawGraph(JGraph jgraph, List levels, Point min, Point spacing)
     This Method draws the graph.
protected  ListfillLevels(JGraph jgraph, CellView[] selectedCellViews, List rootVertexViews)
     Method fills the levels and stores them in the member levels.
protected  voidfillLevels(JGraph jgraph, List levels, int level, VertexView vertexView)
     Fills the List for the specified level with a wrapper for the MyGraphCell.
protected  PointfindMinimumAndSpacing(CellView[] graphCellViews, Point spacing)
     calculates the minimum for the paint area.
protected  booleanmove(boolean toRight, List currentLevel, int currentIndexInTheLevel, int currentPriority)
    
protected  voidmoveToBarycenter(JGraph jgraph, CellView[] allSelectedViews, List levels)
    
protected  intmoveToBarycenter(JGraph jgraph, List levels, int levelIndex)
    
public  voidperform(JGraph jgraph, boolean applyToAll, Properties configuration)
     Implementation. First of all the Algorithm searches the roots from the Graph.
protected  ListsearchRoots(JGraph jgraph, CellView[] selectedCellViews)
     Searches all Roots for the current Graph First the method marks any Node as not visited.
protected  voidsearchRoots(JGraph jgraph, VertexView vertexViewToInspect, List roots)
     Searches Roots for the current Cell.
protected  voidsolveEdgeCrosses(JGraph jgraph, List levels)
    
protected  intsolveEdgeCrosses(JGraph jgraph, boolean down, List levels, int levelIndex)
    
protected  voidupdateProgress4Movements()
    

Field Detail
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





Method Detail
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



Methods inherited from java.lang.Object
native protected Object clone() throws CloneNotSupportedException(Code)(Java Doc)
public boolean equals(Object obj)(Code)(Java Doc)
protected void finalize() throws Throwable(Code)(Java Doc)
final native public Class getClass()(Code)(Java Doc)
native public int hashCode()(Code)(Java Doc)
final native public void notify()(Code)(Java Doc)
final native public void notifyAll()(Code)(Java Doc)
public String toString()(Code)(Java Doc)
final native public void wait(long timeout) throws InterruptedException(Code)(Java Doc)
final public void wait(long timeout, int nanos) throws InterruptedException(Code)(Java Doc)
final public void wait() throws InterruptedException(Code)(Java Doc)

www.java2java.com | Contact Us
Copyright 2009 - 12 Demo Source and Support. All rights reserved.
All other trademarks are property of their respective owners.