User Tools

Site Tools


v020:layout

Differences

This shows you the differences between two versions of the page.

Link to this comparison view

Both sides previous revision Previous revision
Next revision
Previous revision
v020:layout [2015/11/05 15:48]
deva [Simple layout constraints for nodes]
v020:layout [2015/11/07 13:39] (current)
gregobalu [Constraints for links]
Line 28: Line 28:
  
 Example: Model contains these classes: **A**, **B** and **C**. Example: Model contains these classes: **A**, **B** and **C**.
 +{{ :​v020:​examplesimplediagram.png?​200|}}
 <​code>​ <​code>​
 class MyDiagram extends Diagram { class MyDiagram extends Diagram {
Line 48: Line 49:
   * ''​@LeftMost(A.class)''​ : Box **A** is //west// from every other box.   * ''​@LeftMost(A.class)''​ : Box **A** is //west// from every other box.
  
 +Example: Model contains these classes: **C**, **E**, **D**, **O**, **R**, **S1** and **S2**.
 +<​code>​
 +class MyDiagram extends Diagram {
 +  @Row({R.class,​ E.class, D.class})
 +  @Column({C.class,​ R.class, O.class, S1.class, S2.class})
 +  class MyLayout extends Layout {}
 +}
 +</​code>​
 ===== Constraints for links ===== ===== Constraints for links =====
  
Line 56: Line 65:
   * ''​@North(val = L.class, from = A.class, end = LinkEnd.End)''​ : reflexive link **L**'​s ending point will connect to box **A** on **A**'​s northern side.   * ''​@North(val = L.class, from = A.class, end = LinkEnd.End)''​ : reflexive link **L**'​s ending point will connect to box **A** on **A**'​s northern side.
   * Can be used similarly with ''​@East'',​ ''​@South''​ and ''​@West''​.   * Can be used similarly with ''​@East'',​ ''​@South''​ and ''​@West''​.
-  * ''​@Priority(val = L.class, prior = 50)''​ : gives link **L** a priority value of **50**. Higher priority means shorter route and less turns. ​+  * ''​@Priority(val = L.class, prior = 50)''​ : gives link **L** a priority value of **50**. Higher priority means shorter route and less turns. 
 + 
 +Example: Model contains these classes: **A** and **B**. Model contains these links: **L** (A - B) and **R** (A -A). 
 +{{ :​v020:​examplelinkdiagram.png?​150|}} 
 +<​code>​ 
 +class MyDiagram extends Diagram { 
 +  @North(val = L.class, from = A.class) 
 +  @East(val = L.class, from = B.class) 
 +  @Above(val = A.class, from = B.class) 
 +  @West(val = R.class, from = A.class, end = LinkEnd.Start) 
 +  @South(val = R.class, from = A.class, end = LinkEnd.End) 
 +  class MyLayout extends Layout {} 
 +
 +</​code>​
 ===== Groups ===== ===== Groups =====
  
v020/layout.1446734883.txt.gz · Last modified: 2015/11/05 15:48 by deva