author | Jan Vrany <jan.vrany@labware.com> |
Fri, 02 Sep 2022 11:25:39 +0100 | |
branch | jv |
changeset 6261 | 9b7eb7159d29 |
parent 4770 | 6634b540fea2 |
permissions | -rw-r--r-- |
1431 | 1 |
" |
2 |
COPYRIGHT (c) 1998 by eXept Software AG |
|
3150 | 3 |
All Rights Reserved |
1431 | 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 |
" |
|
4770
6634b540fea2
Added PluggableHierarchicalList to define ad-hoc tree models.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
3150
diff
changeset
|
12 |
"{ Package: 'stx:libwidg2' }" |
1431 | 13 |
|
4770
6634b540fea2
Added PluggableHierarchicalList to define ad-hoc tree models.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
3150
diff
changeset
|
14 |
"{ NameSpace: Smalltalk }" |
1431 | 15 |
|
1236 | 16 |
ApplicationModel subclass:#ListEditor |
17 |
instanceVariableNames:'choiceList choiceSelection selectionList selectionSelection' |
|
18 |
classVariableNames:'' |
|
19 |
poolDictionaries:'' |
|
20 |
category:'Views-Lists' |
|
21 |
! |
|
1235 | 22 |
|
1431 | 23 |
!ListEditor class methodsFor:'documentation'! |
24 |
||
25 |
copyright |
|
26 |
" |
|
27 |
COPYRIGHT (c) 1998 by eXept Software AG |
|
3150 | 28 |
All Rights Reserved |
1431 | 29 |
|
30 |
This software is furnished under a license and may be used |
|
31 |
only in accordance with the terms of that license and with the |
|
32 |
inclusion of the above copyright notice. This software may not |
|
33 |
be provided or otherwise made available to, or used by, any |
|
34 |
other person. No title to or ownership of the software is |
|
35 |
hereby transferred. |
|
36 |
" |
|
37 |
||
38 |
||
39 |
! ! |
|
1236 | 40 |
|
41 |
!ListEditor class methodsFor:'interface specs'! |
|
42 |
||
43 |
windowSpec |
|
44 |
"This resource specification was automatically generated |
|
45 |
by the UIPainter of ST/X." |
|
46 |
||
47 |
"Do not manually edit this!! If it is corrupted, |
|
48 |
the UIPainter may not be able to read the specification." |
|
49 |
||
50 |
" |
|
51 |
UIPainter new openOnClass:ListEditor andSelector:#windowSpec |
|
52 |
ListEditor new openInterface:#windowSpec |
|
53 |
ListEditor open |
|
54 |
" |
|
55 |
||
56 |
<resource: #canvas> |
|
57 |
||
58 |
^ |
|
3150 | 59 |
|
1236 | 60 |
#(#FullSpec |
3150 | 61 |
#window: |
62 |
#(#WindowSpec |
|
63 |
#name: 'NewApplication' |
|
64 |
#layout: #(#LayoutFrame 216 0 173 0 515 0 472 0) |
|
65 |
#level: 0 |
|
66 |
#label: 'NewApplication' |
|
67 |
#min: #(#Point 10 10) |
|
68 |
#max: #(#Point 800 553) |
|
69 |
#bounds: #(#Rectangle 216 173 516 473) |
|
70 |
#usePreferredExtent: false |
|
71 |
) |
|
72 |
#component: |
|
73 |
#(#SpecCollection |
|
74 |
#collection: |
|
75 |
#( |
|
76 |
#(#SequenceViewSpec |
|
77 |
#name: 'choiceList' |
|
78 |
#layout: #(#LayoutFrame 0 0.0 30 0.0 -12 0.5 0 1.0) |
|
79 |
#model: #choiceSelection |
|
80 |
#hasHorizontalScrollBar: true |
|
81 |
#hasVerticalScrollBar: true |
|
82 |
#miniScrollerHorizontal: true |
|
83 |
#useIndex: true |
|
84 |
#sequenceList: #choiceList |
|
85 |
) |
|
86 |
#(#SequenceViewSpec |
|
87 |
#name: 'selectionList' |
|
88 |
#layout: #(#LayoutFrame 12 0.5 30 0.0 0 1.0 0 1.0) |
|
89 |
#model: #selectionSelection |
|
90 |
#hasHorizontalScrollBar: true |
|
91 |
#hasVerticalScrollBar: true |
|
92 |
#miniScrollerHorizontal: true |
|
93 |
#useIndex: true |
|
94 |
#sequenceList: #selectionList |
|
95 |
) |
|
96 |
#(#LabelSpec |
|
97 |
#name: 'choiceLabel' |
|
98 |
#layout: #(#LayoutFrame 0 0.0 0 0 -20 0.5 30 0) |
|
99 |
#label: 'Choices' |
|
100 |
#translateLabel: true |
|
101 |
) |
|
102 |
#(#LabelSpec |
|
103 |
#name: 'selectionLabel' |
|
104 |
#layout: #(#LayoutFrame 20 0.5 0 0 0 1.0 30 0) |
|
105 |
#label: 'Selected' |
|
106 |
#translateLabel: true |
|
107 |
) |
|
108 |
#(#ArrowButtonSpec |
|
109 |
#name: 'addButton' |
|
110 |
#layout: #(#LayoutFrame -10 0.5 -25 0.5 10 0.5 -5 0.5) |
|
111 |
#model: #addToSelection |
|
112 |
#isTriggerOnDown: true |
|
113 |
#direction: #right |
|
114 |
) |
|
115 |
#(#ArrowButtonSpec |
|
116 |
#name: 'removeButton' |
|
117 |
#layout: #(#LayoutFrame -10 0.5 5 0.5 10 0.5 25 0.5) |
|
118 |
#model: #removeFromSelection |
|
119 |
#isTriggerOnDown: true |
|
120 |
#direction: #left |
|
121 |
) |
|
122 |
) |
|
123 |
) |
|
1236 | 124 |
) |
125 |
! ! |
|
126 |
||
127 |
!ListEditor methodsFor:'actions'! |
|
128 |
||
129 |
addToSelection |
|
130 |
"automatically generated by UIPainter ..." |
|
131 |
||
132 |
"*** the code below performs no action" |
|
133 |
"*** (except for some feedback on the Transcript)" |
|
134 |
"*** Please change as required and accept in the browser." |
|
135 |
||
136 |
"action to be added ..." |
|
137 |
||
138 |
Transcript showCR:self class name, ': action for addToSelection ...'. |
|
139 |
||
140 |
"Created: / 7.3.1999 / 00:44:23 / cg" |
|
141 |
! |
|
142 |
||
143 |
removeFromSelection |
|
144 |
"automatically generated by UIPainter ..." |
|
145 |
||
146 |
"*** the code below performs no action" |
|
147 |
"*** (except for some feedback on the Transcript)" |
|
148 |
"*** Please change as required and accept in the browser." |
|
149 |
||
150 |
"action to be added ..." |
|
151 |
||
152 |
Transcript showCR:self class name, ': action for removeFromSelection ...'. |
|
153 |
||
154 |
"Created: / 7.3.1999 / 00:44:24 / cg" |
|
155 |
! ! |
|
156 |
||
157 |
!ListEditor methodsFor:'aspects'! |
|
158 |
||
159 |
choiceList |
|
160 |
choiceList isNil ifTrue:[ |
|
3150 | 161 |
choiceList := ValueHolder new. |
1236 | 162 |
]. |
163 |
^ choiceList. |
|
164 |
||
165 |
"Created: / 7.3.1999 / 00:44:23 / cg" |
|
166 |
"Modified: / 7.3.1999 / 00:45:51 / cg" |
|
167 |
! |
|
168 |
||
169 |
choiceSelection |
|
170 |
choiceSelection isNil ifTrue:[ |
|
3150 | 171 |
choiceSelection := ValueHolder new. |
1236 | 172 |
]. |
173 |
^ choiceSelection. |
|
174 |
||
175 |
"Created: / 7.3.1999 / 00:44:23 / cg" |
|
176 |
"Modified: / 7.3.1999 / 00:46:29 / cg" |
|
177 |
! |
|
178 |
||
179 |
selectionList |
|
180 |
selectionList isNil ifTrue:[ |
|
3150 | 181 |
selectionList := ValueHolder new. |
1236 | 182 |
]. |
183 |
^ selectionList. |
|
184 |
||
185 |
"Created: / 7.3.1999 / 00:44:23 / cg" |
|
186 |
"Modified: / 7.3.1999 / 00:47:34 / cg" |
|
187 |
! |
|
188 |
||
189 |
selectionSelection |
|
190 |
selectionSelection isNil ifTrue:[ |
|
3150 | 191 |
selectionSelection := ValueHolder new. |
1236 | 192 |
]. |
193 |
^ selectionSelection. |
|
194 |
||
195 |
"Created: / 7.3.1999 / 00:44:23 / cg" |
|
196 |
"Modified: / 7.3.1999 / 00:48:27 / cg" |
|
197 |
! ! |
|
198 |
||
199 |
!ListEditor class methodsFor:'documentation'! |
|
200 |
||
201 |
version |
|
3150 | 202 |
^ '$Header: /cvs/stx/stx/libwidg2/ListEditor.st,v 1.5 2006-11-13 16:11:30 cg Exp $' |
1236 | 203 |
! ! |
4770
6634b540fea2
Added PluggableHierarchicalList to define ad-hoc tree models.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
3150
diff
changeset
|
204 |