255
|
1 |
'From Smalltalk/X, Version:3.3.1 on 12-jan-1998 at 1:27:21 pm' !
|
|
2 |
|
194
|
3 |
Object subclass:#SmalltalkAppletStub
|
|
4 |
instanceVariableNames:'parameter documentBase codeBase appletContext'
|
|
5 |
classVariableNames:''
|
|
6 |
poolDictionaries:''
|
234
|
7 |
category:'Java-Views-Support'
|
194
|
8 |
!
|
|
9 |
|
|
10 |
|
|
11 |
!SmalltalkAppletStub methodsFor:'accessing'!
|
|
12 |
|
|
13 |
appletContext
|
|
14 |
"return the value of the instance variable 'appletContext' (automatically generated)"
|
|
15 |
|
|
16 |
^ appletContext
|
|
17 |
|
|
18 |
"Created: 1.8.1997 / 15:56:20 / cg"
|
|
19 |
!
|
|
20 |
|
|
21 |
appletContext:something
|
|
22 |
"set the value of the instance variable 'appletContext' (automatically generated)"
|
|
23 |
|
|
24 |
appletContext := something.
|
|
25 |
|
|
26 |
"Created: 1.8.1997 / 15:56:20 / cg"
|
|
27 |
!
|
|
28 |
|
|
29 |
codeBase
|
|
30 |
"return the value of the instance variable 'codeBase' (automatically generated)"
|
|
31 |
|
|
32 |
^ codeBase
|
|
33 |
|
|
34 |
"Created: 1.8.1997 / 15:56:20 / cg"
|
|
35 |
!
|
|
36 |
|
|
37 |
codeBase:something
|
|
38 |
"set the value of the instance variable 'codeBase' (automatically generated)"
|
|
39 |
|
|
40 |
codeBase := something.
|
|
41 |
|
|
42 |
"Created: 1.8.1997 / 15:56:20 / cg"
|
|
43 |
!
|
|
44 |
|
|
45 |
documentBase
|
|
46 |
"return the value of the instance variable 'documentBase' (automatically generated)"
|
|
47 |
|
|
48 |
^ documentBase
|
|
49 |
|
|
50 |
"Created: 1.8.1997 / 15:56:20 / cg"
|
|
51 |
!
|
|
52 |
|
|
53 |
documentBase:something
|
|
54 |
"set the value of the instance variable 'documentBase' (automatically generated)"
|
|
55 |
|
|
56 |
documentBase := something.
|
|
57 |
|
|
58 |
"Created: 1.8.1997 / 15:56:20 / cg"
|
|
59 |
!
|
|
60 |
|
|
61 |
parameter
|
|
62 |
"return the value of the instance variable 'parameter' (automatically generated)"
|
|
63 |
|
|
64 |
^ parameter
|
|
65 |
|
|
66 |
"Created: 1.8.1997 / 15:56:19 / cg"
|
|
67 |
!
|
|
68 |
|
|
69 |
parameter:something
|
|
70 |
"set the value of the instance variable 'parameter' (automatically generated)"
|
|
71 |
|
|
72 |
parameter := something.
|
|
73 |
|
|
74 |
"Created: 1.8.1997 / 15:56:20 / cg"
|
|
75 |
! !
|
|
76 |
|
217
|
77 |
!SmalltalkAppletStub methodsFor:'applet actions'!
|
|
78 |
|
|
79 |
appletResize:newWidth _:newHeight
|
|
80 |
self halt.
|
|
81 |
|
|
82 |
"Created: 13.8.1997 / 00:18:41 / cg"
|
|
83 |
! !
|
|
84 |
|
194
|
85 |
!SmalltalkAppletStub methodsFor:'java accessing'!
|
|
86 |
|
255
|
87 |
doesNotUnderstand:aMessage
|
|
88 |
|selector|
|
|
89 |
|
|
90 |
selector := aMessage selector.
|
|
91 |
selector == #'getParameter(Ljava/lang/String;)Ljava/lang/String;' ifTrue:[
|
|
92 |
^ self getParameter:(aMessage arguments at:1)
|
|
93 |
].
|
|
94 |
selector == #'getAppletContext()Ljava/applet/AppletContext;' ifTrue:[
|
|
95 |
^ self getAppletContext
|
|
96 |
].
|
|
97 |
selector == #'appletResize(II)V' ifTrue:[
|
|
98 |
self appletResize:(aMessage arguments at:1) _:(aMessage arguments at:2).
|
|
99 |
^ nil "/ void
|
|
100 |
].
|
|
101 |
^ super doesNotUnderstand:aMessage
|
|
102 |
|
|
103 |
"Created: / 7.1.1998 / 17:13:11 / cg"
|
|
104 |
"Modified: / 12.1.1998 / 12:53:56 / cg"
|
|
105 |
!
|
|
106 |
|
194
|
107 |
getAppletContext
|
|
108 |
^ appletContext
|
|
109 |
|
|
110 |
"Created: 1.8.1997 / 15:57:20 / cg"
|
|
111 |
!
|
|
112 |
|
|
113 |
getCodeBase
|
|
114 |
^ codeBase
|
|
115 |
|
|
116 |
"Created: 1.8.1997 / 15:57:11 / cg"
|
|
117 |
!
|
|
118 |
|
|
119 |
getDocumentBase
|
|
120 |
^ documentBase
|
|
121 |
|
|
122 |
"Created: 1.8.1997 / 15:57:05 / cg"
|
|
123 |
!
|
|
124 |
|
|
125 |
getParameter:arg
|
217
|
126 |
|s|
|
|
127 |
|
203
|
128 |
(parameter includesKey:arg) ifFalse:[
|
217
|
129 |
"/ self halt:'no parameter for: ' , arg displayString.
|
218
|
130 |
^ nil.
|
|
131 |
|
217
|
132 |
s := Dialog request:('applet wants parameter for ' , (Java as_ST_String:arg)).
|
|
133 |
^ Java as_String:s.
|
203
|
134 |
].
|
194
|
135 |
^ parameter at:arg ifAbsent:nil
|
|
136 |
|
|
137 |
"Created: 1.8.1997 / 15:56:51 / cg"
|
218
|
138 |
"Modified: 14.8.1997 / 01:28:56 / cg"
|
194
|
139 |
! !
|
|
140 |
|
|
141 |
!SmalltalkAppletStub class methodsFor:'documentation'!
|
|
142 |
|
|
143 |
version
|
255
|
144 |
^ '$Header: /home/jv/Projects/SmalltalkX/repositories/cvs/stx/libjava/SmalltalkAppletStub.st,v 1.6 1998/01/12 14:24:47 cg Exp $'
|
194
|
145 |
! !
|