2588
|
1 |
"
|
|
2 |
COPYRIGHT (c) 2008 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 |
"
|
2282
|
12 |
"{ Package: 'stx:libtool2' }"
|
|
13 |
|
|
14 |
SimpleDialog subclass:#UIListEditor
|
|
15 |
instanceVariableNames:'informationLabel listTextHolder useSymbolsHolder'
|
|
16 |
classVariableNames:''
|
|
17 |
poolDictionaries:''
|
|
18 |
category:'Interface-UIPainter'
|
|
19 |
!
|
|
20 |
|
2588
|
21 |
!UIListEditor class methodsFor:'documentation'!
|
|
22 |
|
|
23 |
copyright
|
|
24 |
"
|
|
25 |
COPYRIGHT (c) 2008 by eXept Software AG
|
|
26 |
All Rights Reserved
|
|
27 |
|
|
28 |
This software is furnished under a license and may be used
|
|
29 |
only in accordance with the terms of that license and with the
|
|
30 |
inclusion of the above copyright notice. This software may not
|
|
31 |
be provided or otherwise made available to, or used by, any
|
|
32 |
other person. No title to or ownership of the software is
|
|
33 |
hereby transferred.
|
|
34 |
"
|
|
35 |
! !
|
2282
|
36 |
|
|
37 |
!UIListEditor class methodsFor:'help specs'!
|
|
38 |
|
|
39 |
helpSpec
|
|
40 |
"This resource specification was automatically generated
|
|
41 |
by the UIHelpTool of ST/X."
|
|
42 |
|
|
43 |
"Do not manually edit this!! If it is corrupted,
|
|
44 |
the UIHelpTool may not be able to read the specification."
|
|
45 |
|
|
46 |
"
|
|
47 |
UIHelpTool openOnClass:UIListEditor
|
|
48 |
"
|
|
49 |
|
|
50 |
<resource: #help>
|
|
51 |
|
|
52 |
^ super helpSpec addPairsFrom:#(
|
|
53 |
|
|
54 |
#useSymbols
|
|
55 |
'Store list elements as symbols'
|
|
56 |
|
|
57 |
)
|
|
58 |
! !
|
|
59 |
|
|
60 |
!UIListEditor class methodsFor:'interface specs'!
|
|
61 |
|
|
62 |
windowSpec
|
|
63 |
"This resource specification was automatically generated
|
|
64 |
by the UIPainter of ST/X."
|
|
65 |
|
|
66 |
"Do not manually edit this!! If it is corrupted,
|
|
67 |
the UIPainter may not be able to read the specification."
|
|
68 |
|
|
69 |
"
|
|
70 |
UIPainter new openOnClass:UIListEditor andSelector:#windowSpec
|
|
71 |
UIListEditor new openInterface:#windowSpec
|
|
72 |
UIListEditor open
|
|
73 |
"
|
|
74 |
|
|
75 |
<resource: #canvas>
|
|
76 |
|
|
77 |
^
|
|
78 |
#(FullSpec
|
|
79 |
name: windowSpec
|
|
80 |
window:
|
|
81 |
(WindowSpec
|
|
82 |
label: 'Edit List'
|
|
83 |
name: 'Edit List'
|
|
84 |
min: (Point 10 10)
|
|
85 |
bounds: (Rectangle 0 0 354 422)
|
|
86 |
)
|
|
87 |
component:
|
|
88 |
(SpecCollection
|
|
89 |
collection: (
|
|
90 |
(LabelSpec
|
|
91 |
name: 'Label1'
|
|
92 |
layout: (LayoutFrame 0 0.0 0 0.0 0 1.0 28 0)
|
|
93 |
translateLabel: true
|
|
94 |
labelChannel: informationLabel
|
|
95 |
)
|
|
96 |
(TextEditorSpec
|
|
97 |
name: 'TextEditor1'
|
|
98 |
layout: (LayoutFrame 0 0 30 0 0 1 -63 1)
|
|
99 |
model: listTextHolder
|
|
100 |
hasHorizontalScrollBar: true
|
|
101 |
hasVerticalScrollBar: true
|
|
102 |
viewClassName: ''
|
|
103 |
)
|
|
104 |
(CheckBoxSpec
|
|
105 |
label: 'Use Symbols'
|
|
106 |
name: 'CheckBox1'
|
|
107 |
layout: (LayoutFrame 5 0 368 0 141 0 390 0)
|
|
108 |
activeHelpKey: useSymbols
|
|
109 |
model: useSymbolsHolder
|
|
110 |
translateLabel: true
|
|
111 |
)
|
|
112 |
(HorizontalPanelViewSpec
|
|
113 |
name: 'HorizontalPanel1'
|
|
114 |
layout: (LayoutFrame 0 0 -33 1 0 1 0 1)
|
|
115 |
horizontalLayout: fitSpace
|
|
116 |
verticalLayout: center
|
|
117 |
horizontalSpace: 3
|
|
118 |
verticalSpace: 3
|
|
119 |
component:
|
|
120 |
(SpecCollection
|
|
121 |
collection: (
|
|
122 |
(ActionButtonSpec
|
|
123 |
label: 'Cancel'
|
|
124 |
name: 'Button1'
|
|
125 |
translateLabel: true
|
|
126 |
model: doCancel
|
|
127 |
extent: (Point 172 22)
|
|
128 |
)
|
|
129 |
(ActionButtonSpec
|
|
130 |
label: 'OK'
|
|
131 |
name: 'Button2'
|
|
132 |
translateLabel: true
|
|
133 |
model: doAccept
|
|
134 |
isDefault: true
|
|
135 |
extent: (Point 173 22)
|
|
136 |
)
|
|
137 |
)
|
|
138 |
|
|
139 |
)
|
|
140 |
)
|
|
141 |
)
|
|
142 |
|
|
143 |
)
|
|
144 |
)
|
|
145 |
! !
|
|
146 |
|
|
147 |
!UIListEditor methodsFor:'accessing'!
|
|
148 |
|
|
149 |
informationLabel
|
|
150 |
^ informationLabel
|
|
151 |
!
|
|
152 |
|
|
153 |
informationLabel:something
|
|
154 |
informationLabel := something.
|
|
155 |
!
|
|
156 |
|
|
157 |
list
|
|
158 |
"answer the list as an array"
|
|
159 |
|
|
160 |
|list|
|
|
161 |
|
|
162 |
list := self listTextHolder value asStringCollection asArray.
|
|
163 |
self useSymbolsHolder value ifTrue:[
|
|
164 |
list := list collect:[:e| e asSymbol].
|
|
165 |
].
|
|
166 |
|
|
167 |
^ list
|
|
168 |
!
|
|
169 |
|
|
170 |
list:anArray
|
|
171 |
self listTextHolder value:anArray asStringCollection asString.
|
|
172 |
!
|
|
173 |
|
|
174 |
useSymbols:aBoolean
|
|
175 |
self useSymbolsHolder value:aBoolean
|
|
176 |
! !
|
|
177 |
|
|
178 |
!UIListEditor methodsFor:'aspects'!
|
|
179 |
|
|
180 |
listTextHolder
|
|
181 |
<resource: #uiAspect>
|
|
182 |
|
|
183 |
listTextHolder isNil ifTrue:[
|
|
184 |
listTextHolder := '' asValue.
|
|
185 |
].
|
|
186 |
^ listTextHolder.
|
|
187 |
!
|
|
188 |
|
|
189 |
useSymbolsHolder
|
|
190 |
<resource: #uiAspect>
|
|
191 |
|
|
192 |
useSymbolsHolder isNil ifTrue:[
|
|
193 |
useSymbolsHolder := false asValue.
|
|
194 |
].
|
|
195 |
^ useSymbolsHolder.
|
|
196 |
! !
|
|
197 |
|
|
198 |
!UIListEditor class methodsFor:'documentation'!
|
|
199 |
|
|
200 |
version
|
|
201 |
^ '$Header$'
|
2588
|
202 |
!
|
|
203 |
|
|
204 |
version_CVS
|
|
205 |
^ '$Header$'
|
2282
|
206 |
! !
|