68 "Modified: / 28.1.1998 / 15:44:53 / stefan" |
68 "Modified: / 28.1.1998 / 15:44:53 / stefan" |
69 ! ! |
69 ! ! |
70 |
70 |
71 !DirectoryView class methodsFor:'interface specs'! |
71 !DirectoryView class methodsFor:'interface specs'! |
72 |
72 |
|
73 tableColumnsForFileAttributes |
|
74 "This resource specification was automatically generated |
|
75 by the DataSetBuilder of ST/X." |
|
76 |
|
77 "Do not manually edit this!! If it is corrupted, |
|
78 the DataSetBuilder may not be able to read the specification." |
|
79 |
|
80 " |
|
81 DataSetBuilder new openOnClass:DirectoryView andSelector:#tableColumnsForFileAttributes |
|
82 " |
|
83 |
|
84 <resource: #tableColumns> |
|
85 |
|
86 |
|
87 ^ #( |
|
88 #(#DataSetColumnSpec |
|
89 #label: '' |
|
90 #width: 30 |
|
91 #height: 22 |
|
92 #printSelector: #iconOn: |
|
93 #canSelect: false |
|
94 ) |
|
95 #(#DataSetColumnSpec |
|
96 #label: 'File name' |
|
97 #labelAlignment: #left |
|
98 #minWidth: 150 |
|
99 #model: #baseName |
|
100 #canSelect: false |
|
101 ) |
|
102 #(#DataSetColumnSpec |
|
103 #label: 'Size' |
|
104 #labelAlignment: #left |
|
105 #width: 70 |
|
106 #model: #size |
|
107 #canSelect: false |
|
108 ) |
|
109 #(#DataSetColumnSpec |
|
110 #label: 'Modified' |
|
111 #labelAlignment: #left |
|
112 #model: #modified |
|
113 #canSelect: false |
|
114 ) |
|
115 #(#DataSetColumnSpec |
|
116 #label: 'Permissions' |
|
117 #labelAlignment: #left |
|
118 #width: 85 |
|
119 #model: #permissions |
|
120 #canSelect: false |
|
121 ) |
|
122 #(#DataSetColumnSpec |
|
123 #label: 'Owner' |
|
124 #labelAlignment: #left |
|
125 #width: 50 |
|
126 #model: #owner |
|
127 #canSelect: false |
|
128 ) |
|
129 #(#DataSetColumnSpec |
|
130 #label: 'Group' |
|
131 #labelAlignment: #left |
|
132 #width: 50 |
|
133 #model: #group |
|
134 #canSelect: false |
|
135 ) |
|
136 ) |
|
137 ! |
|
138 |
73 windowSpec |
139 windowSpec |
74 "this window spec was automatically generated by the ST/X UIPainter" |
140 "This resource specification was automatically generated |
75 |
141 by the UIPainter of ST/X." |
76 "do not manually edit this - the painter/builder may not be able to |
142 |
77 handle the specification if its corrupted." |
143 "Do not manually edit this!! If it is corrupted, |
|
144 the UIPainter may not be able to read the specification." |
78 |
145 |
79 " |
146 " |
80 UIPainter new openOnClass:DirectoryView andSelector:#windowSpec |
147 UIPainter new openOnClass:DirectoryView andSelector:#windowSpec |
81 DirectoryView new openInterface:#windowSpec |
148 DirectoryView new openInterface:#windowSpec |
82 " |
149 DirectoryView open |
83 "DirectoryView open" |
150 " |
84 |
151 |
85 <resource: #canvas> |
152 <resource: #canvas> |
86 |
153 |
87 ^ |
154 ^ |
88 |
155 |
89 #(#FullSpec |
156 #(#FullSpec |
90 #window: |
157 #window: |
91 #(#WindowSpec |
158 #(#WindowSpec |
92 #name: 'Directory View' |
159 #name: 'Directory View' |
93 #layout: #(#LayoutFrame 34 0 350 0 433 0 649 0) |
160 #layout: #(#LayoutFrame 412 0 367 0 811 0 666 0) |
94 #label: 'Directory View' |
161 #label: 'Directory View' |
95 #min: #(#Point 10 10) |
162 #min: #(#Point 10 10) |
96 #max: #(#Point 1152 900) |
163 #max: #(#Point 1152 900) |
97 #bounds: #(#Rectangle 34 350 434 650) |
164 #bounds: #(#Rectangle 412 367 812 667) |
98 #usePreferredExtent: false |
165 #usePreferredExtent: false |
99 ) |
166 ) |
100 #component: |
167 #component: |
101 #(#SpecCollection |
168 #(#SpecCollection |
102 #collection: |
169 #collection: |
122 #immediateAccept: false |
189 #immediateAccept: false |
123 #acceptOnTab: false |
190 #acceptOnTab: false |
124 #comboList: #listOfFileFilters |
191 #comboList: #listOfFileFilters |
125 ) |
192 ) |
126 #(#LabelSpec |
193 #(#LabelSpec |
127 #name: 'label1' |
194 #name: 'filterLabel' |
128 #layout: #(#LayoutFrame 0 0 0 0 62 0 22 0) |
195 #layout: #(#LayoutFrame 0 0 0 0 62 0 22 0) |
129 #label: 'Filter: ' |
196 #label: 'Filter: ' |
130 #adjust: #right |
197 #adjust: #right |
131 ) |
198 ) |
132 ) |
199 ) |
133 ) |
200 ) |
134 ) |
201 ) |
135 |
|
136 ! |
|
137 |
|
138 windowSpecOfFileAttributeColumns |
|
139 |
|
140 ^ |
|
141 #( |
|
142 #(#DataSetColumnSpec |
|
143 #'label:' '' |
|
144 #'width:' 30 |
|
145 #'height:' 22 |
|
146 #'printSelector:' #'iconOn:' |
|
147 #'canSelect:' false |
|
148 ) |
|
149 #(#DataSetColumnSpec |
|
150 #'label:' 'File name' |
|
151 #'labelAlignment:' #left |
|
152 #'minWidth:' 150 |
|
153 #'model:' #baseName |
|
154 #'canSelect:' false |
|
155 ) |
|
156 #(#DataSetColumnSpec |
|
157 #'label:' 'Size' |
|
158 #'labelAlignment:' #left |
|
159 #'width:' 70 |
|
160 #'model:' #size |
|
161 #'canSelect:' false |
|
162 ) |
|
163 #(#DataSetColumnSpec |
|
164 #'label:' 'Modified' |
|
165 #'labelAlignment:' #left |
|
166 #'model:' #modified |
|
167 #'canSelect:' false |
|
168 ) |
|
169 #(#DataSetColumnSpec |
|
170 #'label:' 'Permissions' |
|
171 #'labelAlignment:' #left |
|
172 #'width:' 85 |
|
173 #'model:' #permissions |
|
174 #'canSelect:' false |
|
175 ) |
|
176 #(#DataSetColumnSpec |
|
177 #'label:' 'Owner' |
|
178 #'labelAlignment:' #left |
|
179 #'width:' 50 |
|
180 #'model:' #owner |
|
181 #'canSelect:' false |
|
182 ) |
|
183 #(#DataSetColumnSpec |
|
184 #'label:' 'Group' |
|
185 #'labelAlignment:' #left |
|
186 #'width:' 50 |
|
187 #'model:' #group |
|
188 #'canSelect:' false |
|
189 ) |
|
190 ) |
|
191 |
|
192 "Modified: / 6.2.1998 / 03:40:16 / cg" |
|
193 ! ! |
202 ! ! |
194 |
203 |
195 !DirectoryView methodsFor:'accessing'! |
204 !DirectoryView methodsFor:'accessing'! |
196 |
205 |
197 directory: aDirectory |
206 directory: aDirectory |
252 |
261 |
253 |holder| |
262 |holder| |
254 (holder := builder bindingAt:#fileAttributeColumns) isNil ifTrue:[ |
263 (holder := builder bindingAt:#fileAttributeColumns) isNil ifTrue:[ |
255 |fileAttributeColumns| |
264 |fileAttributeColumns| |
256 builder aspectAt:#fileAttributeColumns put:(holder := List new). |
265 builder aspectAt:#fileAttributeColumns put:(holder := List new). |
257 fileAttributeColumns := self class windowSpecOfFileAttributeColumns collect: [:i| i decodeAsLiteralArray]. |
266 fileAttributeColumns := self class tableColumnsForFileAttributes collect: [:i| i decodeAsLiteralArray]. |
258 holder add: fileAttributeColumns first. |
267 holder add: fileAttributeColumns first. |
259 fileAttributeColumns do: |
268 fileAttributeColumns do: |
260 [:col| |
269 [:col| |
261 (fileAttributes includes: col label) ifTrue: [holder add: col] |
270 (fileAttributes includes: col label) ifTrue: [holder add: col] |
262 ]. |
271 ]. |