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:#SmalltalkAppletContext
|
|
24 |
instanceVariableNames:'statusHolder'
|
|
25 |
classVariableNames:''
|
|
26 |
poolDictionaries:''
|
|
27 |
category:'Languages-Java-Views-Support'
|
|
28 |
!
|
|
29 |
|
|
30 |
!SmalltalkAppletContext 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 |
!SmalltalkAppletContext methodsFor:'accessing'!
|
|
57 |
|
1033
|
58 |
getImage: url
|
|
59 |
| imgSource toolKit |
|
752
|
60 |
|
|
61 |
"return
|
|
62 |
Toolkit.getDefaultToolkit().createImage(new sun.awt.image.URLImageSource(arg1)))"
|
1033
|
63 |
imgSource := (JavaVM classForName: 'sun.awt.image.URLImageSource')
|
|
64 |
newCleared.
|
|
65 |
imgSource perform: #'<init>(Ljava/net/URL;)V' with: url.
|
|
66 |
toolKit := (Java classForName: 'java.awt.Toolkit')
|
|
67 |
perform: #getDefaultToolkit.
|
|
68 |
^ toolKit perform: #createImage with: imgSource.
|
752
|
69 |
|
|
70 |
"Modified: / 4.11.1998 / 21:07:48 / cg"
|
|
71 |
!
|
|
72 |
|
1033
|
73 |
showStatus: arg
|
|
74 |
| msg |
|
752
|
75 |
|
1033
|
76 |
arg isJavaObject ifTrue: [
|
|
77 |
(arg isMemberOf: (JavaVM classForName: 'java.lang.String')) ifTrue: [
|
|
78 |
msg := Java as_ST_String: arg
|
|
79 |
] ifFalse: [ msg := arg printString ]
|
|
80 |
] ifFalse: [ msg := arg ].
|
|
81 |
statusHolder notNil ifTrue: [ statusHolder value: msg ] ifFalse: [
|
|
82 |
Transcript showCR: msg
|
752
|
83 |
].
|
|
84 |
^ nil
|
|
85 |
|
|
86 |
"Created: 1.8.1997 / 15:48:53 / cg"
|
|
87 |
"Modified: 8.8.1997 / 12:07:43 / cg"
|
|
88 |
! !
|
|
89 |
|
|
90 |
!SmalltalkAppletContext methodsFor:'java accessing'!
|
|
91 |
|
|
92 |
doesNotUnderstand:aMessage
|
|
93 |
|selector img|
|
|
94 |
|
|
95 |
(selector := aMessage selector) == #'showStatus(Ljava/lang/String;)V' ifTrue:[
|
|
96 |
self showStatus:(Java as_ST_String:(aMessage arguments at:1)).
|
|
97 |
^ self
|
|
98 |
].
|
|
99 |
selector == #'getImage(Ljava/net/URL;)Ljava/awt/Image;' ifTrue:[
|
|
100 |
^ self getImage:(aMessage arguments at:1).
|
|
101 |
].
|
|
102 |
^ super doesNotUnderstand:aMessage
|
|
103 |
|
|
104 |
"Created: / 12.1.1998 / 23:48:10 / cg"
|
|
105 |
"Modified: / 12.1.1998 / 23:53:31 / cg"
|
|
106 |
! !
|
|
107 |
|
|
108 |
!SmalltalkAppletContext class methodsFor:'documentation'!
|
|
109 |
|
|
110 |
version
|
1864
|
111 |
^ '$Header$'
|
|
112 |
!
|
|
113 |
|
|
114 |
version_HG
|
|
115 |
|
|
116 |
^ '$Changeset: <not expanded> $'
|
752
|
117 |
!
|
|
118 |
|
|
119 |
version_SVN
|
1864
|
120 |
^ '§Id§'
|
1033
|
121 |
! !
|