|
1 | 1 | Extension { #name : #TBlAlignable } |
2 | 2 |
|
3 | 3 | { #category : #'*Bloc-Serialization-Stash' } |
4 | | -TBlAlignable >> allSetterAndGettersOfTraitForMyStash: anObject [ |
| 4 | +TBlAlignable >> defaultStashAlignementTest [ |
5 | 5 |
|
6 | | - ^ { ([ :alignement | |
7 | | - | val | |
8 | | - val := #alignNone. |
9 | | - alignement isAlignTopLeft ifTrue: [ val := #alignTopLeft ]. |
10 | | - alignement isAlignTopCenter ifTrue: [ val := #alignTopCenter ]. |
11 | | - alignement isAlignTopRight ifTrue: [ val := #alignTopRight ]. |
12 | | - alignement isAlignCenterLeft ifTrue: [ val := #alignCenterLeft ]. |
13 | | - alignement isAlignCenter ifTrue: [ val := #alignCenter ]. |
14 | | - alignement isAlignCenterRight ifTrue: [ val := #alignCenterRight ]. |
15 | | - alignement isAlignBottomLeft ifTrue: [ val := #alignBottomLeft ]. |
16 | | - alignement isAlignBottomCenter ifTrue: [ |
17 | | - val := #alignBottomCenter ]. |
18 | | - alignement isAlignBottomRight ifTrue: [ val := #alignBottomRight ]. |
19 | | - val ] -> self) onlySetOnStash } |
| 6 | + ^ (self verticalAlignment == self defaultVerticalAlignment and: [ |
| 7 | + self horizontalAlignment == self defaultHorizontalAlignment ]) |
| 8 | +] |
| 9 | + |
| 10 | +{ #category : #'*Bloc-Serialization-Stash' } |
| 11 | +TBlAlignable >> stashAccessorForTBlAlignable [ |
| 12 | + |
| 13 | + <stashAccessors> |
| 14 | + self defaultStashAlignementTest ifTrue: [ ^ { } ]. |
| 15 | + self isAlignTopLeft ifTrue: [ ^ { #alignTopLeft onlySetOnStash } ]. |
| 16 | + self isAlignTopCenter ifTrue: [ ^ { #alignTopCenter onlySetOnStash } ]. |
| 17 | + self isAlignTopRight ifTrue: [ ^ { #alignTopRight onlySetOnStash } ]. |
| 18 | + self isAlignCenterLeft ifTrue: [ |
| 19 | + ^ { #alignCenterLeft onlySetOnStash } ]. |
| 20 | + self isAlignCenter ifTrue: [ ^ { #alignCenter onlySetOnStash } ]. |
| 21 | + self isAlignCenterRight ifTrue: [ |
| 22 | + ^ { #alignCenterRight onlySetOnStash } ]. |
| 23 | + self isAlignBottomLeft ifTrue: [ |
| 24 | + ^ { #alignBottomLeft onlySetOnStash } ]. |
| 25 | + self isAlignBottomCenter ifTrue: [ |
| 26 | + ^ { #alignBottomCenter onlySetOnStash } ]. |
| 27 | + self isAlignBottomRight ifTrue: [ |
| 28 | + ^ { #alignBottomRight onlySetOnStash } ]. |
| 29 | + ^ { } |
20 | 30 | ] |
0 commit comments