752
|
1 |
"
|
1152
|
2 |
COPYRIGHT (c) 1996-2011 by Claus Gittinger
|
|
3 |
|
1155
|
4 |
New code and modifications done at SWING Research Group [1]:
|
1152
|
5 |
|
|
6 |
COPYRIGHT (c) 2010-2011 by Jan Vrany, Jan Kurs and Marcel Hlopko
|
|
7 |
SWING Research Group, Czech Technical University in Prague
|
|
8 |
|
752
|
9 |
This software is furnished under a license and may be used
|
|
10 |
only in accordance with the terms of that license and with the
|
|
11 |
inclusion of the above copyright notice. This software may not
|
|
12 |
be provided or otherwise made available to, or used by, any
|
|
13 |
other person. No title to or ownership of the software is
|
|
14 |
hereby transferred.
|
1152
|
15 |
|
1155
|
16 |
[1] Code written at SWING Research Group contains a signature
|
|
17 |
of one of the above copright owners. For exact set of such code,
|
|
18 |
see the differences between this version and version stx:libjava
|
1152
|
19 |
as of 1.9.2010
|
752
|
20 |
"
|
|
21 |
"{ Package: 'stx:libjava' }"
|
|
22 |
|
|
23 |
Object subclass:#SmalltalkAppletStub
|
|
24 |
instanceVariableNames:'parameter documentBase codeBase appletContext'
|
|
25 |
classVariableNames:''
|
|
26 |
poolDictionaries:''
|
|
27 |
category:'Languages-Java-Views-Support'
|
|
28 |
!
|
|
29 |
|
|
30 |
!SmalltalkAppletStub class methodsFor:'documentation'!
|
|
31 |
|
|
32 |
copyright
|
|
33 |
"
|
1152
|
34 |
COPYRIGHT (c) 1996-2011 by Claus Gittinger
|
|
35 |
|
1155
|
36 |
New code and modifications done at SWING Research Group [1]:
|
1152
|
37 |
|
|
38 |
COPYRIGHT (c) 2010-2011 by Jan Vrany, Jan Kurs and Marcel Hlopko
|
|
39 |
SWING Research Group, Czech Technical University in Prague
|
|
40 |
|
752
|
41 |
This software is furnished under a license and may be used
|
|
42 |
only in accordance with the terms of that license and with the
|
|
43 |
inclusion of the above copyright notice. This software may not
|
|
44 |
be provided or otherwise made available to, or used by, any
|
|
45 |
other person. No title to or ownership of the software is
|
|
46 |
hereby transferred.
|
|
47 |
|
1155
|
48 |
[1] Code written at SWING Research Group contains a signature
|
|
49 |
of one of the above copright owners. For exact set of such code,
|
|
50 |
see the differences between this version and version stx:libjava
|
1152
|
51 |
as of 1.9.2010
|
752
|
52 |
|
1152
|
53 |
"
|
752
|
54 |
! !
|
|
55 |
|
|
56 |
!SmalltalkAppletStub methodsFor:'accessing'!
|
|
57 |
|
|
58 |
appletContext
|
|
59 |
"return the value of the instance variable 'appletContext' (automatically generated)"
|
|
60 |
|
|
61 |
^ appletContext
|
|
62 |
|
|
63 |
"Created: 1.8.1997 / 15:56:20 / cg"
|
|
64 |
!
|
|
65 |
|
|
66 |
appletContext:something
|
|
67 |
"set the value of the instance variable 'appletContext' (automatically generated)"
|
|
68 |
|
|
69 |
appletContext := something.
|
|
70 |
|
|
71 |
"Created: 1.8.1997 / 15:56:20 / cg"
|
|
72 |
!
|
|
73 |
|
|
74 |
codeBase
|
|
75 |
"return the value of the instance variable 'codeBase' (automatically generated)"
|
|
76 |
|
|
77 |
^ codeBase
|
|
78 |
|
|
79 |
"Created: 1.8.1997 / 15:56:20 / cg"
|
|
80 |
!
|
|
81 |
|
|
82 |
codeBase:something
|
|
83 |
"set the value of the instance variable 'codeBase' (automatically generated)"
|
|
84 |
|
|
85 |
codeBase := something.
|
|
86 |
|
|
87 |
"Created: 1.8.1997 / 15:56:20 / cg"
|
|
88 |
!
|
|
89 |
|
|
90 |
documentBase
|
|
91 |
"return the value of the instance variable 'documentBase' (automatically generated)"
|
|
92 |
|
|
93 |
^ documentBase
|
|
94 |
|
|
95 |
"Created: 1.8.1997 / 15:56:20 / cg"
|
|
96 |
!
|
|
97 |
|
|
98 |
documentBase:something
|
|
99 |
"set the value of the instance variable 'documentBase' (automatically generated)"
|
|
100 |
|
|
101 |
documentBase := something.
|
|
102 |
|
|
103 |
"Created: 1.8.1997 / 15:56:20 / cg"
|
|
104 |
!
|
|
105 |
|
|
106 |
parameter
|
|
107 |
"return the value of the instance variable 'parameter' (automatically generated)"
|
|
108 |
|
|
109 |
^ parameter
|
|
110 |
|
|
111 |
"Created: 1.8.1997 / 15:56:19 / cg"
|
|
112 |
!
|
|
113 |
|
|
114 |
parameter:something
|
|
115 |
"set the value of the instance variable 'parameter' (automatically generated)"
|
|
116 |
|
|
117 |
parameter := something.
|
|
118 |
|
|
119 |
"Created: 1.8.1997 / 15:56:20 / cg"
|
|
120 |
! !
|
|
121 |
|
|
122 |
!SmalltalkAppletStub methodsFor:'applet actions'!
|
|
123 |
|
|
124 |
appletResize:newWidth _:newHeight
|
|
125 |
self halt.
|
|
126 |
|
|
127 |
"Created: 13.8.1997 / 00:18:41 / cg"
|
|
128 |
! !
|
|
129 |
|
|
130 |
!SmalltalkAppletStub methodsFor:'java accessing'!
|
|
131 |
|
|
132 |
doesNotUnderstand:aMessage
|
|
133 |
|selector base|
|
|
134 |
|
|
135 |
selector := aMessage selector.
|
|
136 |
selector == #'getParameter(Ljava/lang/String;)Ljava/lang/String;' ifTrue:[
|
|
137 |
^ self getParameter:(aMessage arguments at:1)
|
|
138 |
].
|
|
139 |
selector == #'getAppletContext()Ljava/applet/AppletContext;' ifTrue:[
|
|
140 |
^ self getAppletContext
|
|
141 |
].
|
|
142 |
selector == #'getCodeBase()Ljava/net/URL;' ifTrue:[
|
|
143 |
^ self getCodeBase.
|
|
144 |
].
|
|
145 |
selector == #'appletResize(II)V' ifTrue:[
|
|
146 |
self appletResize:(aMessage arguments at:1) _:(aMessage arguments at:2).
|
|
147 |
^ nil "/ void
|
|
148 |
].
|
|
149 |
^ super doesNotUnderstand:aMessage
|
|
150 |
|
|
151 |
"Created: / 7.1.1998 / 17:13:11 / cg"
|
|
152 |
"Modified: / 12.1.1998 / 23:50:40 / cg"
|
|
153 |
!
|
|
154 |
|
|
155 |
getAppletContext
|
|
156 |
^ appletContext
|
|
157 |
|
|
158 |
"Created: 1.8.1997 / 15:57:20 / cg"
|
|
159 |
!
|
|
160 |
|
|
161 |
getCodeBase
|
|
162 |
^ codeBase
|
|
163 |
|
|
164 |
"Created: 1.8.1997 / 15:57:11 / cg"
|
|
165 |
!
|
|
166 |
|
|
167 |
getDocumentBase
|
|
168 |
^ documentBase
|
|
169 |
|
|
170 |
"Created: 1.8.1997 / 15:57:05 / cg"
|
|
171 |
!
|
|
172 |
|
|
173 |
getParameter:arg
|
|
174 |
|s|
|
|
175 |
|
|
176 |
(parameter includesKey:arg) ifFalse:[
|
|
177 |
"/ self halt:'no parameter for: ' , arg displayString.
|
|
178 |
^ nil.
|
|
179 |
|
|
180 |
s := Dialog request:('applet wants parameter for ' , (Java as_ST_String:arg)).
|
|
181 |
^ Java as_String:s.
|
|
182 |
].
|
|
183 |
^ parameter at:arg ifAbsent:nil
|
|
184 |
|
|
185 |
"Created: 1.8.1997 / 15:56:51 / cg"
|
|
186 |
"Modified: 14.8.1997 / 01:28:56 / cg"
|
|
187 |
! !
|
|
188 |
|
|
189 |
!SmalltalkAppletStub class methodsFor:'documentation'!
|
|
190 |
|
|
191 |
version
|
1864
|
192 |
^ '$Header$'
|
|
193 |
!
|
|
194 |
|
|
195 |
version_HG
|
|
196 |
|
|
197 |
^ '$Changeset: <not expanded> $'
|
752
|
198 |
!
|
|
199 |
|
|
200 |
version_SVN
|
1864
|
201 |
^ '§Id§'
|
1152
|
202 |
! !
|