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