496
|
1 |
View subclass:#SubCanvas
|
501
|
2 |
instanceVariableNames:'client spec'
|
496
|
3 |
classVariableNames:''
|
|
4 |
poolDictionaries:''
|
|
5 |
category:'Views-Basic'
|
|
6 |
!
|
|
7 |
|
|
8 |
|
|
9 |
!SubCanvas methodsFor:'accessing'!
|
|
10 |
|
|
11 |
releaseAllComponents
|
501
|
12 |
self destroySubViews
|
496
|
13 |
|
|
14 |
"Modified: 6.3.1997 / 15:53:31 / cg"
|
|
15 |
! !
|
|
16 |
|
|
17 |
!SubCanvas methodsFor:'rebuilding'!
|
|
18 |
|
|
19 |
client:anApplicationModel
|
|
20 |
"release existing components and generate new components from
|
|
21 |
the applications windowSpec."
|
|
22 |
|
|
23 |
^ self client:anApplicationModel spec:#windowSpec
|
|
24 |
|
|
25 |
"Created: 6.3.1997 / 15:53:23 / cg"
|
|
26 |
"Modified: 6.3.1997 / 15:59:55 / cg"
|
|
27 |
!
|
|
28 |
|
|
29 |
client:anApplicationModel spec:aWindowSpec
|
|
30 |
"release existing components and generate new components from
|
|
31 |
the applications windowSpec."
|
|
32 |
|
|
33 |
|b newBuilder|
|
|
34 |
|
|
35 |
"/ If the application already has a builder, create a subBilder;
|
|
36 |
"/ otherwise a new one
|
|
37 |
|
|
38 |
((anApplicationModel respondsTo:#builder)
|
|
39 |
and:[(b := anApplicationModel builder) notNil]) ifTrue:[
|
|
40 |
newBuilder := b newSubBuilder
|
|
41 |
] ifFalse:[
|
|
42 |
newBuilder := UIBuilder new
|
|
43 |
].
|
|
44 |
^ self client:anApplicationModel spec:aWindowSpec builder:newBuilder
|
|
45 |
|
|
46 |
"Created: 6.3.1997 / 15:53:25 / cg"
|
|
47 |
"Modified: 6.3.1997 / 15:59:44 / cg"
|
|
48 |
!
|
|
49 |
|
|
50 |
client:anApplicationModel spec:aWindowSpecOrSpecSymbol builder:aBuilder
|
|
51 |
"release existing components and generate new components from
|
|
52 |
the given windowSpec, using the given builder."
|
|
53 |
|
501
|
54 |
|spec |
|
496
|
55 |
|
|
56 |
self releaseAllComponents.
|
501
|
57 |
anApplicationModel isNil ifTrue:[
|
|
58 |
^ self
|
|
59 |
].
|
496
|
60 |
|
|
61 |
spec := aWindowSpecOrSpecSymbol.
|
|
62 |
spec isSymbol ifTrue:[
|
|
63 |
spec := anApplicationModel class interfaceSpecFor:spec
|
|
64 |
].
|
|
65 |
|
501
|
66 |
spec notNil ifTrue:[
|
|
67 |
aBuilder buildFromSpec:spec in:self.
|
|
68 |
].
|
|
69 |
self realized ifTrue:[
|
|
70 |
self realizeAllSubViews
|
496
|
71 |
].
|
|
72 |
^ aBuilder
|
|
73 |
|
|
74 |
"Modified: 6.3.1997 / 16:04:58 / cg"
|
|
75 |
! !
|
|
76 |
|
|
77 |
!SubCanvas class methodsFor:'documentation'!
|
|
78 |
|
|
79 |
version
|
501
|
80 |
^ '$Header: /cvs/stx/stx/libview2/Attic/SubCanvas.st,v 1.2 1997-03-27 10:20:49 ca Exp $'
|
496
|
81 |
! !
|