author | jv |
Thu, 23 Sep 2010 13:52:13 +0000 | |
changeset 748 | da0840b7798c |
parent 713 | 75e92ac63bf1 |
child 749 | e898eaeff091 |
permissions | -rw-r--r-- |
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 |
" |
|
12 |
||
13 |
||
14 |
||
15 |
||
713 | 16 |
"{ Package: 'stx:libjava' }" |
17 |
||
178 | 18 |
Object subclass:#SmalltalkAppletContext |
193 | 19 |
instanceVariableNames:'statusHolder' |
178 | 20 |
classVariableNames:'' |
21 |
poolDictionaries:'' |
|
713 | 22 |
category:'Languages-Java-Views-Support' |
178 | 23 |
! |
24 |
||
545 | 25 |
!SmalltalkAppletContext class methodsFor:'documentation'! |
26 |
||
27 |
copyright |
|
28 |
" |
|
29 |
COPYRIGHT (c) 1997 by eXept Software AG |
|
30 |
All Rights Reserved |
|
31 |
||
32 |
This software is furnished under a license and may be used |
|
33 |
only in accordance with the terms of that license and with the |
|
34 |
inclusion of the above copyright notice. This software may not |
|
35 |
be provided or otherwise made available to, or used by, any |
|
36 |
other person. No title to or ownership of the software is |
|
37 |
hereby transferred. |
|
38 |
" |
|
39 |
||
40 |
||
41 |
||
42 |
! |
|
43 |
||
44 |
documentation |
|
45 |
" |
|
46 |
[Author:] |
|
47 |
Claus Gittinger |
|
48 |
" |
|
49 |
||
50 |
||
51 |
! ! |
|
178 | 52 |
|
53 |
!SmalltalkAppletContext methodsFor:'accessing'! |
|
54 |
||
193 | 55 |
getImage:url |
56 |
|imgSource toolKit| |
|
57 |
||
58 |
"return |
|
59 |
Toolkit.getDefaultToolkit().createImage(new sun.awt.image.URLImageSource(arg1)))" |
|
60 |
||
419 | 61 |
imgSource := (Java classForName:'sun.awt.image.URLImageSource') newCleared. |
271 | 62 |
imgSource perform:#'<init>(Ljava/net/URL;)V' with:url. |
193 | 63 |
|
419 | 64 |
toolKit := (Java classForName:'java.awt.Toolkit') perform:#getDefaultToolkit. |
271 | 65 |
^ toolKit perform:#createImage with:imgSource. |
193 | 66 |
|
419 | 67 |
"Modified: / 4.11.1998 / 21:07:48 / cg" |
193 | 68 |
! |
69 |
||
70 |
showStatus:arg |
|
71 |
|msg| |
|
72 |
||
73 |
arg isJavaObject ifTrue:[ |
|
74 |
(arg isMemberOf:(Java classForName:'java.lang.String')) ifTrue:[ |
|
205 | 75 |
msg := Java as_ST_String:arg |
193 | 76 |
] ifFalse:[ |
77 |
msg := arg printString |
|
78 |
] |
|
79 |
] ifFalse:[ |
|
80 |
msg := arg |
|
81 |
]. |
|
82 |
||
83 |
statusHolder notNil ifTrue:[ |
|
84 |
statusHolder value:msg |
|
85 |
] ifFalse:[ |
|
86 |
Transcript showCR:msg |
|
87 |
]. |
|
178 | 88 |
^ nil |
89 |
||
193 | 90 |
"Created: 1.8.1997 / 15:48:53 / cg" |
205 | 91 |
"Modified: 8.8.1997 / 12:07:43 / cg" |
178 | 92 |
! ! |
93 |
||
258 | 94 |
!SmalltalkAppletContext methodsFor:'java accessing'! |
95 |
||
96 |
doesNotUnderstand:aMessage |
|
97 |
|selector img| |
|
98 |
||
99 |
(selector := aMessage selector) == #'showStatus(Ljava/lang/String;)V' ifTrue:[ |
|
100 |
self showStatus:(Java as_ST_String:(aMessage arguments at:1)). |
|
101 |
^ self |
|
102 |
]. |
|
103 |
selector == #'getImage(Ljava/net/URL;)Ljava/awt/Image;' ifTrue:[ |
|
104 |
^ self getImage:(aMessage arguments at:1). |
|
105 |
]. |
|
106 |
^ super doesNotUnderstand:aMessage |
|
107 |
||
108 |
"Created: / 12.1.1998 / 23:48:10 / cg" |
|
109 |
"Modified: / 12.1.1998 / 23:53:31 / cg" |
|
110 |
! ! |
|
111 |
||
178 | 112 |
!SmalltalkAppletContext class methodsFor:'documentation'! |
113 |
||
114 |
version |
|
748
da0840b7798c
Manufactured by SVN::ImportFromCVSTask to fix repository layout
jv
parents:
713
diff
changeset
|
115 |
^ '$Id$' |
178 | 116 |
! ! |