author | Stefan Vogel <sv@exept.de> |
Fri, 06 Jun 2014 09:30:32 +0200 | |
changeset 4607 | 5bf44eae56b2 |
parent 4588 | 7aebb93f46c6 |
child 4622 | ee2ff15466e2 |
permissions | -rw-r--r-- |
1716 | 1 |
" |
2 |
COPYRIGHT (c) 1997 by eXept Software AG |
|
3 |
All Rights Reserved |
|
4 |
||
5 |
This software is furnished under a license and may be used |
|
6 |
only in accordance with the terms of that license and with the |
|
7 |
inclusion of the above copyright notice. This software may not |
|
8 |
be provided or otherwise made available to, or used by, any |
|
9 |
other person. No title to or ownership of the software is |
|
10 |
hereby transferred. |
|
11 |
" |
|
1818 | 12 |
"{ Package: 'stx:libwidg2' }" |
13 |
||
1150 | 14 |
Object subclass:#DataSetLabel |
3772 | 15 |
instanceVariableNames:'label selector argument adjust font fgColor bgColor |
16 |
preferredHeight preferredWidth description' |
|
17 |
classVariableNames:'' |
|
18 |
poolDictionaries:'' |
|
19 |
category:'Views-DataSet' |
|
1150 | 20 |
! |
21 |
||
1716 | 22 |
!DataSetLabel class methodsFor:'documentation'! |
23 |
||
24 |
copyright |
|
25 |
" |
|
26 |
COPYRIGHT (c) 1997 by eXept Software AG |
|
27 |
All Rights Reserved |
|
28 |
||
29 |
This software is furnished under a license and may be used |
|
30 |
only in accordance with the terms of that license and with the |
|
31 |
inclusion of the above copyright notice. This software may not |
|
32 |
be provided or otherwise made available to, or used by, any |
|
33 |
other person. No title to or ownership of the software is |
|
34 |
hereby transferred. |
|
35 |
" |
|
36 |
||
37 |
||
38 |
||
39 |
||
3649 | 40 |
! |
41 |
||
42 |
documentation |
|
43 |
" |
|
44 |
This class keeps some info about a label. |
|
45 |
||
46 |
[author:] |
|
47 |
Claus Atzkern |
|
48 |
" |
|
49 |
! ! |
|
50 |
||
51 |
!DataSetLabel class methodsFor:'image specs'! |
|
52 |
||
53 |
sortIndicator |
|
4588
7aebb93f46c6
Use ImageMask instead of Depth1Image for masks
Stefan Vogel <sv@exept.de>
parents:
4549
diff
changeset
|
54 |
<resource: #image> |
3649 | 55 |
"This resource specification was automatically generated |
56 |
by the ImageEditor of ST/X." |
|
57 |
"Do not manually edit this!! If it is corrupted, |
|
58 |
the ImageEditor may not be able to read the specification." |
|
59 |
" |
|
60 |
self sortIndicator inspect |
|
61 |
ImageEditor openOnClass:self andSelector:#sortIndicator |
|
4588
7aebb93f46c6
Use ImageMask instead of Depth1Image for masks
Stefan Vogel <sv@exept.de>
parents:
4549
diff
changeset
|
62 |
Icon flushCachedIcons" |
7aebb93f46c6
Use ImageMask instead of Depth1Image for masks
Stefan Vogel <sv@exept.de>
parents:
4549
diff
changeset
|
63 |
|
7aebb93f46c6
Use ImageMask instead of Depth1Image for masks
Stefan Vogel <sv@exept.de>
parents:
4549
diff
changeset
|
64 |
^ Icon constantNamed:'DataSetLabel class sortIndicator' |
7aebb93f46c6
Use ImageMask instead of Depth1Image for masks
Stefan Vogel <sv@exept.de>
parents:
4549
diff
changeset
|
65 |
ifAbsentPut:[ |
7aebb93f46c6
Use ImageMask instead of Depth1Image for masks
Stefan Vogel <sv@exept.de>
parents:
4549
diff
changeset
|
66 |
(Depth1Image new) |
7aebb93f46c6
Use ImageMask instead of Depth1Image for masks
Stefan Vogel <sv@exept.de>
parents:
4549
diff
changeset
|
67 |
width:7; |
7aebb93f46c6
Use ImageMask instead of Depth1Image for masks
Stefan Vogel <sv@exept.de>
parents:
4549
diff
changeset
|
68 |
height:4; |
7aebb93f46c6
Use ImageMask instead of Depth1Image for masks
Stefan Vogel <sv@exept.de>
parents:
4549
diff
changeset
|
69 |
photometric:(#palette); |
7aebb93f46c6
Use ImageMask instead of Depth1Image for masks
Stefan Vogel <sv@exept.de>
parents:
4549
diff
changeset
|
70 |
bitsPerSample:(#( 1 )); |
7aebb93f46c6
Use ImageMask instead of Depth1Image for masks
Stefan Vogel <sv@exept.de>
parents:
4549
diff
changeset
|
71 |
samplesPerPixel:(1); |
7aebb93f46c6
Use ImageMask instead of Depth1Image for masks
Stefan Vogel <sv@exept.de>
parents:
4549
diff
changeset
|
72 |
bits:(ByteArray fromPackedString:'@@B@0 @a'); |
7aebb93f46c6
Use ImageMask instead of Depth1Image for masks
Stefan Vogel <sv@exept.de>
parents:
4549
diff
changeset
|
73 |
colorMapFromArray:#[ 0 0 0 255 255 255 ]; |
7aebb93f46c6
Use ImageMask instead of Depth1Image for masks
Stefan Vogel <sv@exept.de>
parents:
4549
diff
changeset
|
74 |
mask:((ImageMask new) |
7aebb93f46c6
Use ImageMask instead of Depth1Image for masks
Stefan Vogel <sv@exept.de>
parents:
4549
diff
changeset
|
75 |
width:7; |
7aebb93f46c6
Use ImageMask instead of Depth1Image for masks
Stefan Vogel <sv@exept.de>
parents:
4549
diff
changeset
|
76 |
height:4; |
7aebb93f46c6
Use ImageMask instead of Depth1Image for masks
Stefan Vogel <sv@exept.de>
parents:
4549
diff
changeset
|
77 |
bits:(ByteArray fromPackedString:'?''08D@@a'); |
7aebb93f46c6
Use ImageMask instead of Depth1Image for masks
Stefan Vogel <sv@exept.de>
parents:
4549
diff
changeset
|
78 |
yourself); |
7aebb93f46c6
Use ImageMask instead of Depth1Image for masks
Stefan Vogel <sv@exept.de>
parents:
4549
diff
changeset
|
79 |
yourself |
7aebb93f46c6
Use ImageMask instead of Depth1Image for masks
Stefan Vogel <sv@exept.de>
parents:
4549
diff
changeset
|
80 |
] |
3649 | 81 |
! |
82 |
||
3763 | 83 |
sortIndicatorGrey |
4588
7aebb93f46c6
Use ImageMask instead of Depth1Image for masks
Stefan Vogel <sv@exept.de>
parents:
4549
diff
changeset
|
84 |
<resource: #image> |
3763 | 85 |
"This resource specification was automatically generated |
86 |
by the ImageEditor of ST/X." |
|
87 |
"Do not manually edit this!! If it is corrupted, |
|
88 |
the ImageEditor may not be able to read the specification." |
|
89 |
" |
|
90 |
self sortIndicatorGrey inspect |
|
91 |
ImageEditor openOnClass:self andSelector:#sortIndicatorGrey |
|
4588
7aebb93f46c6
Use ImageMask instead of Depth1Image for masks
Stefan Vogel <sv@exept.de>
parents:
4549
diff
changeset
|
92 |
Icon flushCachedIcons" |
7aebb93f46c6
Use ImageMask instead of Depth1Image for masks
Stefan Vogel <sv@exept.de>
parents:
4549
diff
changeset
|
93 |
|
7aebb93f46c6
Use ImageMask instead of Depth1Image for masks
Stefan Vogel <sv@exept.de>
parents:
4549
diff
changeset
|
94 |
^ Icon constantNamed:#'DataSetLabel class sortIndicatorGrey' |
7aebb93f46c6
Use ImageMask instead of Depth1Image for masks
Stefan Vogel <sv@exept.de>
parents:
4549
diff
changeset
|
95 |
ifAbsentPut:[ |
7aebb93f46c6
Use ImageMask instead of Depth1Image for masks
Stefan Vogel <sv@exept.de>
parents:
4549
diff
changeset
|
96 |
(Depth1Image new) |
7aebb93f46c6
Use ImageMask instead of Depth1Image for masks
Stefan Vogel <sv@exept.de>
parents:
4549
diff
changeset
|
97 |
width:7; |
7aebb93f46c6
Use ImageMask instead of Depth1Image for masks
Stefan Vogel <sv@exept.de>
parents:
4549
diff
changeset
|
98 |
height:5; |
7aebb93f46c6
Use ImageMask instead of Depth1Image for masks
Stefan Vogel <sv@exept.de>
parents:
4549
diff
changeset
|
99 |
photometric:(#palette); |
7aebb93f46c6
Use ImageMask instead of Depth1Image for masks
Stefan Vogel <sv@exept.de>
parents:
4549
diff
changeset
|
100 |
bitsPerSample:(#( 1 )); |
7aebb93f46c6
Use ImageMask instead of Depth1Image for masks
Stefan Vogel <sv@exept.de>
parents:
4549
diff
changeset
|
101 |
samplesPerPixel:(1); |
7aebb93f46c6
Use ImageMask instead of Depth1Image for masks
Stefan Vogel <sv@exept.de>
parents:
4549
diff
changeset
|
102 |
bits:(ByteArray fromPackedString:'@@@@@@@b'); |
7aebb93f46c6
Use ImageMask instead of Depth1Image for masks
Stefan Vogel <sv@exept.de>
parents:
4549
diff
changeset
|
103 |
colorMapFromArray:#[ 0 0 0 255 255 255 ]; |
7aebb93f46c6
Use ImageMask instead of Depth1Image for masks
Stefan Vogel <sv@exept.de>
parents:
4549
diff
changeset
|
104 |
mask:((ImageMask new) |
7aebb93f46c6
Use ImageMask instead of Depth1Image for masks
Stefan Vogel <sv@exept.de>
parents:
4549
diff
changeset
|
105 |
width:7; |
7aebb93f46c6
Use ImageMask instead of Depth1Image for masks
Stefan Vogel <sv@exept.de>
parents:
4549
diff
changeset
|
106 |
height:5; |
7aebb93f46c6
Use ImageMask instead of Depth1Image for masks
Stefan Vogel <sv@exept.de>
parents:
4549
diff
changeset
|
107 |
bits:(ByteArray fromPackedString:'@A@(UJ(b'); |
7aebb93f46c6
Use ImageMask instead of Depth1Image for masks
Stefan Vogel <sv@exept.de>
parents:
4549
diff
changeset
|
108 |
yourself); |
7aebb93f46c6
Use ImageMask instead of Depth1Image for masks
Stefan Vogel <sv@exept.de>
parents:
4549
diff
changeset
|
109 |
yourself |
7aebb93f46c6
Use ImageMask instead of Depth1Image for masks
Stefan Vogel <sv@exept.de>
parents:
4549
diff
changeset
|
110 |
] |
3763 | 111 |
! |
112 |
||
3768 | 113 |
sortIndicatorGreyIcon |
114 |
^ ToolbarIconLibrary sortIndicatorGreyIcon |
|
115 |
! |
|
116 |
||
117 |
sortIndicatorIcon |
|
4588
7aebb93f46c6
Use ImageMask instead of Depth1Image for masks
Stefan Vogel <sv@exept.de>
parents:
4549
diff
changeset
|
118 |
<resource: #image> |
3768 | 119 |
"This resource specification was automatically generated |
120 |
by the ImageEditor of ST/X." |
|
121 |
"Do not manually edit this!! If it is corrupted, |
|
122 |
the ImageEditor may not be able to read the specification." |
|
123 |
" |
|
124 |
self sortIndicatorIcon inspect |
|
125 |
ImageEditor openOnClass:self andSelector:#sortIndicatorIcon |
|
4588
7aebb93f46c6
Use ImageMask instead of Depth1Image for masks
Stefan Vogel <sv@exept.de>
parents:
4549
diff
changeset
|
126 |
Icon flushCachedIcons" |
7aebb93f46c6
Use ImageMask instead of Depth1Image for masks
Stefan Vogel <sv@exept.de>
parents:
4549
diff
changeset
|
127 |
|
7aebb93f46c6
Use ImageMask instead of Depth1Image for masks
Stefan Vogel <sv@exept.de>
parents:
4549
diff
changeset
|
128 |
^ Icon constantNamed:'DataSetLabel class sortIndicatorIcon' |
7aebb93f46c6
Use ImageMask instead of Depth1Image for masks
Stefan Vogel <sv@exept.de>
parents:
4549
diff
changeset
|
129 |
ifAbsentPut:[ |
7aebb93f46c6
Use ImageMask instead of Depth1Image for masks
Stefan Vogel <sv@exept.de>
parents:
4549
diff
changeset
|
130 |
(Depth1Image new) |
7aebb93f46c6
Use ImageMask instead of Depth1Image for masks
Stefan Vogel <sv@exept.de>
parents:
4549
diff
changeset
|
131 |
width:7; |
7aebb93f46c6
Use ImageMask instead of Depth1Image for masks
Stefan Vogel <sv@exept.de>
parents:
4549
diff
changeset
|
132 |
height:4; |
7aebb93f46c6
Use ImageMask instead of Depth1Image for masks
Stefan Vogel <sv@exept.de>
parents:
4549
diff
changeset
|
133 |
photometric:(#palette); |
7aebb93f46c6
Use ImageMask instead of Depth1Image for masks
Stefan Vogel <sv@exept.de>
parents:
4549
diff
changeset
|
134 |
bitsPerSample:(#( 1 )); |
7aebb93f46c6
Use ImageMask instead of Depth1Image for masks
Stefan Vogel <sv@exept.de>
parents:
4549
diff
changeset
|
135 |
samplesPerPixel:(1); |
7aebb93f46c6
Use ImageMask instead of Depth1Image for masks
Stefan Vogel <sv@exept.de>
parents:
4549
diff
changeset
|
136 |
bits:(ByteArray fromPackedString:'@@B@0 @a'); |
7aebb93f46c6
Use ImageMask instead of Depth1Image for masks
Stefan Vogel <sv@exept.de>
parents:
4549
diff
changeset
|
137 |
colorMapFromArray:#[ 0 0 0 255 255 255 ]; |
7aebb93f46c6
Use ImageMask instead of Depth1Image for masks
Stefan Vogel <sv@exept.de>
parents:
4549
diff
changeset
|
138 |
mask:((ImageMask new) |
7aebb93f46c6
Use ImageMask instead of Depth1Image for masks
Stefan Vogel <sv@exept.de>
parents:
4549
diff
changeset
|
139 |
width:7; |
7aebb93f46c6
Use ImageMask instead of Depth1Image for masks
Stefan Vogel <sv@exept.de>
parents:
4549
diff
changeset
|
140 |
height:4; |
7aebb93f46c6
Use ImageMask instead of Depth1Image for masks
Stefan Vogel <sv@exept.de>
parents:
4549
diff
changeset
|
141 |
bits:(ByteArray fromPackedString:'?''08D@@a'); |
7aebb93f46c6
Use ImageMask instead of Depth1Image for masks
Stefan Vogel <sv@exept.de>
parents:
4549
diff
changeset
|
142 |
yourself); |
7aebb93f46c6
Use ImageMask instead of Depth1Image for masks
Stefan Vogel <sv@exept.de>
parents:
4549
diff
changeset
|
143 |
yourself |
7aebb93f46c6
Use ImageMask instead of Depth1Image for masks
Stefan Vogel <sv@exept.de>
parents:
4549
diff
changeset
|
144 |
] |
3768 | 145 |
! |
146 |
||
3649 | 147 |
sortReverseIndicator |
4588
7aebb93f46c6
Use ImageMask instead of Depth1Image for masks
Stefan Vogel <sv@exept.de>
parents:
4549
diff
changeset
|
148 |
<resource: #image> |
3649 | 149 |
"This resource specification was automatically generated |
150 |
by the ImageEditor of ST/X." |
|
151 |
"Do not manually edit this!! If it is corrupted, |
|
152 |
the ImageEditor may not be able to read the specification." |
|
153 |
" |
|
154 |
self sortReverseIndicator inspect |
|
155 |
ImageEditor openOnClass:self andSelector:#sortReverseIndicator |
|
4588
7aebb93f46c6
Use ImageMask instead of Depth1Image for masks
Stefan Vogel <sv@exept.de>
parents:
4549
diff
changeset
|
156 |
Icon flushCachedIcons" |
7aebb93f46c6
Use ImageMask instead of Depth1Image for masks
Stefan Vogel <sv@exept.de>
parents:
4549
diff
changeset
|
157 |
|
7aebb93f46c6
Use ImageMask instead of Depth1Image for masks
Stefan Vogel <sv@exept.de>
parents:
4549
diff
changeset
|
158 |
^ Icon constantNamed:'DataSetLabel class sortReverseIndicator' |
7aebb93f46c6
Use ImageMask instead of Depth1Image for masks
Stefan Vogel <sv@exept.de>
parents:
4549
diff
changeset
|
159 |
ifAbsentPut:[ |
7aebb93f46c6
Use ImageMask instead of Depth1Image for masks
Stefan Vogel <sv@exept.de>
parents:
4549
diff
changeset
|
160 |
(Depth1Image new) |
7aebb93f46c6
Use ImageMask instead of Depth1Image for masks
Stefan Vogel <sv@exept.de>
parents:
4549
diff
changeset
|
161 |
width:7; |
7aebb93f46c6
Use ImageMask instead of Depth1Image for masks
Stefan Vogel <sv@exept.de>
parents:
4549
diff
changeset
|
162 |
height:4; |
7aebb93f46c6
Use ImageMask instead of Depth1Image for masks
Stefan Vogel <sv@exept.de>
parents:
4549
diff
changeset
|
163 |
photometric:(#palette); |
7aebb93f46c6
Use ImageMask instead of Depth1Image for masks
Stefan Vogel <sv@exept.de>
parents:
4549
diff
changeset
|
164 |
bitsPerSample:(#( 1 )); |
7aebb93f46c6
Use ImageMask instead of Depth1Image for masks
Stefan Vogel <sv@exept.de>
parents:
4549
diff
changeset
|
165 |
samplesPerPixel:(1); |
7aebb93f46c6
Use ImageMask instead of Depth1Image for masks
Stefan Vogel <sv@exept.de>
parents:
4549
diff
changeset
|
166 |
bits:(ByteArray fromPackedString:'0(@@@@@a'); |
7aebb93f46c6
Use ImageMask instead of Depth1Image for masks
Stefan Vogel <sv@exept.de>
parents:
4549
diff
changeset
|
167 |
colorMapFromArray:#[ 0 0 0 255 255 255 ]; |
7aebb93f46c6
Use ImageMask instead of Depth1Image for masks
Stefan Vogel <sv@exept.de>
parents:
4549
diff
changeset
|
168 |
mask:((ImageMask new) |
7aebb93f46c6
Use ImageMask instead of Depth1Image for masks
Stefan Vogel <sv@exept.de>
parents:
4549
diff
changeset
|
169 |
width:7; |
7aebb93f46c6
Use ImageMask instead of Depth1Image for masks
Stefan Vogel <sv@exept.de>
parents:
4549
diff
changeset
|
170 |
height:4; |
7aebb93f46c6
Use ImageMask instead of Depth1Image for masks
Stefan Vogel <sv@exept.de>
parents:
4549
diff
changeset
|
171 |
bits:(ByteArray fromPackedString:'DC!!<? @a'); |
7aebb93f46c6
Use ImageMask instead of Depth1Image for masks
Stefan Vogel <sv@exept.de>
parents:
4549
diff
changeset
|
172 |
yourself); |
7aebb93f46c6
Use ImageMask instead of Depth1Image for masks
Stefan Vogel <sv@exept.de>
parents:
4549
diff
changeset
|
173 |
yourself |
7aebb93f46c6
Use ImageMask instead of Depth1Image for masks
Stefan Vogel <sv@exept.de>
parents:
4549
diff
changeset
|
174 |
] |
3763 | 175 |
! |
176 |
||
177 |
sortReverseIndicatorGrey |
|
4588
7aebb93f46c6
Use ImageMask instead of Depth1Image for masks
Stefan Vogel <sv@exept.de>
parents:
4549
diff
changeset
|
178 |
<resource: #image> |
3763 | 179 |
"This resource specification was automatically generated |
180 |
by the ImageEditor of ST/X." |
|
181 |
"Do not manually edit this!! If it is corrupted, |
|
182 |
the ImageEditor may not be able to read the specification." |
|
183 |
" |
|
184 |
self sortReverseIndicatorGrey inspect |
|
185 |
ImageEditor openOnClass:self andSelector:#sortReverseIndicatorGrey |
|
4588
7aebb93f46c6
Use ImageMask instead of Depth1Image for masks
Stefan Vogel <sv@exept.de>
parents:
4549
diff
changeset
|
186 |
Icon flushCachedIcons" |
7aebb93f46c6
Use ImageMask instead of Depth1Image for masks
Stefan Vogel <sv@exept.de>
parents:
4549
diff
changeset
|
187 |
|
7aebb93f46c6
Use ImageMask instead of Depth1Image for masks
Stefan Vogel <sv@exept.de>
parents:
4549
diff
changeset
|
188 |
^ Icon constantNamed:#'DataSetLabel class sortReverseIndicatorGrey' |
7aebb93f46c6
Use ImageMask instead of Depth1Image for masks
Stefan Vogel <sv@exept.de>
parents:
4549
diff
changeset
|
189 |
ifAbsentPut:[ |
7aebb93f46c6
Use ImageMask instead of Depth1Image for masks
Stefan Vogel <sv@exept.de>
parents:
4549
diff
changeset
|
190 |
(Depth1Image new) |
7aebb93f46c6
Use ImageMask instead of Depth1Image for masks
Stefan Vogel <sv@exept.de>
parents:
4549
diff
changeset
|
191 |
width:7; |
7aebb93f46c6
Use ImageMask instead of Depth1Image for masks
Stefan Vogel <sv@exept.de>
parents:
4549
diff
changeset
|
192 |
height:5; |
7aebb93f46c6
Use ImageMask instead of Depth1Image for masks
Stefan Vogel <sv@exept.de>
parents:
4549
diff
changeset
|
193 |
photometric:(#palette); |
7aebb93f46c6
Use ImageMask instead of Depth1Image for masks
Stefan Vogel <sv@exept.de>
parents:
4549
diff
changeset
|
194 |
bitsPerSample:(#( 1 )); |
7aebb93f46c6
Use ImageMask instead of Depth1Image for masks
Stefan Vogel <sv@exept.de>
parents:
4549
diff
changeset
|
195 |
samplesPerPixel:(1); |
7aebb93f46c6
Use ImageMask instead of Depth1Image for masks
Stefan Vogel <sv@exept.de>
parents:
4549
diff
changeset
|
196 |
bits:(ByteArray fromPackedString:'@@@@@@@b'); |
7aebb93f46c6
Use ImageMask instead of Depth1Image for masks
Stefan Vogel <sv@exept.de>
parents:
4549
diff
changeset
|
197 |
colorMapFromArray:#[ 0 0 0 255 255 255 ]; |
7aebb93f46c6
Use ImageMask instead of Depth1Image for masks
Stefan Vogel <sv@exept.de>
parents:
4549
diff
changeset
|
198 |
mask:((ImageMask new) |
7aebb93f46c6
Use ImageMask instead of Depth1Image for masks
Stefan Vogel <sv@exept.de>
parents:
4549
diff
changeset
|
199 |
width:7; |
7aebb93f46c6
Use ImageMask instead of Depth1Image for masks
Stefan Vogel <sv@exept.de>
parents:
4549
diff
changeset
|
200 |
height:5; |
7aebb93f46c6
Use ImageMask instead of Depth1Image for masks
Stefan Vogel <sv@exept.de>
parents:
4549
diff
changeset
|
201 |
bits:(ByteArray fromPackedString:'*%P(D@@b'); |
7aebb93f46c6
Use ImageMask instead of Depth1Image for masks
Stefan Vogel <sv@exept.de>
parents:
4549
diff
changeset
|
202 |
yourself); |
7aebb93f46c6
Use ImageMask instead of Depth1Image for masks
Stefan Vogel <sv@exept.de>
parents:
4549
diff
changeset
|
203 |
yourself |
7aebb93f46c6
Use ImageMask instead of Depth1Image for masks
Stefan Vogel <sv@exept.de>
parents:
4549
diff
changeset
|
204 |
] |
3768 | 205 |
! |
206 |
||
207 |
sortReverseIndicatorGreyIcon |
|
4588
7aebb93f46c6
Use ImageMask instead of Depth1Image for masks
Stefan Vogel <sv@exept.de>
parents:
4549
diff
changeset
|
208 |
<resource: #image> |
3768 | 209 |
"This resource specification was automatically generated |
210 |
by the ImageEditor of ST/X." |
|
211 |
"Do not manually edit this!! If it is corrupted, |
|
212 |
the ImageEditor may not be able to read the specification." |
|
213 |
" |
|
214 |
self sortReverseIndicatorGreyIcon inspect |
|
215 |
ImageEditor openOnClass:self andSelector:#sortReverseIndicatorGreyIcon |
|
4588
7aebb93f46c6
Use ImageMask instead of Depth1Image for masks
Stefan Vogel <sv@exept.de>
parents:
4549
diff
changeset
|
216 |
Icon flushCachedIcons" |
7aebb93f46c6
Use ImageMask instead of Depth1Image for masks
Stefan Vogel <sv@exept.de>
parents:
4549
diff
changeset
|
217 |
|
7aebb93f46c6
Use ImageMask instead of Depth1Image for masks
Stefan Vogel <sv@exept.de>
parents:
4549
diff
changeset
|
218 |
^ Icon constantNamed:#'DataSetLabel class sortReverseIndicatorGreyIcon' |
7aebb93f46c6
Use ImageMask instead of Depth1Image for masks
Stefan Vogel <sv@exept.de>
parents:
4549
diff
changeset
|
219 |
ifAbsentPut:[ |
7aebb93f46c6
Use ImageMask instead of Depth1Image for masks
Stefan Vogel <sv@exept.de>
parents:
4549
diff
changeset
|
220 |
(Depth1Image new) |
7aebb93f46c6
Use ImageMask instead of Depth1Image for masks
Stefan Vogel <sv@exept.de>
parents:
4549
diff
changeset
|
221 |
width:7; |
7aebb93f46c6
Use ImageMask instead of Depth1Image for masks
Stefan Vogel <sv@exept.de>
parents:
4549
diff
changeset
|
222 |
height:5; |
7aebb93f46c6
Use ImageMask instead of Depth1Image for masks
Stefan Vogel <sv@exept.de>
parents:
4549
diff
changeset
|
223 |
photometric:(#palette); |
7aebb93f46c6
Use ImageMask instead of Depth1Image for masks
Stefan Vogel <sv@exept.de>
parents:
4549
diff
changeset
|
224 |
bitsPerSample:(#( 1 )); |
7aebb93f46c6
Use ImageMask instead of Depth1Image for masks
Stefan Vogel <sv@exept.de>
parents:
4549
diff
changeset
|
225 |
samplesPerPixel:(1); |
7aebb93f46c6
Use ImageMask instead of Depth1Image for masks
Stefan Vogel <sv@exept.de>
parents:
4549
diff
changeset
|
226 |
bits:(ByteArray fromPackedString:'@@@@@@@b'); |
7aebb93f46c6
Use ImageMask instead of Depth1Image for masks
Stefan Vogel <sv@exept.de>
parents:
4549
diff
changeset
|
227 |
colorMapFromArray:#[ 0 0 0 255 255 255 ]; |
7aebb93f46c6
Use ImageMask instead of Depth1Image for masks
Stefan Vogel <sv@exept.de>
parents:
4549
diff
changeset
|
228 |
mask:((ImageMask new) |
7aebb93f46c6
Use ImageMask instead of Depth1Image for masks
Stefan Vogel <sv@exept.de>
parents:
4549
diff
changeset
|
229 |
width:7; |
7aebb93f46c6
Use ImageMask instead of Depth1Image for masks
Stefan Vogel <sv@exept.de>
parents:
4549
diff
changeset
|
230 |
height:5; |
7aebb93f46c6
Use ImageMask instead of Depth1Image for masks
Stefan Vogel <sv@exept.de>
parents:
4549
diff
changeset
|
231 |
bits:(ByteArray fromPackedString:'*%P(D@@b'); |
7aebb93f46c6
Use ImageMask instead of Depth1Image for masks
Stefan Vogel <sv@exept.de>
parents:
4549
diff
changeset
|
232 |
yourself); |
7aebb93f46c6
Use ImageMask instead of Depth1Image for masks
Stefan Vogel <sv@exept.de>
parents:
4549
diff
changeset
|
233 |
yourself |
7aebb93f46c6
Use ImageMask instead of Depth1Image for masks
Stefan Vogel <sv@exept.de>
parents:
4549
diff
changeset
|
234 |
] |
3768 | 235 |
! |
236 |
||
237 |
sortReverseIndicatorIcon |
|
4588
7aebb93f46c6
Use ImageMask instead of Depth1Image for masks
Stefan Vogel <sv@exept.de>
parents:
4549
diff
changeset
|
238 |
<resource: #image> |
3768 | 239 |
"This resource specification was automatically generated |
240 |
by the ImageEditor of ST/X." |
|
241 |
"Do not manually edit this!! If it is corrupted, |
|
242 |
the ImageEditor may not be able to read the specification." |
|
243 |
" |
|
244 |
self sortReverseIndicatorIcon inspect |
|
245 |
ImageEditor openOnClass:self andSelector:#sortReverseIndicatorIcon |
|
4588
7aebb93f46c6
Use ImageMask instead of Depth1Image for masks
Stefan Vogel <sv@exept.de>
parents:
4549
diff
changeset
|
246 |
Icon flushCachedIcons" |
7aebb93f46c6
Use ImageMask instead of Depth1Image for masks
Stefan Vogel <sv@exept.de>
parents:
4549
diff
changeset
|
247 |
|
7aebb93f46c6
Use ImageMask instead of Depth1Image for masks
Stefan Vogel <sv@exept.de>
parents:
4549
diff
changeset
|
248 |
^ Icon constantNamed:'DataSetLabel class sortReverseIndicatorIcon' |
7aebb93f46c6
Use ImageMask instead of Depth1Image for masks
Stefan Vogel <sv@exept.de>
parents:
4549
diff
changeset
|
249 |
ifAbsentPut:[ |
7aebb93f46c6
Use ImageMask instead of Depth1Image for masks
Stefan Vogel <sv@exept.de>
parents:
4549
diff
changeset
|
250 |
(Depth1Image new) |
7aebb93f46c6
Use ImageMask instead of Depth1Image for masks
Stefan Vogel <sv@exept.de>
parents:
4549
diff
changeset
|
251 |
width:7; |
7aebb93f46c6
Use ImageMask instead of Depth1Image for masks
Stefan Vogel <sv@exept.de>
parents:
4549
diff
changeset
|
252 |
height:4; |
7aebb93f46c6
Use ImageMask instead of Depth1Image for masks
Stefan Vogel <sv@exept.de>
parents:
4549
diff
changeset
|
253 |
photometric:(#palette); |
7aebb93f46c6
Use ImageMask instead of Depth1Image for masks
Stefan Vogel <sv@exept.de>
parents:
4549
diff
changeset
|
254 |
bitsPerSample:(#( 1 )); |
7aebb93f46c6
Use ImageMask instead of Depth1Image for masks
Stefan Vogel <sv@exept.de>
parents:
4549
diff
changeset
|
255 |
samplesPerPixel:(1); |
7aebb93f46c6
Use ImageMask instead of Depth1Image for masks
Stefan Vogel <sv@exept.de>
parents:
4549
diff
changeset
|
256 |
bits:(ByteArray fromPackedString:'0(@@@@@a'); |
7aebb93f46c6
Use ImageMask instead of Depth1Image for masks
Stefan Vogel <sv@exept.de>
parents:
4549
diff
changeset
|
257 |
colorMapFromArray:#[ 0 0 0 255 255 255 ]; |
7aebb93f46c6
Use ImageMask instead of Depth1Image for masks
Stefan Vogel <sv@exept.de>
parents:
4549
diff
changeset
|
258 |
mask:((ImageMask new) |
7aebb93f46c6
Use ImageMask instead of Depth1Image for masks
Stefan Vogel <sv@exept.de>
parents:
4549
diff
changeset
|
259 |
width:7; |
7aebb93f46c6
Use ImageMask instead of Depth1Image for masks
Stefan Vogel <sv@exept.de>
parents:
4549
diff
changeset
|
260 |
height:4; |
7aebb93f46c6
Use ImageMask instead of Depth1Image for masks
Stefan Vogel <sv@exept.de>
parents:
4549
diff
changeset
|
261 |
bits:(ByteArray fromPackedString:'DC!!<? @a'); |
7aebb93f46c6
Use ImageMask instead of Depth1Image for masks
Stefan Vogel <sv@exept.de>
parents:
4549
diff
changeset
|
262 |
yourself); |
7aebb93f46c6
Use ImageMask instead of Depth1Image for masks
Stefan Vogel <sv@exept.de>
parents:
4549
diff
changeset
|
263 |
yourself |
7aebb93f46c6
Use ImageMask instead of Depth1Image for masks
Stefan Vogel <sv@exept.de>
parents:
4549
diff
changeset
|
264 |
] |
1716 | 265 |
! ! |
1150 | 266 |
|
1818 | 267 |
!DataSetLabel methodsFor:'accessing-colors'! |
1150 | 268 |
|
269 |
backgroundColor |
|
1487 | 270 |
"returns the background color or nil |
1150 | 271 |
" |
272 |
^ bgColor |
|
273 |
||
274 |
||
275 |
! |
|
276 |
||
2699 | 277 |
backgroundColor:aColor |
278 |
"set the background color or nil |
|
279 |
" |
|
280 |
bgColor := aColor |
|
281 |
! |
|
282 |
||
1150 | 283 |
foregroundColor |
1487 | 284 |
"returns the foreground color or nil |
1150 | 285 |
" |
286 |
^ fgColor |
|
287 |
||
2699 | 288 |
! |
289 |
||
290 |
foregroundColor:aColor |
|
291 |
"set the foreground color or nil |
|
292 |
" |
|
293 |
fgColor := aColor |
|
1150 | 294 |
! ! |
295 |
||
1818 | 296 |
!DataSetLabel methodsFor:'accessing-dimensions'! |
1150 | 297 |
|
1487 | 298 |
preferredHeight |
299 |
"returns my preferred height |
|
1150 | 300 |
" |
1487 | 301 |
^ preferredHeight |
1150 | 302 |
! |
303 |
||
1487 | 304 |
preferredWidth |
305 |
"returns my preferred width |
|
1150 | 306 |
" |
1487 | 307 |
^ preferredWidth |
1150 | 308 |
! ! |
309 |
||
310 |
!DataSetLabel methodsFor:'drawing'! |
|
311 |
||
3649 | 312 |
redrawX:xLeft w:width h:height inset:inset on:aLabelView |
1150 | 313 |
"redraw the label; the background is cleared and the paint is set |
314 |
" |
|
3763 | 315 |
|y0 x iconOffset gcFont labelWidth |
3768 | 316 |
netWidth goodLookingVerticalSpacing colNr sortIcon| |
1150 | 317 |
|
318 |
label isNil ifTrue:[ ^ self ]. |
|
319 |
||
1487 | 320 |
font notNil ifTrue:[ |
3649 | 321 |
gcFont := aLabelView font. "save original font" |
322 |
aLabelView font:font. |
|
1487 | 323 |
]. |
3582
2927b1b12e8f
Get the label from a value holder
Stefan Vogel <sv@exept.de>
parents:
3553
diff
changeset
|
324 |
|
2927b1b12e8f
Get the label from a value holder
Stefan Vogel <sv@exept.de>
parents:
3553
diff
changeset
|
325 |
y0 := (height - preferredHeight) // 2. |
3649 | 326 |
goodLookingVerticalSpacing := aLabelView font descent. |
3490
f46a3c50dc15
preferredExtent changes & fixes (ubs)
Claus Gittinger <cg@exept.de>
parents:
3468
diff
changeset
|
327 |
y0 := y0 + goodLookingVerticalSpacing. |
1150 | 328 |
|
2144 | 329 |
netWidth := width-inset-inset. |
330 |
||
3763 | 331 |
iconOffset := 0. |
3768 | 332 |
description isSortable ifTrue:[ |
333 |
iconOffset := 12. |
|
334 |
colNr := aLabelView columnIndexOfDescription:description. |
|
335 |
colNr == aLabelView indexOfSortColumn ifTrue:[ |
|
336 |
aLabelView reverseSort ifTrue:[ |
|
337 |
sortIcon := ToolbarIconLibrary sortIndicatorGreyIcon |
|
338 |
] ifFalse:[ |
|
339 |
sortIcon := ToolbarIconLibrary sortReverseIndicatorGreyIcon |
|
340 |
]. |
|
341 |
sortIcon displayOn:aLabelView x:xLeft+inset y:y0. |
|
3765 | 342 |
]. |
343 |
]. |
|
344 |
||
345 |
label do:[:eachLabelLine| |
|
3763 | 346 |
|restWidth xOffset shownLabel mustUndoClip prevClip| |
347 |
||
3765 | 348 |
shownLabel := eachLabelLine. |
2144 | 349 |
|
1588
e6039e46cae2
clip label on the left, if larger than columns width,
Claus Gittinger <cg@exept.de>
parents:
1523
diff
changeset
|
350 |
mustUndoClip := false. |
3649 | 351 |
labelWidth := shownLabel widthOn:aLabelView. |
2144 | 352 |
labelWidth > netWidth ifTrue:[ |
3765 | 353 |
shownLabel := DataSetColumn shortenedStringFor:eachLabelLine on:aLabelView maxWidth:netWidth. |
3649 | 354 |
labelWidth := shownLabel widthOn:aLabelView. |
2144 | 355 |
]. |
356 |
||
1487 | 357 |
adjust == #left ifTrue:[ |
3763 | 358 |
x := xLeft + iconOffset + inset. |
1487 | 359 |
] ifFalse:[ |
3763 | 360 |
restWidth := width - labelWidth - iconOffset. |
1150 | 361 |
|
3649 | 362 |
adjust == #right ifTrue:[ |
3763 | 363 |
xOffset := restWidth - inset |
3649 | 364 |
] ifFalse:[ |
3763 | 365 |
xOffset := restWidth // 2. "/ center |
3649 | 366 |
]. |
3763 | 367 |
x := xLeft + xOffset. |
1588
e6039e46cae2
clip label on the left, if larger than columns width,
Claus Gittinger <cg@exept.de>
parents:
1523
diff
changeset
|
368 |
|
e6039e46cae2
clip label on the left, if larger than columns width,
Claus Gittinger <cg@exept.de>
parents:
1523
diff
changeset
|
369 |
"/ cg: must clip left, if string is too large |
e6039e46cae2
clip label on the left, if larger than columns width,
Claus Gittinger <cg@exept.de>
parents:
1523
diff
changeset
|
370 |
x < xLeft ifTrue:[ |
e6039e46cae2
clip label on the left, if larger than columns width,
Claus Gittinger <cg@exept.de>
parents:
1523
diff
changeset
|
371 |
"/ must clip ... |
3649 | 372 |
prevClip := aLabelView clippingRectangleOrNil. |
1588
e6039e46cae2
clip label on the left, if larger than columns width,
Claus Gittinger <cg@exept.de>
parents:
1523
diff
changeset
|
373 |
mustUndoClip := true. |
3649 | 374 |
aLabelView clippingRectangle:(Rectangle |
1588
e6039e46cae2
clip label on the left, if larger than columns width,
Claus Gittinger <cg@exept.de>
parents:
1523
diff
changeset
|
375 |
left:xLeft top:y0 |
e6039e46cae2
clip label on the left, if larger than columns width,
Claus Gittinger <cg@exept.de>
parents:
1523
diff
changeset
|
376 |
width:width height:height). |
e6039e46cae2
clip label on the left, if larger than columns width,
Claus Gittinger <cg@exept.de>
parents:
1523
diff
changeset
|
377 |
]. |
1487 | 378 |
]. |
3582
2927b1b12e8f
Get the label from a value holder
Stefan Vogel <sv@exept.de>
parents:
3553
diff
changeset
|
379 |
|
3649 | 380 |
shownLabel displayOn:aLabelView x:x y:y0 + (shownLabel ascentOn:aLabelView). |
381 |
y0 := y0 + (shownLabel heightOn:aLabelView) + goodLookingVerticalSpacing. |
|
1588
e6039e46cae2
clip label on the left, if larger than columns width,
Claus Gittinger <cg@exept.de>
parents:
1523
diff
changeset
|
382 |
|
e6039e46cae2
clip label on the left, if larger than columns width,
Claus Gittinger <cg@exept.de>
parents:
1523
diff
changeset
|
383 |
mustUndoClip == true ifTrue:[ |
3649 | 384 |
aLabelView clippingRectangle:prevClip |
1588
e6039e46cae2
clip label on the left, if larger than columns width,
Claus Gittinger <cg@exept.de>
parents:
1523
diff
changeset
|
385 |
]. |
1487 | 386 |
]. |
3649 | 387 |
|
3582
2927b1b12e8f
Get the label from a value holder
Stefan Vogel <sv@exept.de>
parents:
3553
diff
changeset
|
388 |
gcFont notNil ifTrue:[ |
3649 | 389 |
aLabelView font:gcFont "/ restore font |
2451 | 390 |
]. |
1150 | 391 |
! ! |
392 |
||
393 |
!DataSetLabel methodsFor:'instance creation'! |
|
394 |
||
1487 | 395 |
description:aDescription builder:aBuilder on:aGC |
3490
f46a3c50dc15
preferredExtent changes & fixes (ubs)
Claus Gittinger <cg@exept.de>
parents:
3468
diff
changeset
|
396 |
|device gcFont verticalSpace| |
1150 | 397 |
|
3649 | 398 |
description := aDescription. |
399 |
||
400 |
"/ stupid code - could simply access things via the description. |
|
401 |
"/ I leave it here for subclasses which depend on it (for a while). |
|
1605 | 402 |
label := self resolveLabelFromDescription:aDescription withBuilder:aBuilder. |
403 |
selector := aDescription labelActionSelector. |
|
404 |
argument := (aDescription labelActionArgument) ? label. |
|
405 |
adjust := (aDescription labelAlignment) ? #left. |
|
4549 | 406 |
device := aGC graphicsDevice. |
1605 | 407 |
fgColor := aDescription labelForegroundColor. |
408 |
bgColor := aDescription labelBackgroundColor. |
|
1150 | 409 |
|
1480 | 410 |
fgColor notNil ifTrue:[ fgColor := fgColor onDevice:device ]. |
411 |
bgColor notNil ifTrue:[ bgColor := bgColor onDevice:device ]. |
|
1150 | 412 |
|
1487 | 413 |
preferredHeight := preferredWidth := 0. |
414 |
||
3490
f46a3c50dc15
preferredExtent changes & fixes (ubs)
Claus Gittinger <cg@exept.de>
parents:
3468
diff
changeset
|
415 |
(label isEmptyOrNil) ifTrue:[ |
1487 | 416 |
label := nil. |
3490
f46a3c50dc15
preferredExtent changes & fixes (ubs)
Claus Gittinger <cg@exept.de>
parents:
3468
diff
changeset
|
417 |
^ self |
1150 | 418 |
]. |
419 |
||
3553 | 420 |
font := aDescription labelFont. |
421 |
font notNil ifTrue:[ |
|
422 |
font := aBuilder resolveFont:font. |
|
423 |
font notNil ifTrue:[ |
|
424 |
gcFont := aGC font. |
|
425 |
gcFont = font ifTrue:[ |
|
426 |
font := nil |
|
427 |
] ifFalse:[ |
|
4549 | 428 |
font := font onDevice:device. |
429 |
aGC font:font. |
|
3553 | 430 |
]. |
431 |
]. |
|
1487 | 432 |
]. |
1150 | 433 |
|
3490
f46a3c50dc15
preferredExtent changes & fixes (ubs)
Claus Gittinger <cg@exept.de>
parents:
3468
diff
changeset
|
434 |
label isString ifTrue:[ |
f46a3c50dc15
preferredExtent changes & fixes (ubs)
Claus Gittinger <cg@exept.de>
parents:
3468
diff
changeset
|
435 |
label := Array with:label. |
f46a3c50dc15
preferredExtent changes & fixes (ubs)
Claus Gittinger <cg@exept.de>
parents:
3468
diff
changeset
|
436 |
] ifFalse:[ |
3885 | 437 |
label isSequenceable ifFalse:[ |
3490
f46a3c50dc15
preferredExtent changes & fixes (ubs)
Claus Gittinger <cg@exept.de>
parents:
3468
diff
changeset
|
438 |
label := Array with:label. |
f46a3c50dc15
preferredExtent changes & fixes (ubs)
Claus Gittinger <cg@exept.de>
parents:
3468
diff
changeset
|
439 |
] |
1150 | 440 |
]. |
441 |
||
3490
f46a3c50dc15
preferredExtent changes & fixes (ubs)
Claus Gittinger <cg@exept.de>
parents:
3468
diff
changeset
|
442 |
verticalSpace := aGC font descent. "/ goodLookingVerticalSpacing |
f46a3c50dc15
preferredExtent changes & fixes (ubs)
Claus Gittinger <cg@exept.de>
parents:
3468
diff
changeset
|
443 |
label := label |
f46a3c50dc15
preferredExtent changes & fixes (ubs)
Claus Gittinger <cg@exept.de>
parents:
3468
diff
changeset
|
444 |
collect:[:el| |
f46a3c50dc15
preferredExtent changes & fixes (ubs)
Claus Gittinger <cg@exept.de>
parents:
3468
diff
changeset
|
445 |
|lbl| |
f46a3c50dc15
preferredExtent changes & fixes (ubs)
Claus Gittinger <cg@exept.de>
parents:
3468
diff
changeset
|
446 |
|
f46a3c50dc15
preferredExtent changes & fixes (ubs)
Claus Gittinger <cg@exept.de>
parents:
3468
diff
changeset
|
447 |
lbl := self label:el on:device. |
f46a3c50dc15
preferredExtent changes & fixes (ubs)
Claus Gittinger <cg@exept.de>
parents:
3468
diff
changeset
|
448 |
preferredWidth := (lbl widthOn:aGC) max:preferredWidth. |
f46a3c50dc15
preferredExtent changes & fixes (ubs)
Claus Gittinger <cg@exept.de>
parents:
3468
diff
changeset
|
449 |
preferredHeight := preferredHeight + verticalSpace + (lbl heightOn:aGC) + verticalSpace. |
f46a3c50dc15
preferredExtent changes & fixes (ubs)
Claus Gittinger <cg@exept.de>
parents:
3468
diff
changeset
|
450 |
lbl |
f46a3c50dc15
preferredExtent changes & fixes (ubs)
Claus Gittinger <cg@exept.de>
parents:
3468
diff
changeset
|
451 |
]. |
1487 | 452 |
font notNil ifTrue:[aGC font:gcFont]. "/ restore font |
1150 | 453 |
! ! |
454 |
||
455 |
!DataSetLabel methodsFor:'private'! |
|
456 |
||
457 |
label:aLabel on:aDevice |
|
458 |
"returns registered label on a device |
|
459 |
" |
|
460 |
|lbl img| |
|
461 |
||
1487 | 462 |
aLabel isNil ifTrue:[^ '']. |
463 |
||
1150 | 464 |
aLabel isString ifFalse:[ |
465 |
aLabel isImageOrForm ifTrue:[ |
|
2291 | 466 |
aLabel device ~~ aDevice ifTrue:[ |
467 |
lbl := aLabel copy onDevice:aDevice |
|
468 |
] ifFalse:[ |
|
469 |
lbl := aLabel |
|
470 |
]. |
|
1150 | 471 |
^ lbl |
472 |
]. |
|
1588
e6039e46cae2
clip label on the left, if larger than columns width,
Claus Gittinger <cg@exept.de>
parents:
1523
diff
changeset
|
473 |
|
1150 | 474 |
aLabel class == LabelAndIcon ifTrue:[ |
2291 | 475 |
lbl := aLabel onDevice:aDevice. |
1150 | 476 |
(img := lbl image) isImage ifTrue:[img clearMaskedPixels]. |
477 |
(img := lbl icon) isImage ifTrue:[img clearMaskedPixels]. |
|
478 |
^ lbl |
|
479 |
] |
|
480 |
]. |
|
481 |
^ aLabel |
|
482 |
! |
|
483 |
||
484 |
resolveLabelFromDescription:aDescription withBuilder:aBuilder |
|
3763 | 485 |
"the rawLabel can be a string, icon, labelAndIcon or collection of strings. |
486 |
if labelIsImage is true, the string is actually the appModel-labelFor-access key" |
|
487 |
||
3468 | 488 |
|rawLabel appl resources lbl| |
1150 | 489 |
|
490 |
aBuilder isNil ifTrue:[ |
|
3468 | 491 |
rawLabel := aDescription rawLabel. |
3763 | 492 |
] ifFalse:[ |
493 |
rawLabel := aDescription label. |
|
494 |
rawLabel isNil ifTrue:[^ nil ]. |
|
495 |
||
496 |
aBuilder isEditing ifFalse:[ |
|
497 |
appl := aBuilder application. |
|
498 |
appl notNil ifTrue:[ resources := appl resources ]. |
|
499 |
]. |
|
3468 | 500 |
|
501 |
rawLabel isString ifTrue:[ |
|
3763 | 502 |
aDescription labelIsImage ifTrue:[ |
503 |
(aBuilder isEditing or:[(rawLabel := aBuilder labelFor:(rawLabel asSymbol)) isNil]) ifTrue:[ |
|
504 |
rawLabel := aDescription class defaultIcon |
|
505 |
]. |
|
506 |
^ rawLabel |
|
507 |
] ifFalse:[ |
|
508 |
aDescription translateLabel == true ifTrue:[ |
|
509 |
lbl := (aBuilder labelAt:(rawLabel asSymbol)) value. |
|
510 |
lbl isNil ifTrue:[ |
|
511 |
lbl := (aBuilder aspectAt:(rawLabel asSymbol)) value. |
|
512 |
]. |
|
513 |
(lbl isNil and:[resources notNil]) ifTrue:[ |
|
514 |
lbl := resources string:rawLabel default:nil. |
|
515 |
]. |
|
516 |
lbl notNil ifTrue:[ rawLabel := lbl ]. |
|
517 |
]. |
|
518 |
]. |
|
3468 | 519 |
] ifFalse:[ |
3763 | 520 |
(rawLabel isKindOf:LabelAndIcon) ifTrue:[ |
521 |
rawLabel := rawLabel copy string:(resources string:rawLabel string). |
|
1150 | 522 |
]. |
3468 | 523 |
|
3763 | 524 |
rawLabel isSequenceable ifFalse:[^ rawLabel]. |
525 |
rawLabel isEmptyOrNil ifTrue:[^ nil ]. |
|
526 |
||
527 |
resources notNil ifTrue:[ |
|
528 |
lbl := resources string:rawLabel default:nil. |
|
3468 | 529 |
|
3763 | 530 |
lbl notNil ifTrue:[ |
531 |
rawLabel := lbl. |
|
532 |
] ifFalse:[ |
|
533 |
lbl := resources array:rawLabel. |
|
534 |
lbl notEmptyOrNil ifTrue:[ |
|
535 |
lbl size == 1 ifTrue:[ rawLabel := lbl first ] |
|
536 |
ifFalse:[ rawLabel := lbl ]. |
|
537 |
]. |
|
3468 | 538 |
]. |
539 |
]. |
|
1150 | 540 |
]. |
541 |
]. |
|
3763 | 542 |
|
3468 | 543 |
rawLabel isString ifTrue:[ |
544 |
rawLabel isEmpty ifTrue:[ ^ nil ]. |
|
545 |
lbl := rawLabel asStringCollection. |
|
546 |
lbl size > 1 ifTrue:[^ lbl ]. |
|
547 |
]. |
|
548 |
^ rawLabel |
|
1150 | 549 |
! ! |
550 |
||
551 |
!DataSetLabel methodsFor:'queries'! |
|
552 |
||
1605 | 553 |
hasSeparator |
554 |
|l| |
|
555 |
||
556 |
label size == 1 ifTrue:[ |
|
557 |
"/ ^ (label at:1) ~= 'Alarm' |
|
558 |
^ (label at:1) ~= 'Area' |
|
559 |
]. |
|
560 |
^ true |
|
561 |
! |
|
562 |
||
1150 | 563 |
isSelectable |
564 |
"returns true if the item is selectable; a valid selector |
|
565 |
to notify the receiver for a release button event exists |
|
566 |
" |
|
567 |
^ selector notNil |
|
568 |
||
569 |
||
3765 | 570 |
! |
571 |
||
3768 | 572 |
isSortable |
3765 | 573 |
^ description isSortable |
1150 | 574 |
! ! |
575 |
||
576 |
!DataSetLabel class methodsFor:'documentation'! |
|
577 |
||
578 |
version |
|
4607
5bf44eae56b2
Sending of Image>>#clearMaskedPixels moved to Image >> #asFormOnDevice:
Stefan Vogel <sv@exept.de>
parents:
4588
diff
changeset
|
579 |
^ '$Header: /cvs/stx/stx/libwidg2/DataSetLabel.st,v 1.32 2014-06-06 07:30:32 stefan Exp $' |
3763 | 580 |
! |
581 |
||
582 |
version_CVS |
|
4607
5bf44eae56b2
Sending of Image>>#clearMaskedPixels moved to Image >> #asFormOnDevice:
Stefan Vogel <sv@exept.de>
parents:
4588
diff
changeset
|
583 |
^ '$Header: /cvs/stx/stx/libwidg2/DataSetLabel.st,v 1.32 2014-06-06 07:30:32 stefan Exp $' |
1150 | 584 |
! ! |
4549 | 585 |