equal
deleted
inserted
replaced
1 Object subclass:#DataSetLabel |
1 Object subclass:#DataSetLabel |
2 instanceVariableNames:'label selector argument adjust font fgColor bgColor |
2 instanceVariableNames:'label selector argument adjust font fgColor bgColor |
3 preferredHeight preferredWidth labelIsButton' |
3 preferredHeight preferredWidth' |
4 classVariableNames:'' |
4 classVariableNames:'' |
5 poolDictionaries:'' |
5 poolDictionaries:'' |
6 category:'Views-DataSet' |
6 category:'Views-DataSet' |
7 ! |
7 ! |
8 |
8 |
9 |
|
10 !DataSetLabel methodsFor:'accessing'! |
|
11 |
|
12 labelIsButton |
|
13 ^ labelIsButton |
|
14 ! ! |
|
15 |
9 |
16 !DataSetLabel methodsFor:'accessing colors'! |
10 !DataSetLabel methodsFor:'accessing colors'! |
17 |
11 |
18 backgroundColor |
12 backgroundColor |
19 "returns the background color or nil |
13 "returns the background color or nil |
114 !DataSetLabel methodsFor:'instance creation'! |
108 !DataSetLabel methodsFor:'instance creation'! |
115 |
109 |
116 description:aDescription builder:aBuilder on:aGC |
110 description:aDescription builder:aBuilder on:aGC |
117 |device gcFont| |
111 |device gcFont| |
118 |
112 |
119 label := self resolveLabelFromDescription:aDescription withBuilder:aBuilder. |
113 label := self resolveLabelFromDescription:aDescription withBuilder:aBuilder. |
120 selector := aDescription labelActionSelector. |
114 selector := aDescription labelActionSelector. |
121 argument := (aDescription labelActionArgument) ? label. |
115 argument := (aDescription labelActionArgument) ? label. |
122 adjust := (aDescription labelAlignment) ? #left. |
116 adjust := (aDescription labelAlignment) ? #left. |
123 device := aGC device. |
117 device := aGC device. |
124 fgColor := aDescription labelForegroundColor. |
118 fgColor := aDescription labelForegroundColor. |
125 bgColor := aDescription labelBackgroundColor. |
119 bgColor := aDescription labelBackgroundColor. |
126 labelIsButton := aDescription labelIsButton. |
|
127 |
120 |
128 fgColor notNil ifTrue:[ fgColor := fgColor onDevice:device ]. |
121 fgColor notNil ifTrue:[ fgColor := fgColor onDevice:device ]. |
129 bgColor notNil ifTrue:[ bgColor := bgColor onDevice:device ]. |
122 bgColor notNil ifTrue:[ bgColor := bgColor onDevice:device ]. |
130 |
123 |
131 preferredHeight := preferredWidth := 0. |
124 preferredHeight := preferredWidth := 0. |
239 |
232 |
240 ! ! |
233 ! ! |
241 |
234 |
242 !DataSetLabel methodsFor:'queries'! |
235 !DataSetLabel methodsFor:'queries'! |
243 |
236 |
|
237 hasSeparator |
|
238 |l| |
|
239 |
|
240 label size == 1 ifTrue:[ |
|
241 "/ ^ (label at:1) ~= 'Alarm' |
|
242 ^ (label at:1) ~= 'Area' |
|
243 ]. |
|
244 ^ true |
|
245 ! |
|
246 |
244 isSelectable |
247 isSelectable |
245 "returns true if the item is selectable; a valid selector |
248 "returns true if the item is selectable; a valid selector |
246 to notify the receiver for a release button event exists |
249 to notify the receiver for a release button event exists |
247 " |
250 " |
248 ^ selector notNil |
251 ^ selector notNil |
251 ! ! |
254 ! ! |
252 |
255 |
253 !DataSetLabel class methodsFor:'documentation'! |
256 !DataSetLabel class methodsFor:'documentation'! |
254 |
257 |
255 version |
258 version |
256 ^ '$Header: /cvs/stx/stx/libwidg2/DataSetLabel.st,v 1.7 1999-10-14 07:51:07 cg Exp $' |
259 ^ '$Header: /cvs/stx/stx/libwidg2/DataSetLabel.st,v 1.8 1999-10-27 12:22:45 ca Exp $' |
257 ! ! |
260 ! ! |