545
|
1 |
"
|
|
2 |
COPYRIGHT (c) 1997 by eXept Software AG
|
|
3 |
All Rights Reserved
|
|
4 |
|
|
5 |
This software is furnished under a license and may be used
|
|
6 |
only in accordance with the terms of that license and with the
|
|
7 |
inclusion of the above copyright notice. This software may not
|
|
8 |
be provided or otherwise made available to, or used by, any
|
|
9 |
other person. No title to or ownership of the software is
|
|
10 |
hereby transferred.
|
|
11 |
"
|
713
|
12 |
"{ Package: 'stx:libjava' }"
|
|
13 |
|
178
|
14 |
Object subclass:#SmalltalkAppletContext
|
193
|
15 |
instanceVariableNames:'statusHolder'
|
178
|
16 |
classVariableNames:''
|
|
17 |
poolDictionaries:''
|
713
|
18 |
category:'Languages-Java-Views-Support'
|
178
|
19 |
!
|
|
20 |
|
545
|
21 |
!SmalltalkAppletContext class methodsFor:'documentation'!
|
|
22 |
|
|
23 |
copyright
|
|
24 |
"
|
|
25 |
COPYRIGHT (c) 1997 by eXept Software AG
|
|
26 |
All Rights Reserved
|
|
27 |
|
|
28 |
This software is furnished under a license and may be used
|
|
29 |
only in accordance with the terms of that license and with the
|
|
30 |
inclusion of the above copyright notice. This software may not
|
|
31 |
be provided or otherwise made available to, or used by, any
|
|
32 |
other person. No title to or ownership of the software is
|
|
33 |
hereby transferred.
|
|
34 |
"
|
|
35 |
|
|
36 |
|
|
37 |
|
|
38 |
!
|
|
39 |
|
|
40 |
documentation
|
|
41 |
"
|
|
42 |
[Author:]
|
|
43 |
Claus Gittinger
|
|
44 |
"
|
|
45 |
|
|
46 |
|
|
47 |
! !
|
178
|
48 |
|
|
49 |
!SmalltalkAppletContext methodsFor:'accessing'!
|
|
50 |
|
193
|
51 |
getImage:url
|
|
52 |
|imgSource toolKit|
|
|
53 |
|
|
54 |
"return
|
|
55 |
Toolkit.getDefaultToolkit().createImage(new sun.awt.image.URLImageSource(arg1)))"
|
|
56 |
|
419
|
57 |
imgSource := (Java classForName:'sun.awt.image.URLImageSource') newCleared.
|
271
|
58 |
imgSource perform:#'<init>(Ljava/net/URL;)V' with:url.
|
193
|
59 |
|
419
|
60 |
toolKit := (Java classForName:'java.awt.Toolkit') perform:#getDefaultToolkit.
|
271
|
61 |
^ toolKit perform:#createImage with:imgSource.
|
193
|
62 |
|
419
|
63 |
"Modified: / 4.11.1998 / 21:07:48 / cg"
|
193
|
64 |
!
|
|
65 |
|
|
66 |
showStatus:arg
|
|
67 |
|msg|
|
|
68 |
|
|
69 |
arg isJavaObject ifTrue:[
|
|
70 |
(arg isMemberOf:(Java classForName:'java.lang.String')) ifTrue:[
|
205
|
71 |
msg := Java as_ST_String:arg
|
193
|
72 |
] ifFalse:[
|
|
73 |
msg := arg printString
|
|
74 |
]
|
|
75 |
] ifFalse:[
|
|
76 |
msg := arg
|
|
77 |
].
|
|
78 |
|
|
79 |
statusHolder notNil ifTrue:[
|
|
80 |
statusHolder value:msg
|
|
81 |
] ifFalse:[
|
|
82 |
Transcript showCR:msg
|
|
83 |
].
|
178
|
84 |
^ nil
|
|
85 |
|
193
|
86 |
"Created: 1.8.1997 / 15:48:53 / cg"
|
205
|
87 |
"Modified: 8.8.1997 / 12:07:43 / cg"
|
178
|
88 |
! !
|
|
89 |
|
258
|
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 |
|
178
|
108 |
!SmalltalkAppletContext class methodsFor:'documentation'!
|
|
109 |
|
|
110 |
version
|
749
|
111 |
^ '$Id: SmalltalkAppletContext.st,v 1.10 2011/08/18 18:42:48 vrany Exp $'
|
|
112 |
!
|
|
113 |
|
|
114 |
version_SVN
|
|
115 |
^ '$Id: SmalltalkAppletContext.st,v 1.10 2011/08/18 18:42:48 vrany Exp $'
|
|
116 |
! ! |