JavaEmbeddedFrameView.st
author Stefan Vogel <sv@exept.de>
Thu, 15 Dec 2016 13:51:57 +0100
branchcvs_MAIN
changeset 3679 53b12bef0d40
parent 3431 82790b1e6d54
child 3695 6ad68b7b47d6
child 3860 e87f2f1439e9
permissions -rw-r--r--
Fix Socket >> #reopenIfPossible to not send unimplemented message
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
3384
98eb8443f4f4 Use new Logger API (use Logger severityXXX instead of symbols)
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 3324
diff changeset
     1
"{ Encoding: utf8 }"
98eb8443f4f4 Use new Logger API (use Logger severityXXX instead of symbols)
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 3324
diff changeset
     2
545
6a841644c5e9 checkin from browser
cg
parents: 527
diff changeset
     3
"
3324
a58245c0e83a Updated copyright notices.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 2731
diff changeset
     4
 COPYRIGHT (c) 1996-2015 by Claus Gittinger
545
6a841644c5e9 checkin from browser
cg
parents: 527
diff changeset
     5
2353
fa7400d022a0 Updated to https://swing.fit.cvut.cz/hg/stx.libjava/rev/31f8b995905e
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 2259
diff changeset
     6
 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: 2259
diff changeset
     7
3324
a58245c0e83a Updated copyright notices.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 2731
diff changeset
     8
 COPYRIGHT (c) 2010-2015 by Jan Vrany, Jan Kurs and Marcel Hlopko
2353
fa7400d022a0 Updated to https://swing.fit.cvut.cz/hg/stx.libjava/rev/31f8b995905e
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 2259
diff changeset
     9
                            SWING Research Group, Czech Technical University in Prague
fa7400d022a0 Updated to https://swing.fit.cvut.cz/hg/stx.libjava/rev/31f8b995905e
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 2259
diff changeset
    10
545
6a841644c5e9 checkin from browser
cg
parents: 527
diff changeset
    11
 This software is furnished under a license and may be used
6a841644c5e9 checkin from browser
cg
parents: 527
diff changeset
    12
 only in accordance with the terms of that license and with the
6a841644c5e9 checkin from browser
cg
parents: 527
diff changeset
    13
 inclusion of the above copyright notice.   This software may not
6a841644c5e9 checkin from browser
cg
parents: 527
diff changeset
    14
 be provided or otherwise made available to, or used by, any
6a841644c5e9 checkin from browser
cg
parents: 527
diff changeset
    15
 other person.  No title to or ownership of the software is
6a841644c5e9 checkin from browser
cg
parents: 527
diff changeset
    16
 hereby transferred.
2353
fa7400d022a0 Updated to https://swing.fit.cvut.cz/hg/stx.libjava/rev/31f8b995905e
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 2259
diff changeset
    17
fa7400d022a0 Updated to https://swing.fit.cvut.cz/hg/stx.libjava/rev/31f8b995905e
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 2259
diff changeset
    18
 [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: 2259
diff changeset
    19
     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: 2259
diff changeset
    20
     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: 2259
diff changeset
    21
     as of 1.9.2010
2151
c0b6570c6f9b Jan's version
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 2116
diff changeset
    22
"
681
c41ba2e76c65 start applet with higher prio,
cg
parents: 653
diff changeset
    23
"{ Package: 'stx:libjava' }"
c41ba2e76c65 start applet with higher prio,
cg
parents: 653
diff changeset
    24
3384
98eb8443f4f4 Use new Logger API (use Logger severityXXX instead of symbols)
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 3324
diff changeset
    25
"{ NameSpace: Smalltalk }"
98eb8443f4f4 Use new Logger API (use Logger severityXXX instead of symbols)
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 3324
diff changeset
    26
233
fc91b8aba669 intitial checkin
cg
parents:
diff changeset
    27
JavaView subclass:#JavaEmbeddedFrameView
282
80e840e0139f now holds all applet setup code
cg
parents: 233
diff changeset
    28
	instanceVariableNames:'codeURL codeBaseURL documentURL archiveURL parameterDictionary
80e840e0139f now holds all applet setup code
cg
parents: 233
diff changeset
    29
		embeddedAppletFrame applet appletID appletThread
288
d71bacb73ff7 checkin from browser
cg
parents: 286
diff changeset
    30
		infoDisplayReceiver autoSetupApplet autoStartApplet
2087
2e1a2d10b891 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2084
diff changeset
    31
		autoDestroyApplet isNS40 attributeHashTable appletIsPreloaded'
282
80e840e0139f now holds all applet setup code
cg
parents: 233
diff changeset
    32
	classVariableNames:'NextSequentialAppletID'
233
fc91b8aba669 intitial checkin
cg
parents:
diff changeset
    33
	poolDictionaries:''
2108
ca8c4e7db2e8 category change
Claus Gittinger <cg@exept.de>
parents: 2087
diff changeset
    34
	category:'Languages-Java-Views-Support'
233
fc91b8aba669 intitial checkin
cg
parents:
diff changeset
    35
!
fc91b8aba669 intitial checkin
cg
parents:
diff changeset
    36
545
6a841644c5e9 checkin from browser
cg
parents: 527
diff changeset
    37
!JavaEmbeddedFrameView class methodsFor:'documentation'!
6a841644c5e9 checkin from browser
cg
parents: 527
diff changeset
    38
6a841644c5e9 checkin from browser
cg
parents: 527
diff changeset
    39
copyright
6a841644c5e9 checkin from browser
cg
parents: 527
diff changeset
    40
"
3324
a58245c0e83a Updated copyright notices.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 2731
diff changeset
    41
 COPYRIGHT (c) 1996-2015 by Claus Gittinger
545
6a841644c5e9 checkin from browser
cg
parents: 527
diff changeset
    42
2353
fa7400d022a0 Updated to https://swing.fit.cvut.cz/hg/stx.libjava/rev/31f8b995905e
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 2259
diff changeset
    43
 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: 2259
diff changeset
    44
3324
a58245c0e83a Updated copyright notices.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 2731
diff changeset
    45
 COPYRIGHT (c) 2010-2015 by Jan Vrany, Jan Kurs and Marcel Hlopko
2353
fa7400d022a0 Updated to https://swing.fit.cvut.cz/hg/stx.libjava/rev/31f8b995905e
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 2259
diff changeset
    46
                            SWING Research Group, Czech Technical University in Prague
fa7400d022a0 Updated to https://swing.fit.cvut.cz/hg/stx.libjava/rev/31f8b995905e
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 2259
diff changeset
    47
545
6a841644c5e9 checkin from browser
cg
parents: 527
diff changeset
    48
 This software is furnished under a license and may be used
6a841644c5e9 checkin from browser
cg
parents: 527
diff changeset
    49
 only in accordance with the terms of that license and with the
6a841644c5e9 checkin from browser
cg
parents: 527
diff changeset
    50
 inclusion of the above copyright notice.   This software may not
6a841644c5e9 checkin from browser
cg
parents: 527
diff changeset
    51
 be provided or otherwise made available to, or used by, any
6a841644c5e9 checkin from browser
cg
parents: 527
diff changeset
    52
 other person.  No title to or ownership of the software is
6a841644c5e9 checkin from browser
cg
parents: 527
diff changeset
    53
 hereby transferred.
6a841644c5e9 checkin from browser
cg
parents: 527
diff changeset
    54
2353
fa7400d022a0 Updated to https://swing.fit.cvut.cz/hg/stx.libjava/rev/31f8b995905e
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 2259
diff changeset
    55
 [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: 2259
diff changeset
    56
     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: 2259
diff changeset
    57
     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: 2259
diff changeset
    58
     as of 1.9.2010
545
6a841644c5e9 checkin from browser
cg
parents: 527
diff changeset
    59
6a841644c5e9 checkin from browser
cg
parents: 527
diff changeset
    60
"
6a841644c5e9 checkin from browser
cg
parents: 527
diff changeset
    61
! !
233
fc91b8aba669 intitial checkin
cg
parents:
diff changeset
    62
2678
c865275e48a7 Updated to match Mercurial revision a00302fe5083 with two tweaks:
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 2562
diff changeset
    63
!JavaEmbeddedFrameView class methodsFor:'others'!
c865275e48a7 Updated to match Mercurial revision a00302fe5083 with two tweaks:
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 2562
diff changeset
    64
c865275e48a7 Updated to match Mercurial revision a00302fe5083 with two tweaks:
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 2562
diff changeset
    65
version_HG
c865275e48a7 Updated to match Mercurial revision a00302fe5083 with two tweaks:
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 2562
diff changeset
    66
c865275e48a7 Updated to match Mercurial revision a00302fe5083 with two tweaks:
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 2562
diff changeset
    67
    ^ '$Changeset: <not expanded> $'
c865275e48a7 Updated to match Mercurial revision a00302fe5083 with two tweaks:
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 2562
diff changeset
    68
! !
c865275e48a7 Updated to match Mercurial revision a00302fe5083 with two tweaks:
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 2562
diff changeset
    69
397
ff55215c1eac fixes to allow multiple java applets in one frame;
cg
parents: 384
diff changeset
    70
!JavaEmbeddedFrameView class methodsFor:'support'!
ff55215c1eac fixes to allow multiple java applets in one frame;
cg
parents: 384
diff changeset
    71
ff55215c1eac fixes to allow multiple java applets in one frame;
cg
parents: 384
diff changeset
    72
newAppletContext
2353
fa7400d022a0 Updated to https://swing.fit.cvut.cz/hg/stx.libjava/rev/31f8b995905e
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 2259
diff changeset
    73
    | jMozillaAppletContextClass |
397
ff55215c1eac fixes to allow multiple java applets in one frame;
cg
parents: 384
diff changeset
    74
ff55215c1eac fixes to allow multiple java applets in one frame;
cg
parents: 384
diff changeset
    75
    "/ this makes it a modzilla applet context ...
2353
fa7400d022a0 Updated to https://swing.fit.cvut.cz/hg/stx.libjava/rev/31f8b995905e
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 2259
diff changeset
    76
    jMozillaAppletContextClass := JavaVM 
fa7400d022a0 Updated to https://swing.fit.cvut.cz/hg/stx.libjava/rev/31f8b995905e
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 2259
diff changeset
    77
                classForName: 'netscape.applet.MozillaAppletContext'.
fa7400d022a0 Updated to https://swing.fit.cvut.cz/hg/stx.libjava/rev/31f8b995905e
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 2259
diff changeset
    78
    jMozillaAppletContextClass isNil ifTrue: [
fa7400d022a0 Updated to https://swing.fit.cvut.cz/hg/stx.libjava/rev/31f8b995905e
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 2259
diff changeset
    79
        self warn: 'no netscape.applet.MozillaAppletContext class'.
397
ff55215c1eac fixes to allow multiple java applets in one frame;
cg
parents: 384
diff changeset
    80
        ^ nil
ff55215c1eac fixes to allow multiple java applets in one frame;
cg
parents: 384
diff changeset
    81
    ].
2353
fa7400d022a0 Updated to https://swing.fit.cvut.cz/hg/stx.libjava/rev/31f8b995905e
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 2259
diff changeset
    82
    jMozillaAppletContextClass instVarNamed: 'debug' put: 1.
397
ff55215c1eac fixes to allow multiple java applets in one frame;
cg
parents: 384
diff changeset
    83
    ^ jMozillaAppletContextClass new.
ff55215c1eac fixes to allow multiple java applets in one frame;
cg
parents: 384
diff changeset
    84
ff55215c1eac fixes to allow multiple java applets in one frame;
cg
parents: 384
diff changeset
    85
    "Created: / 20.10.1998 / 15:40:08 / cg"
ff55215c1eac fixes to allow multiple java applets in one frame;
cg
parents: 384
diff changeset
    86
    "Modified: / 20.10.1998 / 15:43:47 / cg"
ff55215c1eac fixes to allow multiple java applets in one frame;
cg
parents: 384
diff changeset
    87
! !
ff55215c1eac fixes to allow multiple java applets in one frame;
cg
parents: 384
diff changeset
    88
282
80e840e0139f now holds all applet setup code
cg
parents: 233
diff changeset
    89
!JavaEmbeddedFrameView methodsFor:'accessing'!
80e840e0139f now holds all applet setup code
cg
parents: 233
diff changeset
    90
545
6a841644c5e9 checkin from browser
cg
parents: 527
diff changeset
    91
applet
6a841644c5e9 checkin from browser
cg
parents: 527
diff changeset
    92
    ^ applet
6a841644c5e9 checkin from browser
cg
parents: 527
diff changeset
    93
6a841644c5e9 checkin from browser
cg
parents: 527
diff changeset
    94
    "Created: / 26.1.1999 / 13:51:10 / cg"
6a841644c5e9 checkin from browser
cg
parents: 527
diff changeset
    95
!
6a841644c5e9 checkin from browser
cg
parents: 527
diff changeset
    96
282
80e840e0139f now holds all applet setup code
cg
parents: 233
diff changeset
    97
appletID
80e840e0139f now holds all applet setup code
cg
parents: 233
diff changeset
    98
    "return the value of the instance variable 'appletID' (automatically generated)"
80e840e0139f now holds all applet setup code
cg
parents: 233
diff changeset
    99
80e840e0139f now holds all applet setup code
cg
parents: 233
diff changeset
   100
    ^ appletID
80e840e0139f now holds all applet setup code
cg
parents: 233
diff changeset
   101
80e840e0139f now holds all applet setup code
cg
parents: 233
diff changeset
   102
    "Created: / 28.1.1998 / 21:08:54 / cg"
80e840e0139f now holds all applet setup code
cg
parents: 233
diff changeset
   103
!
80e840e0139f now holds all applet setup code
cg
parents: 233
diff changeset
   104
80e840e0139f now holds all applet setup code
cg
parents: 233
diff changeset
   105
appletID:something
80e840e0139f now holds all applet setup code
cg
parents: 233
diff changeset
   106
    "set the value of the instance variable 'appletID' (automatically generated)"
80e840e0139f now holds all applet setup code
cg
parents: 233
diff changeset
   107
80e840e0139f now holds all applet setup code
cg
parents: 233
diff changeset
   108
    appletID := something.
80e840e0139f now holds all applet setup code
cg
parents: 233
diff changeset
   109
80e840e0139f now holds all applet setup code
cg
parents: 233
diff changeset
   110
    "Created: / 28.1.1998 / 21:08:54 / cg"
80e840e0139f now holds all applet setup code
cg
parents: 233
diff changeset
   111
!
80e840e0139f now holds all applet setup code
cg
parents: 233
diff changeset
   112
2087
2e1a2d10b891 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2084
diff changeset
   113
appletIsPreloaded:aBoolean
2e1a2d10b891 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2084
diff changeset
   114
    appletIsPreloaded := aBoolean.
2e1a2d10b891 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2084
diff changeset
   115
!
2e1a2d10b891 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2084
diff changeset
   116
282
80e840e0139f now holds all applet setup code
cg
parents: 233
diff changeset
   117
appletThread
80e840e0139f now holds all applet setup code
cg
parents: 233
diff changeset
   118
    ^ appletThread
80e840e0139f now holds all applet setup code
cg
parents: 233
diff changeset
   119
80e840e0139f now holds all applet setup code
cg
parents: 233
diff changeset
   120
    "Created: / 28.1.1998 / 21:39:42 / cg"
80e840e0139f now holds all applet setup code
cg
parents: 233
diff changeset
   121
!
80e840e0139f now holds all applet setup code
cg
parents: 233
diff changeset
   122
80e840e0139f now holds all applet setup code
cg
parents: 233
diff changeset
   123
archiveURL:anArchiveURLString
80e840e0139f now holds all applet setup code
cg
parents: 233
diff changeset
   124
    archiveURL := anArchiveURLString
80e840e0139f now holds all applet setup code
cg
parents: 233
diff changeset
   125
80e840e0139f now holds all applet setup code
cg
parents: 233
diff changeset
   126
    "Created: / 28.1.1998 / 21:00:38 / cg"
80e840e0139f now holds all applet setup code
cg
parents: 233
diff changeset
   127
!
80e840e0139f now holds all applet setup code
cg
parents: 233
diff changeset
   128
80e840e0139f now holds all applet setup code
cg
parents: 233
diff changeset
   129
codeBaseURL:aCodeBaseURLString
80e840e0139f now holds all applet setup code
cg
parents: 233
diff changeset
   130
    codeBaseURL := aCodeBaseURLString
80e840e0139f now holds all applet setup code
cg
parents: 233
diff changeset
   131
80e840e0139f now holds all applet setup code
cg
parents: 233
diff changeset
   132
    "Created: / 28.1.1998 / 20:59:34 / cg"
80e840e0139f now holds all applet setup code
cg
parents: 233
diff changeset
   133
!
80e840e0139f now holds all applet setup code
cg
parents: 233
diff changeset
   134
80e840e0139f now holds all applet setup code
cg
parents: 233
diff changeset
   135
codeURL:aCodeURLString
80e840e0139f now holds all applet setup code
cg
parents: 233
diff changeset
   136
    codeURL := aCodeURLString
80e840e0139f now holds all applet setup code
cg
parents: 233
diff changeset
   137
80e840e0139f now holds all applet setup code
cg
parents: 233
diff changeset
   138
    "Created: / 28.1.1998 / 21:10:11 / cg"
80e840e0139f now holds all applet setup code
cg
parents: 233
diff changeset
   139
!
80e840e0139f now holds all applet setup code
cg
parents: 233
diff changeset
   140
80e840e0139f now holds all applet setup code
cg
parents: 233
diff changeset
   141
documentURL:aDocumentURLString
80e840e0139f now holds all applet setup code
cg
parents: 233
diff changeset
   142
    documentURL := aDocumentURLString
80e840e0139f now holds all applet setup code
cg
parents: 233
diff changeset
   143
80e840e0139f now holds all applet setup code
cg
parents: 233
diff changeset
   144
    "Created: / 28.1.1998 / 21:00:03 / cg"
80e840e0139f now holds all applet setup code
cg
parents: 233
diff changeset
   145
    "Modified: / 28.1.1998 / 21:00:28 / cg"
80e840e0139f now holds all applet setup code
cg
parents: 233
diff changeset
   146
!
80e840e0139f now holds all applet setup code
cg
parents: 233
diff changeset
   147
80e840e0139f now holds all applet setup code
cg
parents: 233
diff changeset
   148
embeddedAppletFrame
80e840e0139f now holds all applet setup code
cg
parents: 233
diff changeset
   149
    ^ embeddedAppletFrame
80e840e0139f now holds all applet setup code
cg
parents: 233
diff changeset
   150
80e840e0139f now holds all applet setup code
cg
parents: 233
diff changeset
   151
    "Created: / 28.1.1998 / 21:39:35 / cg"
80e840e0139f now holds all applet setup code
cg
parents: 233
diff changeset
   152
!
80e840e0139f now holds all applet setup code
cg
parents: 233
diff changeset
   153
80e840e0139f now holds all applet setup code
cg
parents: 233
diff changeset
   154
infoDisplayReceiver
80e840e0139f now holds all applet setup code
cg
parents: 233
diff changeset
   155
    "return the value of the instance variable 'infoDisplayReceiver' (automatically generated)"
80e840e0139f now holds all applet setup code
cg
parents: 233
diff changeset
   156
80e840e0139f now holds all applet setup code
cg
parents: 233
diff changeset
   157
    ^ infoDisplayReceiver
80e840e0139f now holds all applet setup code
cg
parents: 233
diff changeset
   158
80e840e0139f now holds all applet setup code
cg
parents: 233
diff changeset
   159
    "Created: / 28.1.1998 / 21:43:54 / cg"
80e840e0139f now holds all applet setup code
cg
parents: 233
diff changeset
   160
!
80e840e0139f now holds all applet setup code
cg
parents: 233
diff changeset
   161
80e840e0139f now holds all applet setup code
cg
parents: 233
diff changeset
   162
infoDisplayReceiver:something
80e840e0139f now holds all applet setup code
cg
parents: 233
diff changeset
   163
    "set the value of the instance variable 'infoDisplayReceiver' (automatically generated)"
80e840e0139f now holds all applet setup code
cg
parents: 233
diff changeset
   164
80e840e0139f now holds all applet setup code
cg
parents: 233
diff changeset
   165
    infoDisplayReceiver := something.
80e840e0139f now holds all applet setup code
cg
parents: 233
diff changeset
   166
80e840e0139f now holds all applet setup code
cg
parents: 233
diff changeset
   167
    "Created: / 28.1.1998 / 21:43:54 / cg"
80e840e0139f now holds all applet setup code
cg
parents: 233
diff changeset
   168
!
80e840e0139f now holds all applet setup code
cg
parents: 233
diff changeset
   169
545
6a841644c5e9 checkin from browser
cg
parents: 527
diff changeset
   170
parameterAt:key put:valueString
6a841644c5e9 checkin from browser
cg
parents: 527
diff changeset
   171
    parameterDictionary isNil ifTrue:[
6a841644c5e9 checkin from browser
cg
parents: 527
diff changeset
   172
        parameterDictionary := IdentityDictionary new.
6a841644c5e9 checkin from browser
cg
parents: 527
diff changeset
   173
    ].
6a841644c5e9 checkin from browser
cg
parents: 527
diff changeset
   174
    parameterDictionary at:key put:valueString.
6a841644c5e9 checkin from browser
cg
parents: 527
diff changeset
   175
    attributeHashTable 
6a841644c5e9 checkin from browser
cg
parents: 527
diff changeset
   176
        perform:#'put(Ljava/lang/Object;Ljava/lang/Object;)Ljava/lang/Object;'
6a841644c5e9 checkin from browser
cg
parents: 527
diff changeset
   177
        with:(Java as_String:key)
6a841644c5e9 checkin from browser
cg
parents: 527
diff changeset
   178
        with:(Java as_String:valueString)
6a841644c5e9 checkin from browser
cg
parents: 527
diff changeset
   179
6a841644c5e9 checkin from browser
cg
parents: 527
diff changeset
   180
    "Created: / 26.1.1999 / 13:46:01 / cg"
6a841644c5e9 checkin from browser
cg
parents: 527
diff changeset
   181
    "Modified: / 28.1.1999 / 17:59:36 / cg"
6a841644c5e9 checkin from browser
cg
parents: 527
diff changeset
   182
!
6a841644c5e9 checkin from browser
cg
parents: 527
diff changeset
   183
282
80e840e0139f now holds all applet setup code
cg
parents: 233
diff changeset
   184
parameterDictionary:aParameterDictionary
80e840e0139f now holds all applet setup code
cg
parents: 233
diff changeset
   185
    parameterDictionary := aParameterDictionary
80e840e0139f now holds all applet setup code
cg
parents: 233
diff changeset
   186
80e840e0139f now holds all applet setup code
cg
parents: 233
diff changeset
   187
    "Created: / 28.1.1998 / 21:01:20 / cg"
80e840e0139f now holds all applet setup code
cg
parents: 233
diff changeset
   188
! !
80e840e0139f now holds all applet setup code
cg
parents: 233
diff changeset
   189
80e840e0139f now holds all applet setup code
cg
parents: 233
diff changeset
   190
!JavaEmbeddedFrameView methodsFor:'applet control'!
80e840e0139f now holds all applet setup code
cg
parents: 233
diff changeset
   191
80e840e0139f now holds all applet setup code
cg
parents: 233
diff changeset
   192
appletDESTROY
2353
fa7400d022a0 Updated to https://swing.fit.cvut.cz/hg/stx.libjava/rev/31f8b995905e
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 2259
diff changeset
   193
    | ev |
384
9c0f24e91237 started some support for NS4.0
cg
parents: 318
diff changeset
   194
2353
fa7400d022a0 Updated to https://swing.fit.cvut.cz/hg/stx.libjava/rev/31f8b995905e
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 2259
diff changeset
   195
    isNS40 ifTrue: [
451
50d24dc93f8b checkin from browser
cg
parents: 429
diff changeset
   196
        "/ ev = netscape.applet.AppletEvent(APPLET_DESTROY);
2353
fa7400d022a0 Updated to https://swing.fit.cvut.cz/hg/stx.libjava/rev/31f8b995905e
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 2259
diff changeset
   197
        ev := (JavaVM classForName: 'netscape.applet.AppletEvent') 
fa7400d022a0 Updated to https://swing.fit.cvut.cz/hg/stx.libjava/rev/31f8b995905e
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 2259
diff changeset
   198
                    newWith_int: (embeddedAppletFrame class instVarNamed: 'APPLET_DESTROY').
fa7400d022a0 Updated to https://swing.fit.cvut.cz/hg/stx.libjava/rev/31f8b995905e
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 2259
diff changeset
   199
        embeddedAppletFrame perform: #'sendEvent(Lnetscape/applet/NEvent;)V'
fa7400d022a0 Updated to https://swing.fit.cvut.cz/hg/stx.libjava/rev/31f8b995905e
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 2259
diff changeset
   200
            with: ev.
384
9c0f24e91237 started some support for NS4.0
cg
parents: 318
diff changeset
   201
        ^ self
9c0f24e91237 started some support for NS4.0
cg
parents: 318
diff changeset
   202
    ].
2353
fa7400d022a0 Updated to https://swing.fit.cvut.cz/hg/stx.libjava/rev/31f8b995905e
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 2259
diff changeset
   203
    embeddedAppletFrame perform: #'sendEvent(I)V'
fa7400d022a0 Updated to https://swing.fit.cvut.cz/hg/stx.libjava/rev/31f8b995905e
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 2259
diff changeset
   204
        with: (embeddedAppletFrame class instVarNamed: 'APPLET_DESTROY').
282
80e840e0139f now holds all applet setup code
cg
parents: 233
diff changeset
   205
80e840e0139f now holds all applet setup code
cg
parents: 233
diff changeset
   206
    "Created: / 28.1.1998 / 21:41:45 / cg"
451
50d24dc93f8b checkin from browser
cg
parents: 429
diff changeset
   207
    "Modified: / 13.11.1998 / 14:19:49 / cg"
282
80e840e0139f now holds all applet setup code
cg
parents: 233
diff changeset
   208
!
80e840e0139f now holds all applet setup code
cg
parents: 233
diff changeset
   209
80e840e0139f now holds all applet setup code
cg
parents: 233
diff changeset
   210
appletDISPOSE
2353
fa7400d022a0 Updated to https://swing.fit.cvut.cz/hg/stx.libjava/rev/31f8b995905e
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 2259
diff changeset
   211
    | ev |
384
9c0f24e91237 started some support for NS4.0
cg
parents: 318
diff changeset
   212
2353
fa7400d022a0 Updated to https://swing.fit.cvut.cz/hg/stx.libjava/rev/31f8b995905e
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 2259
diff changeset
   213
    isNS40 ifTrue: [
451
50d24dc93f8b checkin from browser
cg
parents: 429
diff changeset
   214
        "/ ev = netscape.applet.AppletEvent(APPLET_DISPOSE);
2353
fa7400d022a0 Updated to https://swing.fit.cvut.cz/hg/stx.libjava/rev/31f8b995905e
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 2259
diff changeset
   215
        ev := (JavaVM classForName: 'netscape.applet.AppletEvent') 
fa7400d022a0 Updated to https://swing.fit.cvut.cz/hg/stx.libjava/rev/31f8b995905e
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 2259
diff changeset
   216
                    newWith_int: (embeddedAppletFrame class instVarNamed: 'APPLET_DISPOSE').
fa7400d022a0 Updated to https://swing.fit.cvut.cz/hg/stx.libjava/rev/31f8b995905e
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 2259
diff changeset
   217
        embeddedAppletFrame perform: #'sendEvent(Lnetscape/applet/NEvent;)V'
fa7400d022a0 Updated to https://swing.fit.cvut.cz/hg/stx.libjava/rev/31f8b995905e
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 2259
diff changeset
   218
            with: ev.
384
9c0f24e91237 started some support for NS4.0
cg
parents: 318
diff changeset
   219
        ^ self
9c0f24e91237 started some support for NS4.0
cg
parents: 318
diff changeset
   220
    ].
2353
fa7400d022a0 Updated to https://swing.fit.cvut.cz/hg/stx.libjava/rev/31f8b995905e
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 2259
diff changeset
   221
    embeddedAppletFrame perform: #'sendEvent(I)V'
fa7400d022a0 Updated to https://swing.fit.cvut.cz/hg/stx.libjava/rev/31f8b995905e
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 2259
diff changeset
   222
        with: (embeddedAppletFrame class instVarNamed: 'APPLET_DISPOSE').
282
80e840e0139f now holds all applet setup code
cg
parents: 233
diff changeset
   223
80e840e0139f now holds all applet setup code
cg
parents: 233
diff changeset
   224
    "Created: / 28.1.1998 / 21:41:57 / cg"
451
50d24dc93f8b checkin from browser
cg
parents: 429
diff changeset
   225
    "Modified: / 13.11.1998 / 14:19:43 / cg"
282
80e840e0139f now holds all applet setup code
cg
parents: 233
diff changeset
   226
!
80e840e0139f now holds all applet setup code
cg
parents: 233
diff changeset
   227
80e840e0139f now holds all applet setup code
cg
parents: 233
diff changeset
   228
appletINIT
2353
fa7400d022a0 Updated to https://swing.fit.cvut.cz/hg/stx.libjava/rev/31f8b995905e
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 2259
diff changeset
   229
    | ev |
384
9c0f24e91237 started some support for NS4.0
cg
parents: 318
diff changeset
   230
2353
fa7400d022a0 Updated to https://swing.fit.cvut.cz/hg/stx.libjava/rev/31f8b995905e
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 2259
diff changeset
   231
    isNS40 ifTrue: [
451
50d24dc93f8b checkin from browser
cg
parents: 429
diff changeset
   232
        "/ ev = netscape.applet.AppletEvent(APPLET_INIT);
2353
fa7400d022a0 Updated to https://swing.fit.cvut.cz/hg/stx.libjava/rev/31f8b995905e
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 2259
diff changeset
   233
        ev := (JavaVM classForName: 'netscape.applet.AppletEvent') 
fa7400d022a0 Updated to https://swing.fit.cvut.cz/hg/stx.libjava/rev/31f8b995905e
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 2259
diff changeset
   234
                    newWith_int: (embeddedAppletFrame class instVarNamed: 'APPLET_INIT').
fa7400d022a0 Updated to https://swing.fit.cvut.cz/hg/stx.libjava/rev/31f8b995905e
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 2259
diff changeset
   235
        embeddedAppletFrame perform: #'sendEvent(Lnetscape/applet/NEvent;)V'
fa7400d022a0 Updated to https://swing.fit.cvut.cz/hg/stx.libjava/rev/31f8b995905e
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 2259
diff changeset
   236
            with: ev.
384
9c0f24e91237 started some support for NS4.0
cg
parents: 318
diff changeset
   237
        ^ self
9c0f24e91237 started some support for NS4.0
cg
parents: 318
diff changeset
   238
    ].
2353
fa7400d022a0 Updated to https://swing.fit.cvut.cz/hg/stx.libjava/rev/31f8b995905e
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 2259
diff changeset
   239
    embeddedAppletFrame perform: #'sendEvent(I)V'
fa7400d022a0 Updated to https://swing.fit.cvut.cz/hg/stx.libjava/rev/31f8b995905e
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 2259
diff changeset
   240
        with: (embeddedAppletFrame class instVarNamed: 'APPLET_INIT').
282
80e840e0139f now holds all applet setup code
cg
parents: 233
diff changeset
   241
80e840e0139f now holds all applet setup code
cg
parents: 233
diff changeset
   242
    "Created: / 28.1.1998 / 21:17:51 / cg"
451
50d24dc93f8b checkin from browser
cg
parents: 429
diff changeset
   243
    "Modified: / 13.11.1998 / 14:19:35 / cg"
282
80e840e0139f now holds all applet setup code
cg
parents: 233
diff changeset
   244
!
80e840e0139f now holds all applet setup code
cg
parents: 233
diff changeset
   245
80e840e0139f now holds all applet setup code
cg
parents: 233
diff changeset
   246
appletLOAD
2353
fa7400d022a0 Updated to https://swing.fit.cvut.cz/hg/stx.libjava/rev/31f8b995905e
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 2259
diff changeset
   247
    | ev |
384
9c0f24e91237 started some support for NS4.0
cg
parents: 318
diff changeset
   248
2353
fa7400d022a0 Updated to https://swing.fit.cvut.cz/hg/stx.libjava/rev/31f8b995905e
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 2259
diff changeset
   249
    isNS40 ifTrue: [
451
50d24dc93f8b checkin from browser
cg
parents: 429
diff changeset
   250
        "/ ev = netscape.applet.AppletEvent(APPLET_LOAD);
2353
fa7400d022a0 Updated to https://swing.fit.cvut.cz/hg/stx.libjava/rev/31f8b995905e
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 2259
diff changeset
   251
        ev := (JavaVM classForName: 'netscape.applet.AppletEvent') 
fa7400d022a0 Updated to https://swing.fit.cvut.cz/hg/stx.libjava/rev/31f8b995905e
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 2259
diff changeset
   252
                    newWith_int: (embeddedAppletFrame class instVarNamed: 'APPLET_LOAD').
fa7400d022a0 Updated to https://swing.fit.cvut.cz/hg/stx.libjava/rev/31f8b995905e
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 2259
diff changeset
   253
        embeddedAppletFrame perform: #'sendEvent(Lnetscape/applet/NEvent;)V'
fa7400d022a0 Updated to https://swing.fit.cvut.cz/hg/stx.libjava/rev/31f8b995905e
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 2259
diff changeset
   254
            with: ev.
384
9c0f24e91237 started some support for NS4.0
cg
parents: 318
diff changeset
   255
        ^ self
9c0f24e91237 started some support for NS4.0
cg
parents: 318
diff changeset
   256
    ].
2353
fa7400d022a0 Updated to https://swing.fit.cvut.cz/hg/stx.libjava/rev/31f8b995905e
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 2259
diff changeset
   257
    embeddedAppletFrame perform: #'sendEvent(I)V'
fa7400d022a0 Updated to https://swing.fit.cvut.cz/hg/stx.libjava/rev/31f8b995905e
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 2259
diff changeset
   258
        with: (embeddedAppletFrame class instVarNamed: 'APPLET_LOAD').
282
80e840e0139f now holds all applet setup code
cg
parents: 233
diff changeset
   259
80e840e0139f now holds all applet setup code
cg
parents: 233
diff changeset
   260
    "Created: / 28.1.1998 / 21:17:37 / cg"
451
50d24dc93f8b checkin from browser
cg
parents: 429
diff changeset
   261
    "Modified: / 13.11.1998 / 14:19:31 / cg"
282
80e840e0139f now holds all applet setup code
cg
parents: 233
diff changeset
   262
!
80e840e0139f now holds all applet setup code
cg
parents: 233
diff changeset
   263
80e840e0139f now holds all applet setup code
cg
parents: 233
diff changeset
   264
appletSTART
2353
fa7400d022a0 Updated to https://swing.fit.cvut.cz/hg/stx.libjava/rev/31f8b995905e
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 2259
diff changeset
   265
    | ev |
384
9c0f24e91237 started some support for NS4.0
cg
parents: 318
diff changeset
   266
2353
fa7400d022a0 Updated to https://swing.fit.cvut.cz/hg/stx.libjava/rev/31f8b995905e
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 2259
diff changeset
   267
    isNS40 ifTrue: [
451
50d24dc93f8b checkin from browser
cg
parents: 429
diff changeset
   268
        "/ ev = netscape.applet.AppletEvent(APPLET_START);
2353
fa7400d022a0 Updated to https://swing.fit.cvut.cz/hg/stx.libjava/rev/31f8b995905e
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 2259
diff changeset
   269
        ev := (JavaVM classForName: 'netscape.applet.AppletEvent') 
fa7400d022a0 Updated to https://swing.fit.cvut.cz/hg/stx.libjava/rev/31f8b995905e
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 2259
diff changeset
   270
                    newWith_int: (embeddedAppletFrame class instVarNamed: 'APPLET_START').
fa7400d022a0 Updated to https://swing.fit.cvut.cz/hg/stx.libjava/rev/31f8b995905e
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 2259
diff changeset
   271
        embeddedAppletFrame perform: #'sendEvent(Lnetscape/applet/NEvent;)V'
fa7400d022a0 Updated to https://swing.fit.cvut.cz/hg/stx.libjava/rev/31f8b995905e
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 2259
diff changeset
   272
            with: ev.
384
9c0f24e91237 started some support for NS4.0
cg
parents: 318
diff changeset
   273
        ^ self
9c0f24e91237 started some support for NS4.0
cg
parents: 318
diff changeset
   274
    ].
2353
fa7400d022a0 Updated to https://swing.fit.cvut.cz/hg/stx.libjava/rev/31f8b995905e
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 2259
diff changeset
   275
    embeddedAppletFrame perform: #'sendEvent(I)V'
fa7400d022a0 Updated to https://swing.fit.cvut.cz/hg/stx.libjava/rev/31f8b995905e
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 2259
diff changeset
   276
        with: (embeddedAppletFrame class instVarNamed: 'APPLET_START').
282
80e840e0139f now holds all applet setup code
cg
parents: 233
diff changeset
   277
80e840e0139f now holds all applet setup code
cg
parents: 233
diff changeset
   278
    "Created: / 28.1.1998 / 21:18:01 / cg"
451
50d24dc93f8b checkin from browser
cg
parents: 429
diff changeset
   279
    "Modified: / 13.11.1998 / 14:19:21 / cg"
282
80e840e0139f now holds all applet setup code
cg
parents: 233
diff changeset
   280
!
80e840e0139f now holds all applet setup code
cg
parents: 233
diff changeset
   281
80e840e0139f now holds all applet setup code
cg
parents: 233
diff changeset
   282
appletSTOP
2353
fa7400d022a0 Updated to https://swing.fit.cvut.cz/hg/stx.libjava/rev/31f8b995905e
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 2259
diff changeset
   283
    | ev |
384
9c0f24e91237 started some support for NS4.0
cg
parents: 318
diff changeset
   284
2353
fa7400d022a0 Updated to https://swing.fit.cvut.cz/hg/stx.libjava/rev/31f8b995905e
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 2259
diff changeset
   285
    isNS40 ifTrue: [
451
50d24dc93f8b checkin from browser
cg
parents: 429
diff changeset
   286
        "/ ev = netscape.applet.AppletEvent(APPLET_STOP);
2353
fa7400d022a0 Updated to https://swing.fit.cvut.cz/hg/stx.libjava/rev/31f8b995905e
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 2259
diff changeset
   287
        ev := (JavaVM classForName: 'netscape.applet.AppletEvent') 
fa7400d022a0 Updated to https://swing.fit.cvut.cz/hg/stx.libjava/rev/31f8b995905e
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 2259
diff changeset
   288
                    newWith_int: (embeddedAppletFrame class instVarNamed: 'APPLET_STOP').
fa7400d022a0 Updated to https://swing.fit.cvut.cz/hg/stx.libjava/rev/31f8b995905e
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 2259
diff changeset
   289
        embeddedAppletFrame perform: #'sendEvent(Lnetscape/applet/NEvent;)V'
fa7400d022a0 Updated to https://swing.fit.cvut.cz/hg/stx.libjava/rev/31f8b995905e
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 2259
diff changeset
   290
            with: ev.
384
9c0f24e91237 started some support for NS4.0
cg
parents: 318
diff changeset
   291
        ^ self
9c0f24e91237 started some support for NS4.0
cg
parents: 318
diff changeset
   292
    ].
2353
fa7400d022a0 Updated to https://swing.fit.cvut.cz/hg/stx.libjava/rev/31f8b995905e
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 2259
diff changeset
   293
    embeddedAppletFrame perform: #'sendEvent(I)V'
fa7400d022a0 Updated to https://swing.fit.cvut.cz/hg/stx.libjava/rev/31f8b995905e
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 2259
diff changeset
   294
        with: (embeddedAppletFrame class instVarNamed: 'APPLET_STOP').
282
80e840e0139f now holds all applet setup code
cg
parents: 233
diff changeset
   295
80e840e0139f now holds all applet setup code
cg
parents: 233
diff changeset
   296
    "Created: / 28.1.1998 / 21:41:33 / cg"
451
50d24dc93f8b checkin from browser
cg
parents: 429
diff changeset
   297
    "Modified: / 13.11.1998 / 14:19:14 / cg"
282
80e840e0139f now holds all applet setup code
cg
parents: 233
diff changeset
   298
!
80e840e0139f now holds all applet setup code
cg
parents: 233
diff changeset
   299
288
d71bacb73ff7 checkin from browser
cg
parents: 286
diff changeset
   300
autoDestroyApplet:aBoolean
d71bacb73ff7 checkin from browser
cg
parents: 286
diff changeset
   301
    "set/clear the autoDestroy flag.
d71bacb73ff7 checkin from browser
cg
parents: 286
diff changeset
   302
     If set, the applet will be shutDown whenever the I get destroyed.
d71bacb73ff7 checkin from browser
cg
parents: 286
diff changeset
   303
     if clear, the applet is not automatically shutDown and must be
d71bacb73ff7 checkin from browser
cg
parents: 286
diff changeset
   304
     terminated by someone else.
d71bacb73ff7 checkin from browser
cg
parents: 286
diff changeset
   305
     The default is false."
d71bacb73ff7 checkin from browser
cg
parents: 286
diff changeset
   306
d71bacb73ff7 checkin from browser
cg
parents: 286
diff changeset
   307
    autoDestroyApplet := aBoolean.
d71bacb73ff7 checkin from browser
cg
parents: 286
diff changeset
   308
d71bacb73ff7 checkin from browser
cg
parents: 286
diff changeset
   309
    "Created: / 29.1.1998 / 15:18:50 / cg"
d71bacb73ff7 checkin from browser
cg
parents: 286
diff changeset
   310
    "Modified: / 29.1.1998 / 15:21:01 / cg"
d71bacb73ff7 checkin from browser
cg
parents: 286
diff changeset
   311
!
d71bacb73ff7 checkin from browser
cg
parents: 286
diff changeset
   312
d71bacb73ff7 checkin from browser
cg
parents: 286
diff changeset
   313
autoSetupApplet:aBoolean
d71bacb73ff7 checkin from browser
cg
parents: 286
diff changeset
   314
    "set/clear the autoSetup flag.
d71bacb73ff7 checkin from browser
cg
parents: 286
diff changeset
   315
     If set, the appletFrame will be setup whenever the I get realized
d71bacb73ff7 checkin from browser
cg
parents: 286
diff changeset
   316
     for the first time.
d71bacb73ff7 checkin from browser
cg
parents: 286
diff changeset
   317
     If clear, the frame is not automatically setup and must be
d71bacb73ff7 checkin from browser
cg
parents: 286
diff changeset
   318
     setup by someone else.
d71bacb73ff7 checkin from browser
cg
parents: 286
diff changeset
   319
     The default is true."
d71bacb73ff7 checkin from browser
cg
parents: 286
diff changeset
   320
d71bacb73ff7 checkin from browser
cg
parents: 286
diff changeset
   321
d71bacb73ff7 checkin from browser
cg
parents: 286
diff changeset
   322
    autoSetupApplet := aBoolean.
d71bacb73ff7 checkin from browser
cg
parents: 286
diff changeset
   323
d71bacb73ff7 checkin from browser
cg
parents: 286
diff changeset
   324
    "Created: / 29.1.1998 / 15:18:41 / cg"
d71bacb73ff7 checkin from browser
cg
parents: 286
diff changeset
   325
    "Modified: / 29.1.1998 / 20:45:37 / cg"
d71bacb73ff7 checkin from browser
cg
parents: 286
diff changeset
   326
!
d71bacb73ff7 checkin from browser
cg
parents: 286
diff changeset
   327
d71bacb73ff7 checkin from browser
cg
parents: 286
diff changeset
   328
autoStartApplet:aBoolean
d71bacb73ff7 checkin from browser
cg
parents: 286
diff changeset
   329
    "set/clear the autoStart flag.
d71bacb73ff7 checkin from browser
cg
parents: 286
diff changeset
   330
     If set, the applet will be loaded & started whenever the I get realized
d71bacb73ff7 checkin from browser
cg
parents: 286
diff changeset
   331
     for the first time.
d71bacb73ff7 checkin from browser
cg
parents: 286
diff changeset
   332
     If clear, the applet is not automatically started and must be
d71bacb73ff7 checkin from browser
cg
parents: 286
diff changeset
   333
     started by someone else.
d71bacb73ff7 checkin from browser
cg
parents: 286
diff changeset
   334
     The default is false."
d71bacb73ff7 checkin from browser
cg
parents: 286
diff changeset
   335
d71bacb73ff7 checkin from browser
cg
parents: 286
diff changeset
   336
d71bacb73ff7 checkin from browser
cg
parents: 286
diff changeset
   337
    autoStartApplet := aBoolean.
d71bacb73ff7 checkin from browser
cg
parents: 286
diff changeset
   338
d71bacb73ff7 checkin from browser
cg
parents: 286
diff changeset
   339
    "Created: / 29.1.1998 / 15:18:41 / cg"
d71bacb73ff7 checkin from browser
cg
parents: 286
diff changeset
   340
    "Modified: / 29.1.1998 / 15:20:54 / cg"
d71bacb73ff7 checkin from browser
cg
parents: 286
diff changeset
   341
!
d71bacb73ff7 checkin from browser
cg
parents: 286
diff changeset
   342
282
80e840e0139f now holds all applet setup code
cg
parents: 233
diff changeset
   343
startApplet
681
c41ba2e76c65 start applet with higher prio,
cg
parents: 653
diff changeset
   344
    "/ ensure its initialized when the first event comes;
c41ba2e76c65 start applet with higher prio,
cg
parents: 653
diff changeset
   345
    "/ therefore, raise my prio above the event dispatchers prio for a while.
282
80e840e0139f now holds all applet setup code
cg
parents: 233
diff changeset
   346
681
c41ba2e76c65 start applet with higher prio,
cg
parents: 653
diff changeset
   347
    Processor activeProcess withPriority:(Processor activePriority + 1)
c41ba2e76c65 start applet with higher prio,
cg
parents: 653
diff changeset
   348
    do:[
c41ba2e76c65 start applet with higher prio,
cg
parents: 653
diff changeset
   349
        self startAppletThread.
c41ba2e76c65 start applet with higher prio,
cg
parents: 653
diff changeset
   350
2087
2e1a2d10b891 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2084
diff changeset
   351
        appletIsPreloaded ifFalse:[self appletLOAD].
681
c41ba2e76c65 start applet with higher prio,
cg
parents: 653
diff changeset
   352
        self appletINIT.
c41ba2e76c65 start applet with higher prio,
cg
parents: 653
diff changeset
   353
    ].
c41ba2e76c65 start applet with higher prio,
cg
parents: 653
diff changeset
   354
282
80e840e0139f now holds all applet setup code
cg
parents: 233
diff changeset
   355
    self appletSTART
80e840e0139f now holds all applet setup code
cg
parents: 233
diff changeset
   356
80e840e0139f now holds all applet setup code
cg
parents: 233
diff changeset
   357
    "Modified: / 28.1.1998 / 21:30:24 / cg"
80e840e0139f now holds all applet setup code
cg
parents: 233
diff changeset
   358
!
80e840e0139f now holds all applet setup code
cg
parents: 233
diff changeset
   359
80e840e0139f now holds all applet setup code
cg
parents: 233
diff changeset
   360
startAppletThread
80e840e0139f now holds all applet setup code
cg
parents: 233
diff changeset
   361
    |appletName|
80e840e0139f now holds all applet setup code
cg
parents: 233
diff changeset
   362
80e840e0139f now holds all applet setup code
cg
parents: 233
diff changeset
   363
    appletThread := JavaProcess 
80e840e0139f now holds all applet setup code
cg
parents: 233
diff changeset
   364
            for:[
80e840e0139f now holds all applet setup code
cg
parents: 233
diff changeset
   365
                    "/ passnotifications to the documentFrame ...
2562
c0a608f4f88c exception access
Claus Gittinger <cg@exept.de>
parents: 2396
diff changeset
   366
                    UserInformation handle:[:ex |
282
80e840e0139f now holds all applet setup code
cg
parents: 233
diff changeset
   367
                        JavaVM javaConsoleStream showCR:ex errorString.
80e840e0139f now holds all applet setup code
cg
parents: 233
diff changeset
   368
                        ex proceed.
80e840e0139f now holds all applet setup code
cg
parents: 233
diff changeset
   369
                    ] do:[
2562
c0a608f4f88c exception access
Claus Gittinger <cg@exept.de>
parents: 2396
diff changeset
   370
                        ActivityNotification handle:[:ex |
282
80e840e0139f now holds all applet setup code
cg
parents: 233
diff changeset
   371
                            infoDisplayReceiver notNil ifTrue:[
80e840e0139f now holds all applet setup code
cg
parents: 233
diff changeset
   372
                                infoDisplayReceiver infoDisplay:ex errorString.
80e840e0139f now holds all applet setup code
cg
parents: 233
diff changeset
   373
                            ] ifFalse:[
80e840e0139f now holds all applet setup code
cg
parents: 233
diff changeset
   374
                                Transcript showCR:ex errorString
80e840e0139f now holds all applet setup code
cg
parents: 233
diff changeset
   375
                            ].
80e840e0139f now holds all applet setup code
cg
parents: 233
diff changeset
   376
                            ex proceed.
80e840e0139f now holds all applet setup code
cg
parents: 233
diff changeset
   377
                        ] do:[
80e840e0139f now holds all applet setup code
cg
parents: 233
diff changeset
   378
                            [
2116
6178a12902ca Rename AbsoluteTime to Timestamp
Stefan Vogel <sv@exept.de>
parents: 2108
diff changeset
   379
                                "/ Transcript showCR:(Timestamp now printString , ' start embeddedAppletFrame').
282
80e840e0139f now holds all applet setup code
cg
parents: 233
diff changeset
   380
                                embeddedAppletFrame perform:#'run()V'.
2116
6178a12902ca Rename AbsoluteTime to Timestamp
Stefan Vogel <sv@exept.de>
parents: 2108
diff changeset
   381
                            ] ensure:[
690
c9faa0d724d6 *** empty log message ***
cg
parents: 683
diff changeset
   382
                                appletThread notNil ifTrue:[
c9faa0d724d6 *** empty log message ***
cg
parents: 683
diff changeset
   383
                                    appletThread terminateAllSubprocesses.
c9faa0d724d6 *** empty log message ***
cg
parents: 683
diff changeset
   384
                                ].
3384
98eb8443f4f4 Use new Logger API (use Logger severityXXX instead of symbols)
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 3324
diff changeset
   385
                                Logger log:'JAVA applet startup finished' severity: Logger severityDEBUG facility: 'JVM'
282
80e840e0139f now holds all applet setup code
cg
parents: 233
diff changeset
   386
                            ]
80e840e0139f now holds all applet setup code
cg
parents: 233
diff changeset
   387
                        ]
80e840e0139f now holds all applet setup code
cg
parents: 233
diff changeset
   388
                    ]
80e840e0139f now holds all applet setup code
cg
parents: 233
diff changeset
   389
                ]
681
c41ba2e76c65 start applet with higher prio,
cg
parents: 653
diff changeset
   390
            priority:(Processor activePriority "- 1").
282
80e840e0139f now holds all applet setup code
cg
parents: 233
diff changeset
   391
80e840e0139f now holds all applet setup code
cg
parents: 233
diff changeset
   392
    appletName := codeURL asFilename withoutSuffix baseName.
417
d60d5b5da5f9 applet thread name changed.
cg
parents: 397
diff changeset
   393
    appletThread name:('JAVA-' , appletName , '-applet' , ' [startup]').
653
a98a3634389a make processes restartable (for snapshot restart of java threads)
cg
parents: 644
diff changeset
   394
    appletThread restartable:true.
282
80e840e0139f now holds all applet setup code
cg
parents: 233
diff changeset
   395
    appletThread resume.
80e840e0139f now holds all applet setup code
cg
parents: 233
diff changeset
   396
    ^ appletThread.
80e840e0139f now holds all applet setup code
cg
parents: 233
diff changeset
   397
2353
fa7400d022a0 Updated to https://swing.fit.cvut.cz/hg/stx.libjava/rev/31f8b995905e
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 2259
diff changeset
   398
    "Created: / 28-01-1998 / 21:30:32 / cg"
fa7400d022a0 Updated to https://swing.fit.cvut.cz/hg/stx.libjava/rev/31f8b995905e
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 2259
diff changeset
   399
    "Modified: / 24-12-1999 / 02:58:50 / cg"
3384
98eb8443f4f4 Use new Logger API (use Logger severityXXX instead of symbols)
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 3324
diff changeset
   400
    "Modified: / 02-03-2015 / 14:07:10 / Jan Vrany <jan.vrany@fit.cvut.cz>"
286
da220fe69de3 applet startup & shutDown now all done here;
cg
parents: 282
diff changeset
   401
!
da220fe69de3 applet startup & shutDown now all done here;
cg
parents: 282
diff changeset
   402
da220fe69de3 applet startup & shutDown now all done here;
cg
parents: 282
diff changeset
   403
stopApplet
311
b23c5e132b8c hardterminate javaThread, if it did not terminate after 10 tries.
cg
parents: 303
diff changeset
   404
    |n n2|
286
da220fe69de3 applet startup & shutDown now all done here;
cg
parents: 282
diff changeset
   405
da220fe69de3 applet startup & shutDown now all done here;
cg
parents: 282
diff changeset
   406
    (appletThread notNil 
da220fe69de3 applet startup & shutDown now all done here;
cg
parents: 282
diff changeset
   407
    and:[appletThread isDead not])ifTrue:[
318
8720093188f7 debugPrints
cg
parents: 311
diff changeset
   408
"/        'EmbeddedAppletFrame [info]: send APPLET_STOP ...' infoPrintCR.
286
da220fe69de3 applet startup & shutDown now all done here;
cg
parents: 282
diff changeset
   409
        self appletSTOP.
da220fe69de3 applet startup & shutDown now all done here;
cg
parents: 282
diff changeset
   410
318
8720093188f7 debugPrints
cg
parents: 311
diff changeset
   411
"/        'EmbeddedAppletFrame [info]: send APPLET_DESTROY ...' infoPrintCR.
286
da220fe69de3 applet startup & shutDown now all done here;
cg
parents: 282
diff changeset
   412
        self appletDESTROY.
da220fe69de3 applet startup & shutDown now all done here;
cg
parents: 282
diff changeset
   413
318
8720093188f7 debugPrints
cg
parents: 311
diff changeset
   414
"/        'EmbeddedAppletFrame [info]: send APPLET_DISPOSE ...' infoPrintCR.
286
da220fe69de3 applet startup & shutDown now all done here;
cg
parents: 282
diff changeset
   415
        self appletDISPOSE.
da220fe69de3 applet startup & shutDown now all done here;
cg
parents: 282
diff changeset
   416
da220fe69de3 applet startup & shutDown now all done here;
cg
parents: 282
diff changeset
   417
        "/
da220fe69de3 applet startup & shutDown now all done here;
cg
parents: 282
diff changeset
   418
        "/ give it a chance to stop ...
da220fe69de3 applet startup & shutDown now all done here;
cg
parents: 282
diff changeset
   419
        "/
da220fe69de3 applet startup & shutDown now all done here;
cg
parents: 282
diff changeset
   420
        Processor yield.
311
b23c5e132b8c hardterminate javaThread, if it did not terminate after 10 tries.
cg
parents: 303
diff changeset
   421
        n2 := 0.
286
da220fe69de3 applet startup & shutDown now all done here;
cg
parents: 282
diff changeset
   422
        [appletThread isDead] whileFalse:[
455
36fffdce84f7 checkin from browser
cg
parents: 451
diff changeset
   423
            "/ give it a second to shut down ...
286
da220fe69de3 applet startup & shutDown now all done here;
cg
parents: 282
diff changeset
   424
            n := 0.
da220fe69de3 applet startup & shutDown now all done here;
cg
parents: 282
diff changeset
   425
            [n < 10 and:[appletThread isDead not]] whileTrue:[
da220fe69de3 applet startup & shutDown now all done here;
cg
parents: 282
diff changeset
   426
                Delay waitForSeconds:0.1.
da220fe69de3 applet startup & shutDown now all done here;
cg
parents: 282
diff changeset
   427
                n := n + 1.
da220fe69de3 applet startup & shutDown now all done here;
cg
parents: 282
diff changeset
   428
            ].
da220fe69de3 applet startup & shutDown now all done here;
cg
parents: 282
diff changeset
   429
            appletThread isDead ifFalse:[
455
36fffdce84f7 checkin from browser
cg
parents: 451
diff changeset
   430
                "/ after 3 seconds, kill it.
3384
98eb8443f4f4 Use new Logger API (use Logger severityXXX instead of symbols)
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 3324
diff changeset
   431
                Logger log:'EmbeddedAppletFrame: JAVA thread did not stop - soft terminate ...'  severity: Logger severityDEBUG facility: 'JVM'.
527
7eb6f6291fea *** empty log message ***
cg
parents: 455
diff changeset
   432
appletThread == JavaVM javaScreenUpdaterThread ifTrue:[self halt].
653
a98a3634389a make processes restartable (for snapshot restart of java threads)
cg
parents: 644
diff changeset
   433
appletThread == JavaVM javaEventQueueThread ifTrue:[self halt].
286
da220fe69de3 applet startup & shutDown now all done here;
cg
parents: 282
diff changeset
   434
                appletThread terminate.
311
b23c5e132b8c hardterminate javaThread, if it did not terminate after 10 tries.
cg
parents: 303
diff changeset
   435
                n2 := n2 + 1.
455
36fffdce84f7 checkin from browser
cg
parents: 451
diff changeset
   436
                n2 > 3 ifTrue:[
3384
98eb8443f4f4 Use new Logger API (use Logger severityXXX instead of symbols)
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 3324
diff changeset
   437
                    Logger log:'EmbeddedAppletFrame: JAVA thread did not stop - shooting down ...' severity: Logger severityDEBUG facility: 'JVM'.
311
b23c5e132b8c hardterminate javaThread, if it did not terminate after 10 tries.
cg
parents: 303
diff changeset
   438
                    appletThread terminateNoSignal
b23c5e132b8c hardterminate javaThread, if it did not terminate after 10 tries.
cg
parents: 303
diff changeset
   439
                ]
286
da220fe69de3 applet startup & shutDown now all done here;
cg
parents: 282
diff changeset
   440
            ].
da220fe69de3 applet startup & shutDown now all done here;
cg
parents: 282
diff changeset
   441
        ].
da220fe69de3 applet startup & shutDown now all done here;
cg
parents: 282
diff changeset
   442
    ].
da220fe69de3 applet startup & shutDown now all done here;
cg
parents: 282
diff changeset
   443
    appletThread := nil
da220fe69de3 applet startup & shutDown now all done here;
cg
parents: 282
diff changeset
   444
2353
fa7400d022a0 Updated to https://swing.fit.cvut.cz/hg/stx.libjava/rev/31f8b995905e
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 2259
diff changeset
   445
    "Modified: / 24-12-1999 / 02:35:25 / cg"
3384
98eb8443f4f4 Use new Logger API (use Logger severityXXX instead of symbols)
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 3324
diff changeset
   446
    "Modified: / 02-03-2015 / 14:07:04 / Jan Vrany <jan.vrany@fit.cvut.cz>"
286
da220fe69de3 applet startup & shutDown now all done here;
cg
parents: 282
diff changeset
   447
! !
da220fe69de3 applet startup & shutDown now all done here;
cg
parents: 282
diff changeset
   448
da220fe69de3 applet startup & shutDown now all done here;
cg
parents: 282
diff changeset
   449
!JavaEmbeddedFrameView methodsFor:'initialize / release'!
da220fe69de3 applet startup & shutDown now all done here;
cg
parents: 282
diff changeset
   450
da220fe69de3 applet startup & shutDown now all done here;
cg
parents: 282
diff changeset
   451
destroy
da220fe69de3 applet startup & shutDown now all done here;
cg
parents: 282
diff changeset
   452
    autoDestroyApplet == true ifTrue:[
da220fe69de3 applet startup & shutDown now all done here;
cg
parents: 282
diff changeset
   453
        self stopApplet
da220fe69de3 applet startup & shutDown now all done here;
cg
parents: 282
diff changeset
   454
    ].
da220fe69de3 applet startup & shutDown now all done here;
cg
parents: 282
diff changeset
   455
    super destroy.
da220fe69de3 applet startup & shutDown now all done here;
cg
parents: 282
diff changeset
   456
da220fe69de3 applet startup & shutDown now all done here;
cg
parents: 282
diff changeset
   457
    "Created: / 29.1.1998 / 15:21:45 / cg"
da220fe69de3 applet startup & shutDown now all done here;
cg
parents: 282
diff changeset
   458
    "Modified: / 29.1.1998 / 15:28:26 / cg"
da220fe69de3 applet startup & shutDown now all done here;
cg
parents: 282
diff changeset
   459
!
da220fe69de3 applet startup & shutDown now all done here;
cg
parents: 282
diff changeset
   460
545
6a841644c5e9 checkin from browser
cg
parents: 527
diff changeset
   461
initialize           
2087
2e1a2d10b891 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2084
diff changeset
   462
    appletIsPreloaded := false.
545
6a841644c5e9 checkin from browser
cg
parents: 527
diff changeset
   463
    super initialize.
6a841644c5e9 checkin from browser
cg
parents: 527
diff changeset
   464
    viewBackground := Color black.
6a841644c5e9 checkin from browser
cg
parents: 527
diff changeset
   465
6a841644c5e9 checkin from browser
cg
parents: 527
diff changeset
   466
    "Modified: / 28.1.1999 / 17:44:11 / cg"
6a841644c5e9 checkin from browser
cg
parents: 527
diff changeset
   467
!
6a841644c5e9 checkin from browser
cg
parents: 527
diff changeset
   468
286
da220fe69de3 applet startup & shutDown now all done here;
cg
parents: 282
diff changeset
   469
realize
288
d71bacb73ff7 checkin from browser
cg
parents: 286
diff changeset
   470
    autoSetupApplet ~~ false ifTrue:[
397
ff55215c1eac fixes to allow multiple java applets in one frame;
cg
parents: 384
diff changeset
   471
        self setupAppletFrameIn:nil initializeJava:true
288
d71bacb73ff7 checkin from browser
cg
parents: 286
diff changeset
   472
    ].
286
da220fe69de3 applet startup & shutDown now all done here;
cg
parents: 282
diff changeset
   473
    autoStartApplet == true ifTrue:[
288
d71bacb73ff7 checkin from browser
cg
parents: 286
diff changeset
   474
        embeddedAppletFrame notNil ifTrue:[
d71bacb73ff7 checkin from browser
cg
parents: 286
diff changeset
   475
            self startApplet
d71bacb73ff7 checkin from browser
cg
parents: 286
diff changeset
   476
        ]
681
c41ba2e76c65 start applet with higher prio,
cg
parents: 653
diff changeset
   477
    ].
c41ba2e76c65 start applet with higher prio,
cg
parents: 653
diff changeset
   478
    super realize.
286
da220fe69de3 applet startup & shutDown now all done here;
cg
parents: 282
diff changeset
   479
da220fe69de3 applet startup & shutDown now all done here;
cg
parents: 282
diff changeset
   480
    "Created: / 29.1.1998 / 15:21:30 / cg"
397
ff55215c1eac fixes to allow multiple java applets in one frame;
cg
parents: 384
diff changeset
   481
    "Modified: / 20.10.1998 / 15:46:32 / cg"
282
80e840e0139f now holds all applet setup code
cg
parents: 233
diff changeset
   482
! !
80e840e0139f now holds all applet setup code
cg
parents: 233
diff changeset
   483
80e840e0139f now holds all applet setup code
cg
parents: 233
diff changeset
   484
!JavaEmbeddedFrameView methodsFor:'private'!
80e840e0139f now holds all applet setup code
cg
parents: 233
diff changeset
   485
397
ff55215c1eac fixes to allow multiple java applets in one frame;
cg
parents: 384
diff changeset
   486
setupAppletFrameIn:anAppletContextOrNil
644
0294a6ed677e checkin from browser
cg
parents: 545
diff changeset
   487
     ^ self setupAppletFrameIn:anAppletContextOrNil initializeJava:true.
0294a6ed677e checkin from browser
cg
parents: 545
diff changeset
   488
!
0294a6ed677e checkin from browser
cg
parents: 545
diff changeset
   489
2353
fa7400d022a0 Updated to https://swing.fit.cvut.cz/hg/stx.libjava/rev/31f8b995905e
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 2259
diff changeset
   490
setupAppletFrameIn: anAppletContextOrNil initializeJava: initializeJava 
fa7400d022a0 Updated to https://swing.fit.cvut.cz/hg/stx.libjava/rev/31f8b995905e
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 2259
diff changeset
   491
    | appletContext  jEmbeddedAppletFrameClass  jDerivedAppletFrameClass  toolkit  peer  attribs  id  jCodeBaseURL  jDocumentURL  jArchiveURL  u  fn |
282
80e840e0139f now holds all applet setup code
cg
parents: 233
diff changeset
   492
2353
fa7400d022a0 Updated to https://swing.fit.cvut.cz/hg/stx.libjava/rev/31f8b995905e
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 2259
diff changeset
   493
    embeddedAppletFrame notNil ifTrue: [
288
d71bacb73ff7 checkin from browser
cg
parents: 286
diff changeset
   494
        "/ already setup
d71bacb73ff7 checkin from browser
cg
parents: 286
diff changeset
   495
        ^ self
d71bacb73ff7 checkin from browser
cg
parents: 286
diff changeset
   496
    ].
2353
fa7400d022a0 Updated to https://swing.fit.cvut.cz/hg/stx.libjava/rev/31f8b995905e
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 2259
diff changeset
   497
    codeBaseURL isNil ifTrue: [ ^ self ].
fa7400d022a0 Updated to https://swing.fit.cvut.cz/hg/stx.libjava/rev/31f8b995905e
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 2259
diff changeset
   498
    initializeJava ifTrue: [ Java startupJavaSystem. ] ifFalse: [
653
a98a3634389a make processes restartable (for snapshot restart of java threads)
cg
parents: 644
diff changeset
   499
        JavaVM initializeVMIfNoEventThreadRunning
644
0294a6ed677e checkin from browser
cg
parents: 545
diff changeset
   500
    ].
2353
fa7400d022a0 Updated to https://swing.fit.cvut.cz/hg/stx.libjava/rev/31f8b995905e
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 2259
diff changeset
   501
    
644
0294a6ed677e checkin from browser
cg
parents: 545
diff changeset
   502
    "/ if its a relative file-URL, make it relative under
0294a6ed677e checkin from browser
cg
parents: 545
diff changeset
   503
    "/ java...
2353
fa7400d022a0 Updated to https://swing.fit.cvut.cz/hg/stx.libjava/rev/31f8b995905e
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 2259
diff changeset
   504
    
fa7400d022a0 Updated to https://swing.fit.cvut.cz/hg/stx.libjava/rev/31f8b995905e
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 2259
diff changeset
   505
    u := URL fromString: codeBaseURL.
fa7400d022a0 Updated to https://swing.fit.cvut.cz/hg/stx.libjava/rev/31f8b995905e
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 2259
diff changeset
   506
    u method = 'file' ifTrue: [
fa7400d022a0 Updated to https://swing.fit.cvut.cz/hg/stx.libjava/rev/31f8b995905e
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 2259
diff changeset
   507
        fn := Smalltalk getSystemFileName: u file.
fa7400d022a0 Updated to https://swing.fit.cvut.cz/hg/stx.libjava/rev/31f8b995905e
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 2259
diff changeset
   508
        fn isNil ifTrue: [
fa7400d022a0 Updated to https://swing.fit.cvut.cz/hg/stx.libjava/rev/31f8b995905e
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 2259
diff changeset
   509
            fn := Smalltalk getPackageFileName: ('stx/libjava/' , u file).
644
0294a6ed677e checkin from browser
cg
parents: 545
diff changeset
   510
        ]
0294a6ed677e checkin from browser
cg
parents: 545
diff changeset
   511
    ].
2353
fa7400d022a0 Updated to https://swing.fit.cvut.cz/hg/stx.libjava/rev/31f8b995905e
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 2259
diff changeset
   512
    fn notNil ifTrue: [ fn := 'file:' , fn asFilename pathName ] ifFalse: [
644
0294a6ed677e checkin from browser
cg
parents: 545
diff changeset
   513
        fn := codeBaseURL
0294a6ed677e checkin from browser
cg
parents: 545
diff changeset
   514
    ].
2353
fa7400d022a0 Updated to https://swing.fit.cvut.cz/hg/stx.libjava/rev/31f8b995905e
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 2259
diff changeset
   515
    jCodeBaseURL := Java as_URL: fn.
fa7400d022a0 Updated to https://swing.fit.cvut.cz/hg/stx.libjava/rev/31f8b995905e
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 2259
diff changeset
   516
    documentURL notNil ifTrue: [ jDocumentURL := Java as_URL: documentURL. ] ifFalse: [
fa7400d022a0 Updated to https://swing.fit.cvut.cz/hg/stx.libjava/rev/31f8b995905e
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 2259
diff changeset
   517
        jDocumentURL := Java as_URL: fn
288
d71bacb73ff7 checkin from browser
cg
parents: 286
diff changeset
   518
    ].
2353
fa7400d022a0 Updated to https://swing.fit.cvut.cz/hg/stx.libjava/rev/31f8b995905e
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 2259
diff changeset
   519
    archiveURL notNil ifTrue: [ jArchiveURL := Java as_URL: archiveURL. ].
282
80e840e0139f now holds all applet setup code
cg
parents: 233
diff changeset
   520
    id := appletID.
2353
fa7400d022a0 Updated to https://swing.fit.cvut.cz/hg/stx.libjava/rev/31f8b995905e
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 2259
diff changeset
   521
    id isNil ifTrue: [
fa7400d022a0 Updated to https://swing.fit.cvut.cz/hg/stx.libjava/rev/31f8b995905e
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 2259
diff changeset
   522
        NextSequentialAppletID isNil ifTrue: [ NextSequentialAppletID := 1. ].
282
80e840e0139f now holds all applet setup code
cg
parents: 233
diff changeset
   523
        id := NextSequentialAppletID.
80e840e0139f now holds all applet setup code
cg
parents: 233
diff changeset
   524
        NextSequentialAppletID := NextSequentialAppletID + 1
80e840e0139f now holds all applet setup code
cg
parents: 233
diff changeset
   525
    ].
80e840e0139f now holds all applet setup code
cg
parents: 233
diff changeset
   526
    attribs := Dictionary new.
2353
fa7400d022a0 Updated to https://swing.fit.cvut.cz/hg/stx.libjava/rev/31f8b995905e
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 2259
diff changeset
   527
    width notNil ifTrue: [ attribs at: 'width' put: width printString ].
fa7400d022a0 Updated to https://swing.fit.cvut.cz/hg/stx.libjava/rev/31f8b995905e
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 2259
diff changeset
   528
    height notNil ifTrue: [ attribs at: 'height' put: height printString ].
fa7400d022a0 Updated to https://swing.fit.cvut.cz/hg/stx.libjava/rev/31f8b995905e
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 2259
diff changeset
   529
    codeURL notNil ifTrue: [ attribs at: 'code' put: codeURL ].
fa7400d022a0 Updated to https://swing.fit.cvut.cz/hg/stx.libjava/rev/31f8b995905e
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 2259
diff changeset
   530
    parameterDictionary notNil ifTrue: [
fa7400d022a0 Updated to https://swing.fit.cvut.cz/hg/stx.libjava/rev/31f8b995905e
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 2259
diff changeset
   531
        attribs declareAllFrom: parameterDictionary
384
9c0f24e91237 started some support for NS4.0
cg
parents: 318
diff changeset
   532
    ].
2353
fa7400d022a0 Updated to https://swing.fit.cvut.cz/hg/stx.libjava/rev/31f8b995905e
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 2259
diff changeset
   533
    attributeHashTable := Java as_Hashtable: attribs.
fa7400d022a0 Updated to https://swing.fit.cvut.cz/hg/stx.libjava/rev/31f8b995905e
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 2259
diff changeset
   534
    anAppletContextOrNil notNil ifTrue: [ appletContext := anAppletContextOrNil ] ifFalse: [
420
7d5ce7e030d4 checkin from browser
cg
parents: 419
diff changeset
   535
        appletContext := self class newAppletContext.
2353
fa7400d022a0 Updated to https://swing.fit.cvut.cz/hg/stx.libjava/rev/31f8b995905e
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 2259
diff changeset
   536
        appletContext isNil ifTrue: [
fa7400d022a0 Updated to https://swing.fit.cvut.cz/hg/stx.libjava/rev/31f8b995905e
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 2259
diff changeset
   537
            self warn: 'no netscape.applet.MozillaAppletContext class'.
397
ff55215c1eac fixes to allow multiple java applets in one frame;
cg
parents: 384
diff changeset
   538
            ^ false
ff55215c1eac fixes to allow multiple java applets in one frame;
cg
parents: 384
diff changeset
   539
        ].
ff55215c1eac fixes to allow multiple java applets in one frame;
cg
parents: 384
diff changeset
   540
    ].
2353
fa7400d022a0 Updated to https://swing.fit.cvut.cz/hg/stx.libjava/rev/31f8b995905e
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 2259
diff changeset
   541
    jEmbeddedAppletFrameClass := JavaVM 
fa7400d022a0 Updated to https://swing.fit.cvut.cz/hg/stx.libjava/rev/31f8b995905e
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 2259
diff changeset
   542
                classForName: 'netscape.applet.EmbeddedAppletFrame'.
fa7400d022a0 Updated to https://swing.fit.cvut.cz/hg/stx.libjava/rev/31f8b995905e
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 2259
diff changeset
   543
    jEmbeddedAppletFrameClass isNil ifTrue: [
fa7400d022a0 Updated to https://swing.fit.cvut.cz/hg/stx.libjava/rev/31f8b995905e
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 2259
diff changeset
   544
        self warn: 'no netscape.applet.EmbeddedAppletFrame class'.
397
ff55215c1eac fixes to allow multiple java applets in one frame;
cg
parents: 384
diff changeset
   545
        ^ false
ff55215c1eac fixes to allow multiple java applets in one frame;
cg
parents: 384
diff changeset
   546
    ].
2353
fa7400d022a0 Updated to https://swing.fit.cvut.cz/hg/stx.libjava/rev/31f8b995905e
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 2259
diff changeset
   547
    jDerivedAppletFrameClass := Java 
fa7400d022a0 Updated to https://swing.fit.cvut.cz/hg/stx.libjava/rev/31f8b995905e
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 2259
diff changeset
   548
                classForName: 'netscape.applet.DerivedAppletFrame'.
fa7400d022a0 Updated to https://swing.fit.cvut.cz/hg/stx.libjava/rev/31f8b995905e
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 2259
diff changeset
   549
    jDerivedAppletFrameClass notNil ifTrue: [
397
ff55215c1eac fixes to allow multiple java applets in one frame;
cg
parents: 384
diff changeset
   550
        "/ ns4.0
ff55215c1eac fixes to allow multiple java applets in one frame;
cg
parents: 384
diff changeset
   551
        embeddedAppletFrame := jDerivedAppletFrameClass new.
ff55215c1eac fixes to allow multiple java applets in one frame;
cg
parents: 384
diff changeset
   552
        isNS40 := true.
2353
fa7400d022a0 Updated to https://swing.fit.cvut.cz/hg/stx.libjava/rev/31f8b995905e
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 2259
diff changeset
   553
    ] ifFalse: [
397
ff55215c1eac fixes to allow multiple java applets in one frame;
cg
parents: 384
diff changeset
   554
        "/ ns3.x
ff55215c1eac fixes to allow multiple java applets in one frame;
cg
parents: 384
diff changeset
   555
        embeddedAppletFrame := jEmbeddedAppletFrameClass new.
ff55215c1eac fixes to allow multiple java applets in one frame;
cg
parents: 384
diff changeset
   556
        isNS40 := false.
ff55215c1eac fixes to allow multiple java applets in one frame;
cg
parents: 384
diff changeset
   557
    ].
2353
fa7400d022a0 Updated to https://swing.fit.cvut.cz/hg/stx.libjava/rev/31f8b995905e
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 2259
diff changeset
   558
    embeddedAppletFrame instVarNamed: 'pData' put: self.
fa7400d022a0 Updated to https://swing.fit.cvut.cz/hg/stx.libjava/rev/31f8b995905e
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 2259
diff changeset
   559
    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: 2259
diff changeset
   560
                perform: #getDefaultToolkit.
397
ff55215c1eac fixes to allow multiple java applets in one frame;
cg
parents: 384
diff changeset
   561
    peer := toolkit 
2353
fa7400d022a0 Updated to https://swing.fit.cvut.cz/hg/stx.libjava/rev/31f8b995905e
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 2259
diff changeset
   562
                perform: #'createFrame(Ljava/awt/Frame;)Ljava/awt/peer/FramePeer;'
fa7400d022a0 Updated to https://swing.fit.cvut.cz/hg/stx.libjava/rev/31f8b995905e
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 2259
diff changeset
   563
                with: embeddedAppletFrame.
fa7400d022a0 Updated to https://swing.fit.cvut.cz/hg/stx.libjava/rev/31f8b995905e
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 2259
diff changeset
   564
    (embeddedAppletFrame 
fa7400d022a0 Updated to https://swing.fit.cvut.cz/hg/stx.libjava/rev/31f8b995905e
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 2259
diff changeset
   565
        respondsTo: #'<init>(Ljava/net/URL;Ljava/net/URL;Ljava/net/URL;Ljava/util/Hashtable;Lnetscape/applet/MozillaAppletContext;Ljava/lang/Integer;Z)V') 
fa7400d022a0 Updated to https://swing.fit.cvut.cz/hg/stx.libjava/rev/31f8b995905e
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 2259
diff changeset
   566
            ifTrue: [
fa7400d022a0 Updated to https://swing.fit.cvut.cz/hg/stx.libjava/rev/31f8b995905e
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 2259
diff changeset
   567
                "/ 4.0 netscape
fa7400d022a0 Updated to https://swing.fit.cvut.cz/hg/stx.libjava/rev/31f8b995905e
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 2259
diff changeset
   568
                embeddedAppletFrame 
fa7400d022a0 Updated to https://swing.fit.cvut.cz/hg/stx.libjava/rev/31f8b995905e
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 2259
diff changeset
   569
                    perform: #'<init>(Ljava/net/URL;Ljava/net/URL;Ljava/net/URL;Ljava/util/Hashtable;Lnetscape/applet/MozillaAppletContext;Ljava/lang/Integer;Z)V'
fa7400d022a0 Updated to https://swing.fit.cvut.cz/hg/stx.libjava/rev/31f8b995905e
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 2259
diff changeset
   570
                    withArguments: (Array 
fa7400d022a0 Updated to https://swing.fit.cvut.cz/hg/stx.libjava/rev/31f8b995905e
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 2259
diff changeset
   571
                            with: jDocumentURL
fa7400d022a0 Updated to https://swing.fit.cvut.cz/hg/stx.libjava/rev/31f8b995905e
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 2259
diff changeset
   572
                            with: jCodeBaseURL
fa7400d022a0 Updated to https://swing.fit.cvut.cz/hg/stx.libjava/rev/31f8b995905e
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 2259
diff changeset
   573
                            with: jArchiveURL
fa7400d022a0 Updated to https://swing.fit.cvut.cz/hg/stx.libjava/rev/31f8b995905e
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 2259
diff changeset
   574
                            with: attributeHashTable
fa7400d022a0 Updated to https://swing.fit.cvut.cz/hg/stx.libjava/rev/31f8b995905e
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 2259
diff changeset
   575
                            with: appletContext
fa7400d022a0 Updated to https://swing.fit.cvut.cz/hg/stx.libjava/rev/31f8b995905e
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 2259
diff changeset
   576
                            with: (Java as_Integer: id)
fa7400d022a0 Updated to https://swing.fit.cvut.cz/hg/stx.libjava/rev/31f8b995905e
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 2259
diff changeset
   577
                            with: 0).
fa7400d022a0 Updated to https://swing.fit.cvut.cz/hg/stx.libjava/rev/31f8b995905e
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 2259
diff changeset
   578
                
fa7400d022a0 Updated to https://swing.fit.cvut.cz/hg/stx.libjava/rev/31f8b995905e
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 2259
diff changeset
   579
                "/ reloadClasses-boolean
fa7400d022a0 Updated to https://swing.fit.cvut.cz/hg/stx.libjava/rev/31f8b995905e
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 2259
diff changeset
   580
            ]
fa7400d022a0 Updated to https://swing.fit.cvut.cz/hg/stx.libjava/rev/31f8b995905e
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 2259
diff changeset
   581
            ifFalse: [
fa7400d022a0 Updated to https://swing.fit.cvut.cz/hg/stx.libjava/rev/31f8b995905e
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 2259
diff changeset
   582
                (embeddedAppletFrame 
fa7400d022a0 Updated to https://swing.fit.cvut.cz/hg/stx.libjava/rev/31f8b995905e
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 2259
diff changeset
   583
                    respondsTo: #'<init>(Ljava/net/URL;Ljava/net/URL;Ljava/net/URL;Ljava/util/Hashtable;Lnetscape/applet/MozillaAppletContext;Ljava/lang/Integer;)V') 
fa7400d022a0 Updated to https://swing.fit.cvut.cz/hg/stx.libjava/rev/31f8b995905e
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 2259
diff changeset
   584
                        ifTrue: [
fa7400d022a0 Updated to https://swing.fit.cvut.cz/hg/stx.libjava/rev/31f8b995905e
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 2259
diff changeset
   585
                            "/ 3.01 netscape
fa7400d022a0 Updated to https://swing.fit.cvut.cz/hg/stx.libjava/rev/31f8b995905e
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 2259
diff changeset
   586
                            embeddedAppletFrame 
fa7400d022a0 Updated to https://swing.fit.cvut.cz/hg/stx.libjava/rev/31f8b995905e
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 2259
diff changeset
   587
                                perform: #'<init>(Ljava/net/URL;Ljava/net/URL;Ljava/net/URL;Ljava/util/Hashtable;Lnetscape/applet/MozillaAppletContext;Ljava/lang/Integer;)V'
fa7400d022a0 Updated to https://swing.fit.cvut.cz/hg/stx.libjava/rev/31f8b995905e
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 2259
diff changeset
   588
                                with: jDocumentURL
fa7400d022a0 Updated to https://swing.fit.cvut.cz/hg/stx.libjava/rev/31f8b995905e
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 2259
diff changeset
   589
                                with: jCodeBaseURL
fa7400d022a0 Updated to https://swing.fit.cvut.cz/hg/stx.libjava/rev/31f8b995905e
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 2259
diff changeset
   590
                                with: jArchiveURL
fa7400d022a0 Updated to https://swing.fit.cvut.cz/hg/stx.libjava/rev/31f8b995905e
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 2259
diff changeset
   591
                                with: attributeHashTable
fa7400d022a0 Updated to https://swing.fit.cvut.cz/hg/stx.libjava/rev/31f8b995905e
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 2259
diff changeset
   592
                                with: appletContext
fa7400d022a0 Updated to https://swing.fit.cvut.cz/hg/stx.libjava/rev/31f8b995905e
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 2259
diff changeset
   593
                                with: (Java as_Integer: id).
fa7400d022a0 Updated to https://swing.fit.cvut.cz/hg/stx.libjava/rev/31f8b995905e
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 2259
diff changeset
   594
                        ]
fa7400d022a0 Updated to https://swing.fit.cvut.cz/hg/stx.libjava/rev/31f8b995905e
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 2259
diff changeset
   595
                        ifFalse: [
fa7400d022a0 Updated to https://swing.fit.cvut.cz/hg/stx.libjava/rev/31f8b995905e
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 2259
diff changeset
   596
                            "/ oldStyle netscape
fa7400d022a0 Updated to https://swing.fit.cvut.cz/hg/stx.libjava/rev/31f8b995905e
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 2259
diff changeset
   597
                            embeddedAppletFrame 
fa7400d022a0 Updated to https://swing.fit.cvut.cz/hg/stx.libjava/rev/31f8b995905e
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 2259
diff changeset
   598
                                perform: #'<init>(Ljava/net/URL;Ljava/net/URL;Ljava/util/Hashtable;Lnetscape/applet/MozillaAppletContext;I)V'
fa7400d022a0 Updated to https://swing.fit.cvut.cz/hg/stx.libjava/rev/31f8b995905e
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 2259
diff changeset
   599
                                with: jDocumentURL
fa7400d022a0 Updated to https://swing.fit.cvut.cz/hg/stx.libjava/rev/31f8b995905e
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 2259
diff changeset
   600
                                with: jCodeBaseURL
fa7400d022a0 Updated to https://swing.fit.cvut.cz/hg/stx.libjava/rev/31f8b995905e
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 2259
diff changeset
   601
                                with: attributeHashTable
fa7400d022a0 Updated to https://swing.fit.cvut.cz/hg/stx.libjava/rev/31f8b995905e
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 2259
diff changeset
   602
                                with: appletContext
fa7400d022a0 Updated to https://swing.fit.cvut.cz/hg/stx.libjava/rev/31f8b995905e
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 2259
diff changeset
   603
                                with: id.
fa7400d022a0 Updated to https://swing.fit.cvut.cz/hg/stx.libjava/rev/31f8b995905e
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 2259
diff changeset
   604
                        ].
fa7400d022a0 Updated to https://swing.fit.cvut.cz/hg/stx.libjava/rev/31f8b995905e
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 2259
diff changeset
   605
            ].
fa7400d022a0 Updated to https://swing.fit.cvut.cz/hg/stx.libjava/rev/31f8b995905e
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 2259
diff changeset
   606
    embeddedAppletFrame instVarNamed: 'peer' put: peer.
fa7400d022a0 Updated to https://swing.fit.cvut.cz/hg/stx.libjava/rev/31f8b995905e
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 2259
diff changeset
   607
    self javaPeer: peer.
282
80e840e0139f now holds all applet setup code
cg
parents: 233
diff changeset
   608
    ^ true
80e840e0139f now holds all applet setup code
cg
parents: 233
diff changeset
   609
397
ff55215c1eac fixes to allow multiple java applets in one frame;
cg
parents: 384
diff changeset
   610
    "Created: / 20.10.1998 / 15:47:04 / cg"
653
a98a3634389a make processes restartable (for snapshot restart of java threads)
cg
parents: 644
diff changeset
   611
    "Modified: / 24.12.1999 / 01:38:17 / cg"
282
80e840e0139f now holds all applet setup code
cg
parents: 233
diff changeset
   612
! !
80e840e0139f now holds all applet setup code
cg
parents: 233
diff changeset
   613
303
0b95d5f40bf2 checkin from browser
cg
parents: 288
diff changeset
   614
!JavaEmbeddedFrameView methodsFor:'resizing'!
0b95d5f40bf2 checkin from browser
cg
parents: 288
diff changeset
   615
0b95d5f40bf2 checkin from browser
cg
parents: 288
diff changeset
   616
sizeChanged:how
0b95d5f40bf2 checkin from browser
cg
parents: 288
diff changeset
   617
    super sizeChanged:how.
0b95d5f40bf2 checkin from browser
cg
parents: 288
diff changeset
   618
^ self.
0b95d5f40bf2 checkin from browser
cg
parents: 288
diff changeset
   619
    embeddedAppletFrame notNil ifTrue:[
0b95d5f40bf2 checkin from browser
cg
parents: 288
diff changeset
   620
        (embeddedAppletFrame perform:#'isResizable()Z') ~~ 0 ifTrue:[
0b95d5f40bf2 checkin from browser
cg
parents: 288
diff changeset
   621
            self windowGroup sensor
0b95d5f40bf2 checkin from browser
cg
parents: 288
diff changeset
   622
                 pushDamageEvent:(WindowEvent
0b95d5f40bf2 checkin from browser
cg
parents: 288
diff changeset
   623
                                     for:self
0b95d5f40bf2 checkin from browser
cg
parents: 288
diff changeset
   624
                                     type:#configureX:y:width:height:
0b95d5f40bf2 checkin from browser
cg
parents: 288
diff changeset
   625
                                     arguments:(Array with:left with:top with:width with:height)).
0b95d5f40bf2 checkin from browser
cg
parents: 288
diff changeset
   626
"/            embeddedAppletFrame
0b95d5f40bf2 checkin from browser
cg
parents: 288
diff changeset
   627
"/                perform:#'appletResize(II)V'
0b95d5f40bf2 checkin from browser
cg
parents: 288
diff changeset
   628
"/                with:self width
0b95d5f40bf2 checkin from browser
cg
parents: 288
diff changeset
   629
"/                with:self height.
0b95d5f40bf2 checkin from browser
cg
parents: 288
diff changeset
   630
        ]
0b95d5f40bf2 checkin from browser
cg
parents: 288
diff changeset
   631
    ]
0b95d5f40bf2 checkin from browser
cg
parents: 288
diff changeset
   632
0b95d5f40bf2 checkin from browser
cg
parents: 288
diff changeset
   633
    "Modified: / 1.2.1998 / 19:15:07 / cg"
0b95d5f40bf2 checkin from browser
cg
parents: 288
diff changeset
   634
! !
0b95d5f40bf2 checkin from browser
cg
parents: 288
diff changeset
   635
233
fc91b8aba669 intitial checkin
cg
parents:
diff changeset
   636
!JavaEmbeddedFrameView class methodsFor:'documentation'!
fc91b8aba669 intitial checkin
cg
parents:
diff changeset
   637
fc91b8aba669 intitial checkin
cg
parents:
diff changeset
   638
version
3431
82790b1e6d54 Merged with mercurial revision 4f3cc813be4 (8 changesets total)
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 3430
diff changeset
   639
    ^ '$Header: /cvs/stx/stx/libjava/JavaEmbeddedFrameView.st,v 1.35 2015-03-20 12:08:00 vrany Exp $'
2259
25d241dbe673 fixed: #version_SVN ($ to §)
Claus Gittinger <cg@exept.de>
parents: 2162
diff changeset
   640
!
25d241dbe673 fixed: #version_SVN ($ to §)
Claus Gittinger <cg@exept.de>
parents: 2162
diff changeset
   641
25d241dbe673 fixed: #version_SVN ($ to §)
Claus Gittinger <cg@exept.de>
parents: 2162
diff changeset
   642
version_CVS
3431
82790b1e6d54 Merged with mercurial revision 4f3cc813be4 (8 changesets total)
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 3430
diff changeset
   643
    ^ '$Header: /cvs/stx/stx/libjava/JavaEmbeddedFrameView.st,v 1.35 2015-03-20 12:08:00 vrany Exp $'
2151
c0b6570c6f9b Jan's version
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 2116
diff changeset
   644
!
c0b6570c6f9b Jan's version
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 2116
diff changeset
   645
c0b6570c6f9b Jan's version
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 2116
diff changeset
   646
version_SVN
2731
13f5be2bf83b Merged d87e89dd5276 and fe83a843a7bf (branch default - CVS HEAD)
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 2711 2678
diff changeset
   647
    ^ 'Id'
2084
69ecd5609bb3 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 749
diff changeset
   648
! !
2353
fa7400d022a0 Updated to https://swing.fit.cvut.cz/hg/stx.libjava/rev/31f8b995905e
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 2259
diff changeset
   649