author | Jan Vrany <jan.vrany@fit.cvut.cz> |
Wed, 12 Feb 2014 11:10:13 +0000 | |
branch | development |
changeset 3024 | 93a610491bf8 |
parent 2731 | 13f5be2bf83b |
child 3324 | a58245c0e83a |
permissions | -rw-r--r-- |
545 | 1 |
" |
2353
fa7400d022a0
Updated to https://swing.fit.cvut.cz/hg/stx.libjava/rev/31f8b995905e
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
2254
diff
changeset
|
2 |
COPYRIGHT (c) 1996-2011 by Claus Gittinger |
fa7400d022a0
Updated to https://swing.fit.cvut.cz/hg/stx.libjava/rev/31f8b995905e
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
2254
diff
changeset
|
3 |
|
fa7400d022a0
Updated to https://swing.fit.cvut.cz/hg/stx.libjava/rev/31f8b995905e
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
2254
diff
changeset
|
4 |
New code and modifications done at SWING Research Group [1]: |
fa7400d022a0
Updated to https://swing.fit.cvut.cz/hg/stx.libjava/rev/31f8b995905e
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
2254
diff
changeset
|
5 |
|
fa7400d022a0
Updated to https://swing.fit.cvut.cz/hg/stx.libjava/rev/31f8b995905e
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
2254
diff
changeset
|
6 |
COPYRIGHT (c) 2010-2011 by Jan Vrany, Jan Kurs and Marcel Hlopko |
fa7400d022a0
Updated to https://swing.fit.cvut.cz/hg/stx.libjava/rev/31f8b995905e
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
2254
diff
changeset
|
7 |
SWING Research Group, Czech Technical University in Prague |
545 | 8 |
|
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. |
|
2353
fa7400d022a0
Updated to https://swing.fit.cvut.cz/hg/stx.libjava/rev/31f8b995905e
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
2254
diff
changeset
|
15 |
|
fa7400d022a0
Updated to https://swing.fit.cvut.cz/hg/stx.libjava/rev/31f8b995905e
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
2254
diff
changeset
|
16 |
[1] Code written at SWING Research Group contains a signature |
fa7400d022a0
Updated to https://swing.fit.cvut.cz/hg/stx.libjava/rev/31f8b995905e
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
2254
diff
changeset
|
17 |
of one of the above copright owners. For exact set of such code, |
fa7400d022a0
Updated to https://swing.fit.cvut.cz/hg/stx.libjava/rev/31f8b995905e
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
2254
diff
changeset
|
18 |
see the differences between this version and version stx:libjava |
fa7400d022a0
Updated to https://swing.fit.cvut.cz/hg/stx.libjava/rev/31f8b995905e
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
2254
diff
changeset
|
19 |
as of 1.9.2010 |
545 | 20 |
" |
713 | 21 |
"{ Package: 'stx:libjava' }" |
22 |
||
178 | 23 |
Object subclass:#SmalltalkAppletContext |
193 | 24 |
instanceVariableNames:'statusHolder' |
178 | 25 |
classVariableNames:'' |
26 |
poolDictionaries:'' |
|
713 | 27 |
category:'Languages-Java-Views-Support' |
178 | 28 |
! |
29 |
||
545 | 30 |
!SmalltalkAppletContext class methodsFor:'documentation'! |
31 |
||
32 |
copyright |
|
33 |
" |
|
2353
fa7400d022a0
Updated to https://swing.fit.cvut.cz/hg/stx.libjava/rev/31f8b995905e
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
2254
diff
changeset
|
34 |
COPYRIGHT (c) 1996-2011 by Claus Gittinger |
fa7400d022a0
Updated to https://swing.fit.cvut.cz/hg/stx.libjava/rev/31f8b995905e
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
2254
diff
changeset
|
35 |
|
fa7400d022a0
Updated to https://swing.fit.cvut.cz/hg/stx.libjava/rev/31f8b995905e
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
2254
diff
changeset
|
36 |
New code and modifications done at SWING Research Group [1]: |
fa7400d022a0
Updated to https://swing.fit.cvut.cz/hg/stx.libjava/rev/31f8b995905e
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
2254
diff
changeset
|
37 |
|
fa7400d022a0
Updated to https://swing.fit.cvut.cz/hg/stx.libjava/rev/31f8b995905e
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
2254
diff
changeset
|
38 |
COPYRIGHT (c) 2010-2011 by Jan Vrany, Jan Kurs and Marcel Hlopko |
fa7400d022a0
Updated to https://swing.fit.cvut.cz/hg/stx.libjava/rev/31f8b995905e
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
2254
diff
changeset
|
39 |
SWING Research Group, Czech Technical University in Prague |
545 | 40 |
|
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 |
||
2353
fa7400d022a0
Updated to https://swing.fit.cvut.cz/hg/stx.libjava/rev/31f8b995905e
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
2254
diff
changeset
|
48 |
[1] Code written at SWING Research Group contains a signature |
fa7400d022a0
Updated to https://swing.fit.cvut.cz/hg/stx.libjava/rev/31f8b995905e
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
2254
diff
changeset
|
49 |
of one of the above copright owners. For exact set of such code, |
fa7400d022a0
Updated to https://swing.fit.cvut.cz/hg/stx.libjava/rev/31f8b995905e
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
2254
diff
changeset
|
50 |
see the differences between this version and version stx:libjava |
fa7400d022a0
Updated to https://swing.fit.cvut.cz/hg/stx.libjava/rev/31f8b995905e
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
2254
diff
changeset
|
51 |
as of 1.9.2010 |
fa7400d022a0
Updated to https://swing.fit.cvut.cz/hg/stx.libjava/rev/31f8b995905e
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
2254
diff
changeset
|
52 |
|
545 | 53 |
" |
54 |
! ! |
|
178 | 55 |
|
56 |
!SmalltalkAppletContext methodsFor:'accessing'! |
|
57 |
||
2353
fa7400d022a0
Updated to https://swing.fit.cvut.cz/hg/stx.libjava/rev/31f8b995905e
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
2254
diff
changeset
|
58 |
getImage: url |
fa7400d022a0
Updated to https://swing.fit.cvut.cz/hg/stx.libjava/rev/31f8b995905e
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
2254
diff
changeset
|
59 |
| imgSource toolKit | |
193 | 60 |
|
61 |
"return |
|
62 |
Toolkit.getDefaultToolkit().createImage(new sun.awt.image.URLImageSource(arg1)))" |
|
2353
fa7400d022a0
Updated to https://swing.fit.cvut.cz/hg/stx.libjava/rev/31f8b995905e
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
2254
diff
changeset
|
63 |
imgSource := (JavaVM classForName: 'sun.awt.image.URLImageSource') |
fa7400d022a0
Updated to https://swing.fit.cvut.cz/hg/stx.libjava/rev/31f8b995905e
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
2254
diff
changeset
|
64 |
newCleared. |
fa7400d022a0
Updated to https://swing.fit.cvut.cz/hg/stx.libjava/rev/31f8b995905e
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
2254
diff
changeset
|
65 |
imgSource perform: #'<init>(Ljava/net/URL;)V' with: url. |
fa7400d022a0
Updated to https://swing.fit.cvut.cz/hg/stx.libjava/rev/31f8b995905e
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
2254
diff
changeset
|
66 |
toolKit := (Java classForName: 'java.awt.Toolkit') |
fa7400d022a0
Updated to https://swing.fit.cvut.cz/hg/stx.libjava/rev/31f8b995905e
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
2254
diff
changeset
|
67 |
perform: #getDefaultToolkit. |
fa7400d022a0
Updated to https://swing.fit.cvut.cz/hg/stx.libjava/rev/31f8b995905e
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
2254
diff
changeset
|
68 |
^ toolKit perform: #createImage with: imgSource. |
193 | 69 |
|
419 | 70 |
"Modified: / 4.11.1998 / 21:07:48 / cg" |
193 | 71 |
! |
72 |
||
2353
fa7400d022a0
Updated to https://swing.fit.cvut.cz/hg/stx.libjava/rev/31f8b995905e
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
2254
diff
changeset
|
73 |
showStatus: arg |
fa7400d022a0
Updated to https://swing.fit.cvut.cz/hg/stx.libjava/rev/31f8b995905e
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
2254
diff
changeset
|
74 |
| msg | |
193 | 75 |
|
2353
fa7400d022a0
Updated to https://swing.fit.cvut.cz/hg/stx.libjava/rev/31f8b995905e
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
2254
diff
changeset
|
76 |
arg isJavaObject ifTrue: [ |
fa7400d022a0
Updated to https://swing.fit.cvut.cz/hg/stx.libjava/rev/31f8b995905e
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
2254
diff
changeset
|
77 |
(arg isMemberOf: (JavaVM classForName: 'java.lang.String')) ifTrue: [ |
fa7400d022a0
Updated to https://swing.fit.cvut.cz/hg/stx.libjava/rev/31f8b995905e
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
2254
diff
changeset
|
78 |
msg := Java as_ST_String: arg |
fa7400d022a0
Updated to https://swing.fit.cvut.cz/hg/stx.libjava/rev/31f8b995905e
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
2254
diff
changeset
|
79 |
] ifFalse: [ msg := arg printString ] |
fa7400d022a0
Updated to https://swing.fit.cvut.cz/hg/stx.libjava/rev/31f8b995905e
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
2254
diff
changeset
|
80 |
] ifFalse: [ msg := arg ]. |
fa7400d022a0
Updated to https://swing.fit.cvut.cz/hg/stx.libjava/rev/31f8b995905e
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
2254
diff
changeset
|
81 |
statusHolder notNil ifTrue: [ statusHolder value: msg ] ifFalse: [ |
fa7400d022a0
Updated to https://swing.fit.cvut.cz/hg/stx.libjava/rev/31f8b995905e
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
2254
diff
changeset
|
82 |
Transcript showCR: msg |
193 | 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 |
|
2678
c865275e48a7
Updated to match Mercurial revision a00302fe5083 with two tweaks:
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
2396
diff
changeset
|
111 |
^ '$Header: /cvs/stx/stx/libjava/SmalltalkAppletContext.st,v 1.14 2013-09-06 00:41:28 vrany Exp $' |
2353
fa7400d022a0
Updated to https://swing.fit.cvut.cz/hg/stx.libjava/rev/31f8b995905e
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
2254
diff
changeset
|
112 |
! |
fa7400d022a0
Updated to https://swing.fit.cvut.cz/hg/stx.libjava/rev/31f8b995905e
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
2254
diff
changeset
|
113 |
|
fa7400d022a0
Updated to https://swing.fit.cvut.cz/hg/stx.libjava/rev/31f8b995905e
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
2254
diff
changeset
|
114 |
version_CVS |
2678
c865275e48a7
Updated to match Mercurial revision a00302fe5083 with two tweaks:
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
2396
diff
changeset
|
115 |
^ '$Header: /cvs/stx/stx/libjava/SmalltalkAppletContext.st,v 1.14 2013-09-06 00:41:28 vrany Exp $' |
2353
fa7400d022a0
Updated to https://swing.fit.cvut.cz/hg/stx.libjava/rev/31f8b995905e
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
2254
diff
changeset
|
116 |
! |
fa7400d022a0
Updated to https://swing.fit.cvut.cz/hg/stx.libjava/rev/31f8b995905e
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
2254
diff
changeset
|
117 |
|
fa7400d022a0
Updated to https://swing.fit.cvut.cz/hg/stx.libjava/rev/31f8b995905e
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
2254
diff
changeset
|
118 |
version_HG |
fa7400d022a0
Updated to https://swing.fit.cvut.cz/hg/stx.libjava/rev/31f8b995905e
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
2254
diff
changeset
|
119 |
|
fa7400d022a0
Updated to https://swing.fit.cvut.cz/hg/stx.libjava/rev/31f8b995905e
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
2254
diff
changeset
|
120 |
^ '$Changeset: <not expanded> $' |
2151 | 121 |
! |
122 |
||
123 |
version_SVN |
|
2731
13f5be2bf83b
Merged d87e89dd5276 and fe83a843a7bf (branch default - CVS HEAD)
Jan Vrany <jan.vrany@fit.cvut.cz>
diff
changeset
|
124 |
^ 'Id' |
2108 | 125 |
! ! |
2353
fa7400d022a0
Updated to https://swing.fit.cvut.cz/hg/stx.libjava/rev/31f8b995905e
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
2254
diff
changeset
|
126 |