|
|
(13 intermediate revisions by the same user not shown) |
Line 1: |
Line 1: |
− | = Alignment Tool =
| + | [https://help.eclipse.org/2020-09/topic/org.eclipse.papyrus.infra.gmfdiag.common.doc/target/generated-eclipse-help/alignmentTool.html?cp=73_0_2_9_1 Alignment Tool (2020-09)] |
− | == Introduction ==
| + | |
− | Alignment Tool is availbale in the Papyrus toolbar:<br/>
| + | |
− | [[File:Alignment_Toolbar.JPG]]<br/>
| + | |
− | Alignment allows to align the different objects of the model based on a reference object.
| + | |
− | The reference object is basically the last object selected (primary selection) and can be identified with the handles color:<br/>
| + | |
− | {|style="margin: auto;"
| + | |
− | |[[File:normal_Align_selection.JPG|frame|Normal Selection]]
| + | |
− | |[[File:Reference_Align_selection.JPG|frame|Primary Selection]]
| + | |
− | |}
| + | |
− | <br/>
| + | |
− | To implement Alignment, some rules have been defined.
| + | |
| | | |
− | == General Rules ==
| + | [[Category:Papyrus]] |
− | [[File:Alignment_Toolbar.JPG|frame|Alignement Types]] | + | |
− | The Alignment Tools allows 6 types of alignmeent:
| + | |
− | *Horizontaly
| + | |
− | **Left
| + | |
− | **Center
| + | |
− | **Right
| + | |
− | *Verticaly
| + | |
− | **Top
| + | |
− | **Middle
| + | |
− | **Bottom
| + | |
− | | + | |
− | | + | |
− | These types can be disable if the alignment is not possible.
| + | |
− | Here is the different rules on which the alignment is based:
| + | |
− | #The alignment is available only if the selected object can be moved on the reference
| + | |
− | #When an object and one or several children should be aligned on a third object, only the parent is aligned
| + | |
− | #An object can only be aligned inside of its container's bounds.(In order to avoid scrollbar and invisible objects)
| + | |
− | #An object cannot be aligned on one of its children.
| + | |
− | | + | |
− |
| + | |
− | == Using of Alignment Tool ==
| + | |
− | Here under, some examples of using of alignment tool. <br/>
| + | |
− | === General Case ===
| + | |
− | Basically, alignment is used in order to make the model easier to be read and more aesthetical.
| + | |
− | To align objects:
| + | |
− | :* Select the object to be aligned
| + | |
− | :* Clic on the align tool button [[File:Align_button.JPG]]
| + | |
− | :* Choose the proper type of alignment
| + | |
− | <br/>
| + | |
− | #Example A: Standard alignment
| + | |
− | #:[[File:General_Align1_before.JPG]]
| + | |
− | #:[[File:General_Align1_after.JPG]]
| + | |
− | #:In this case the reference object is the right one. <br/>
| + | |
− | #Example B: Parent alignment
| + | |
− | #:In this second example, the object (the Class ) is aligned on his parent (the Package), the unauthorized alignment appears disable (in grey)
| + | |
− | #:[[File:General_Align2_before.JPG]]
| + | |
− | #:[[File:General_Align2_after.JPG]]
| + | |
− | | + | |
− | === Hierarchy ===
| + | |
− | In this section, some examples of alignment in case of hierarchy between objects (parent / children).
| + | |
− | #Example A: Only the parent is aligned
| + | |
− | #:[[File:Hierarchy _Align1_before.JPG]]
| + | |
− | #:As shown in the result screenshot below , only the parent (the Package) has been aligned.
| + | |
− | #:[[File:Hierarchy _Align1_after.JPG]]
| + | |
− | #Example B: Alignment inside the Container bounds is available
| + | |
− | #:[[File:Hierarchy _Align2_before.JPG]]
| + | |
− | #:In the align options list, only the ones that keep the objects inside his container are enable.
| + | |
− | #:[[File:Hierarchy _Align2_after.JPG]]
| + | |
− | | + | |
− | === Labels ===
| + | |
− | === Edges ===
| + | |
− | | + | |
− | == Limitation ==
| + | |