237 ^ parent additionalLabelForItem:anItem |
237 ^ parent additionalLabelForItem:anItem |
238 ]. |
238 ]. |
239 ^ nil |
239 ^ nil |
240 ! |
240 ! |
241 |
241 |
|
242 displayIcon:anIcon atX:x y:y on:aGC |
|
243 |x0 y0 y1 w| |
|
244 |
|
245 super displayIcon:anIcon atX:x y:y on:aGC. |
|
246 |
|
247 self exists ifFalse:[ |
|
248 aGC paint:(Color red). |
|
249 |
|
250 y0 := y + 1. |
|
251 y1 := y + anIcon height - 2. |
|
252 |
|
253 x0 := x - 1. |
|
254 w := anIcon width. |
|
255 |
|
256 2 timesRepeat:[ |
|
257 aGC displayLineFromX:x0 y:y0 toX:(x0 + w) y:y1. |
|
258 aGC displayLineFromX:x0 y:y1 toX:(x0 + w) y:y0. |
|
259 x0 := x0 + 1. |
|
260 ]. |
|
261 ]. |
|
262 ! |
|
263 |
242 displayOn:aGC x:x y:y h:h |
264 displayOn:aGC x:x y:y h:h |
243 |labelHeight paint additionalName| |
265 |labelHeight additionalName label isValidAndShown| |
|
266 |
|
267 label := self label. |
|
268 label isEmptyOrNil ifTrue:[^ self]. |
244 |
269 |
245 widget id isNil ifTrue:[ |
270 widget id isNil ifTrue:[ |
246 isDrawnShown := false. |
271 isDrawnShown := false. |
247 self exists ifFalse:[^ self]. |
272 |
248 paint := Color white. |
273 self exists ifFalse:[ |
|
274 xOffsetAdditionalName := nil. |
|
275 ]. |
|
276 isValidAndShown := false. |
249 ] ifFalse:[ |
277 ] ifFalse:[ |
250 isDrawnShown := widget shown. |
278 isValidAndShown := widget shown. |
251 paint := isDrawnShown ifTrue:[Color black] ifFalse:[Color darkGray]. |
279 ]. |
252 ]. |
280 isValidAndShown ifFalse:[ |
253 aGC paint:paint. |
281 label := Text string:label emphasis:#italic |
|
282 ]. |
254 |
283 |
255 labelHeight := self heightOn:aGC. |
284 labelHeight := self heightOn:aGC. |
256 self displayLabel:(self label) h:labelHeight on:aGC x:x y:y h:h. |
285 self displayLabel:label h:labelHeight on:aGC x:x y:y h:h. |
257 |
286 |
258 xOffsetAdditionalName notNil ifTrue:[ |
287 xOffsetAdditionalName notNil ifTrue:[ |
259 additionalName := self additionalLabelForItem:self. |
288 additionalName := self additionalLabelForItem:self. |
260 |
289 |
261 additionalName notNil ifTrue:[ |
290 additionalName notNil ifTrue:[ |