This shows you the differences between two versions of the page.
Both sides previous revision Previous revision Next revision | Previous revision | ||
v030:layout [2015/12/07 13:14] ndj94 [Constraints for links] |
v030:layout [2015/12/07 13:45] (current) ndj94 [Groups] |
||
---|---|---|---|
Line 83: | Line 83: | ||
In this section **A**, **B**, **C** are classes already defined in a txtUML model and **L** and **J** are associations with an endpoint at class **A**. | In this section **A**, **B**, **C** are classes already defined in a txtUML model and **L** and **J** are associations with an endpoint at class **A**. | ||
- | A group can be defined by defining a class inheriting either from ''NodeGroup'' or from ''LinkGroup''. The elements of the group can be specified with the ''@Contains'' annotation. A group can contain model elements of the corresponding type or other groups containing elements of the corresponding type. | + | A group can be specified by defining a class inheriting either from ''NodeGroup'' or from ''LinkGroup''. The elements of the group can be specified with the ''@Contains'' annotation. A group can contain model elements of the corresponding type or other groups containing elements of the corresponding type. |
<code> | <code> | ||
Line 105: | Line 105: | ||
The previously mentioned statements can be used with these groups as parameters as well. | The previously mentioned statements can be used with these groups as parameters as well. | ||
- | * ''@North(val = {A.class, B.class}, from = C.class)'' : both boxes **A** and **B** are north from **C**. The layout between **A** and **B** is not defined. | + | * ''@North(val = {A.class, B.class}, from = C.class)'' : Both boxes **A** and **B** are north from **C**. The layout between **A** and **B** is not defined. |
- | * ''@North(val = A.class, from = {B.class, C.class})'' : box **A** is north from box **B** and from box **C** as well. The layout between **B** and **C** is not defined. | + | * ''@North(val = A.class, from = {B.class, C.class})'' : Box **A** is north from box **B** and from box **C** as well. The layout between **B** and **C** is not defined. |
* ''@North(val = LG1.class, from = A.class)'' : Every element of group **LG1** is north from box **A**. The layout between the elements of **LG1** is not defined. | * ''@North(val = LG1.class, from = A.class)'' : Every element of group **LG1** is north from box **A**. The layout between the elements of **LG1** is not defined. | ||
* Can be used similarly with ''@East'', ''@South'' and ''@West''. | * Can be used similarly with ''@East'', ''@South'' and ''@West''. | ||
- | * ''@TopMost({A. class, B.class})'' : boxes **A** and **B** are north from every other boxes in the model. | + | * ''@TopMost({A. class, B.class})'' : Boxes **A** and **B** are north from every other boxes in the model. |
- | * ''@TopMost(NG1.class)'' : boxes which are elements of **LG1** are north from every other boxes in the model. | + | * ''@TopMost(NG1.class)'' : Boxes which are elements of **LG1** are north from every other boxes in the model. |
* Can be used similarly with ''@RightMost'', ''@BottomMost'' and ''@LeftMost''. | * Can be used similarly with ''@RightMost'', ''@BottomMost'' and ''@LeftMost''. | ||
Line 132: | Line 132: | ||
If we do not include a class into any statements (annotations) then the class won't appear on the diagram by itself. We can explicitly make a class appear on a diagram without restricting it's position with other statements using ''@Show''. | If we do not include a class into any statements (annotations) then the class won't appear on the diagram by itself. We can explicitly make a class appear on a diagram without restricting it's position with other statements using ''@Show''. | ||
- | ''@Show(A.class)'' : box **A** is present in the diagram. | + | ''@Show(A.class)'' : Box **A** is present in the diagram. |
Example: Model contains these classes: **A** and **B**. | Example: Model contains these classes: **A** and **B**. | ||
<code> | <code> | ||
class MyDiagram extends Diagram { | class MyDiagram extends Diagram { | ||
- | | ||
@Show(A.class) | @Show(A.class) | ||
class MyLayout extends Layout {} | class MyLayout extends Layout {} | ||
} | } | ||
</code> | </code> | ||
- | |||
===== Contradictions and other errors ===== | ===== Contradictions and other errors ===== | ||
There may be certain errors that blocks the running of the diagram layout generation process. This may occur because of: | There may be certain errors that blocks the running of the diagram layout generation process. This may occur because of: |