JavaPopUpView.st
author Claus Gittinger <cg@exept.de>
Mon, 30 Dec 2019 19:40:02 +0100
branchcvs_MAIN
changeset 3993 7d6d72ea6cf1
parent 3412 df11bb428463
permissions -rw-r--r--
#OTHER by exept new query
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
545
6a841644c5e9 checkin from browser
cg
parents: 481
diff changeset
     1
"
3324
a58245c0e83a Updated copyright notices.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 2731
diff changeset
     2
 COPYRIGHT (c) 1996-2015 by Claus Gittinger
545
6a841644c5e9 checkin from browser
cg
parents: 481
diff changeset
     3
2353
fa7400d022a0 Updated to https://swing.fit.cvut.cz/hg/stx.libjava/rev/31f8b995905e
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 2164
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: 2164
diff changeset
     5
3324
a58245c0e83a Updated copyright notices.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 2731
diff changeset
     6
 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: 2164
diff changeset
     7
                            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: 2164
diff changeset
     8
545
6a841644c5e9 checkin from browser
cg
parents: 481
diff changeset
     9
 This software is furnished under a license and may be used
6a841644c5e9 checkin from browser
cg
parents: 481
diff changeset
    10
 only in accordance with the terms of that license and with the
6a841644c5e9 checkin from browser
cg
parents: 481
diff changeset
    11
 inclusion of the above copyright notice.   This software may not
6a841644c5e9 checkin from browser
cg
parents: 481
diff changeset
    12
 be provided or otherwise made available to, or used by, any
6a841644c5e9 checkin from browser
cg
parents: 481
diff changeset
    13
 other person.  No title to or ownership of the software is
6a841644c5e9 checkin from browser
cg
parents: 481
diff changeset
    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: 2164
diff changeset
    15
fa7400d022a0 Updated to https://swing.fit.cvut.cz/hg/stx.libjava/rev/31f8b995905e
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 2164
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: 2164
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: 2164
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: 2164
diff changeset
    19
     as of 1.9.2010
2151
c0b6570c6f9b Jan's version
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 2108
diff changeset
    20
"
713
75e92ac63bf1 category change
cg
parents: 545
diff changeset
    21
"{ Package: 'stx:libjava' }"
75e92ac63bf1 category change
cg
parents: 545
diff changeset
    22
481
672f794c4232 initial checkin
cg
parents:
diff changeset
    23
PopUpView subclass:#JavaPopUpView
672f794c4232 initial checkin
cg
parents:
diff changeset
    24
	instanceVariableNames:'eventReceiver updateRegions javaPeer'
672f794c4232 initial checkin
cg
parents:
diff changeset
    25
	classVariableNames:''
672f794c4232 initial checkin
cg
parents:
diff changeset
    26
	poolDictionaries:''
713
75e92ac63bf1 category change
cg
parents: 545
diff changeset
    27
	category:'Languages-Java-Views-Support'
481
672f794c4232 initial checkin
cg
parents:
diff changeset
    28
!
672f794c4232 initial checkin
cg
parents:
diff changeset
    29
545
6a841644c5e9 checkin from browser
cg
parents: 481
diff changeset
    30
!JavaPopUpView class methodsFor:'documentation'!
6a841644c5e9 checkin from browser
cg
parents: 481
diff changeset
    31
6a841644c5e9 checkin from browser
cg
parents: 481
diff changeset
    32
copyright
6a841644c5e9 checkin from browser
cg
parents: 481
diff changeset
    33
"
3324
a58245c0e83a Updated copyright notices.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 2731
diff changeset
    34
 COPYRIGHT (c) 1996-2015 by Claus Gittinger
545
6a841644c5e9 checkin from browser
cg
parents: 481
diff changeset
    35
2353
fa7400d022a0 Updated to https://swing.fit.cvut.cz/hg/stx.libjava/rev/31f8b995905e
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 2164
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: 2164
diff changeset
    37
3324
a58245c0e83a Updated copyright notices.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 2731
diff changeset
    38
 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: 2164
diff changeset
    39
                            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: 2164
diff changeset
    40
545
6a841644c5e9 checkin from browser
cg
parents: 481
diff changeset
    41
 This software is furnished under a license and may be used
6a841644c5e9 checkin from browser
cg
parents: 481
diff changeset
    42
 only in accordance with the terms of that license and with the
6a841644c5e9 checkin from browser
cg
parents: 481
diff changeset
    43
 inclusion of the above copyright notice.   This software may not
6a841644c5e9 checkin from browser
cg
parents: 481
diff changeset
    44
 be provided or otherwise made available to, or used by, any
6a841644c5e9 checkin from browser
cg
parents: 481
diff changeset
    45
 other person.  No title to or ownership of the software is
6a841644c5e9 checkin from browser
cg
parents: 481
diff changeset
    46
 hereby transferred.
6a841644c5e9 checkin from browser
cg
parents: 481
diff changeset
    47
2353
fa7400d022a0 Updated to https://swing.fit.cvut.cz/hg/stx.libjava/rev/31f8b995905e
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 2164
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: 2164
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: 2164
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: 2164
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: 2164
diff changeset
    52
545
6a841644c5e9 checkin from browser
cg
parents: 481
diff changeset
    53
"
6a841644c5e9 checkin from browser
cg
parents: 481
diff changeset
    54
! !
481
672f794c4232 initial checkin
cg
parents:
diff changeset
    55
672f794c4232 initial checkin
cg
parents:
diff changeset
    56
!JavaPopUpView methodsFor:'accessing'!
672f794c4232 initial checkin
cg
parents:
diff changeset
    57
672f794c4232 initial checkin
cg
parents:
diff changeset
    58
delegate:anObject
672f794c4232 initial checkin
cg
parents:
diff changeset
    59
"/    super delegate:anObject.
672f794c4232 initial checkin
cg
parents:
diff changeset
    60
    eventReceiver := anObject.
672f794c4232 initial checkin
cg
parents:
diff changeset
    61
672f794c4232 initial checkin
cg
parents:
diff changeset
    62
    "Modified: / 2.12.1998 / 23:57:57 / cg"
672f794c4232 initial checkin
cg
parents:
diff changeset
    63
    "Created: / 4.12.1998 / 14:09:12 / cg"
672f794c4232 initial checkin
cg
parents:
diff changeset
    64
!
672f794c4232 initial checkin
cg
parents:
diff changeset
    65
672f794c4232 initial checkin
cg
parents:
diff changeset
    66
getNextUpdateRectangle
672f794c4232 initial checkin
cg
parents:
diff changeset
    67
    |r|
672f794c4232 initial checkin
cg
parents:
diff changeset
    68
672f794c4232 initial checkin
cg
parents:
diff changeset
    69
    updateRegions size == 0 ifTrue:[^ nil].
672f794c4232 initial checkin
cg
parents:
diff changeset
    70
    r := updateRegions removeFirst.
672f794c4232 initial checkin
cg
parents:
diff changeset
    71
    updateRegions size == 0 ifTrue:[updateRegions := nil].
672f794c4232 initial checkin
cg
parents:
diff changeset
    72
    ^ r
672f794c4232 initial checkin
cg
parents:
diff changeset
    73
672f794c4232 initial checkin
cg
parents:
diff changeset
    74
    "Created: / 4.12.1998 / 14:09:12 / cg"
672f794c4232 initial checkin
cg
parents:
diff changeset
    75
!
672f794c4232 initial checkin
cg
parents:
diff changeset
    76
672f794c4232 initial checkin
cg
parents:
diff changeset
    77
javaPeer
672f794c4232 initial checkin
cg
parents:
diff changeset
    78
    "for debugging support - here is a handle to the corresponding
672f794c4232 initial checkin
cg
parents:
diff changeset
    79
     javaPeer"
672f794c4232 initial checkin
cg
parents:
diff changeset
    80
672f794c4232 initial checkin
cg
parents:
diff changeset
    81
    ^ javaPeer
672f794c4232 initial checkin
cg
parents:
diff changeset
    82
672f794c4232 initial checkin
cg
parents:
diff changeset
    83
    "Created: / 4.12.1998 / 14:09:13 / cg"
672f794c4232 initial checkin
cg
parents:
diff changeset
    84
!
672f794c4232 initial checkin
cg
parents:
diff changeset
    85
672f794c4232 initial checkin
cg
parents:
diff changeset
    86
javaPeer:aJavaView
672f794c4232 initial checkin
cg
parents:
diff changeset
    87
    "for debugging support - here is a handle to the corresponding
672f794c4232 initial checkin
cg
parents:
diff changeset
    88
     javaPeer"
672f794c4232 initial checkin
cg
parents:
diff changeset
    89
672f794c4232 initial checkin
cg
parents:
diff changeset
    90
    javaPeer := aJavaView
672f794c4232 initial checkin
cg
parents:
diff changeset
    91
672f794c4232 initial checkin
cg
parents:
diff changeset
    92
    "Created: / 4.12.1998 / 14:09:13 / cg"
672f794c4232 initial checkin
cg
parents:
diff changeset
    93
! !
672f794c4232 initial checkin
cg
parents:
diff changeset
    94
672f794c4232 initial checkin
cg
parents:
diff changeset
    95
!JavaPopUpView methodsFor:'defaults'!
672f794c4232 initial checkin
cg
parents:
diff changeset
    96
672f794c4232 initial checkin
cg
parents:
diff changeset
    97
defaultShadow
672f794c4232 initial checkin
cg
parents:
diff changeset
    98
    ^ false
672f794c4232 initial checkin
cg
parents:
diff changeset
    99
672f794c4232 initial checkin
cg
parents:
diff changeset
   100
    "Created: / 4.12.1998 / 15:12:13 / cg"
672f794c4232 initial checkin
cg
parents:
diff changeset
   101
! !
672f794c4232 initial checkin
cg
parents:
diff changeset
   102
672f794c4232 initial checkin
cg
parents:
diff changeset
   103
!JavaPopUpView methodsFor:'event handling'!
672f794c4232 initial checkin
cg
parents:
diff changeset
   104
672f794c4232 initial checkin
cg
parents:
diff changeset
   105
exposeX:x y:y width:w height:h
672f794c4232 initial checkin
cg
parents:
diff changeset
   106
    |ev rect|
672f794c4232 initial checkin
cg
parents:
diff changeset
   107
672f794c4232 initial checkin
cg
parents:
diff changeset
   108
    rect := Rectangle left:x top:y width:w height:h.
672f794c4232 initial checkin
cg
parents:
diff changeset
   109
672f794c4232 initial checkin
cg
parents:
diff changeset
   110
"/ 'JavaView expose' printCR.
672f794c4232 initial checkin
cg
parents:
diff changeset
   111
672f794c4232 initial checkin
cg
parents:
diff changeset
   112
    updateRegions isNil ifTrue:[
672f794c4232 initial checkin
cg
parents:
diff changeset
   113
        updateRegions := OrderedCollection new.
672f794c4232 initial checkin
cg
parents:
diff changeset
   114
    ].
672f794c4232 initial checkin
cg
parents:
diff changeset
   115
    updateRegions add:rect.
672f794c4232 initial checkin
cg
parents:
diff changeset
   116
    eventReceiver notNil ifTrue:[
672f794c4232 initial checkin
cg
parents:
diff changeset
   117
        ev := WindowEvent 
672f794c4232 initial checkin
cg
parents:
diff changeset
   118
                damageFor:self 
672f794c4232 initial checkin
cg
parents:
diff changeset
   119
                rectangle:rect. 
672f794c4232 initial checkin
cg
parents:
diff changeset
   120
        eventReceiver processEvent:ev.
672f794c4232 initial checkin
cg
parents:
diff changeset
   121
    ].
672f794c4232 initial checkin
cg
parents:
diff changeset
   122
"/    super exposeX:x y:y width:w height:h
672f794c4232 initial checkin
cg
parents:
diff changeset
   123
672f794c4232 initial checkin
cg
parents:
diff changeset
   124
    "Modified: / 19.10.1998 / 23:10:15 / cg"
672f794c4232 initial checkin
cg
parents:
diff changeset
   125
    "Created: / 4.12.1998 / 14:09:13 / cg"
672f794c4232 initial checkin
cg
parents:
diff changeset
   126
! !
672f794c4232 initial checkin
cg
parents:
diff changeset
   127
672f794c4232 initial checkin
cg
parents:
diff changeset
   128
!JavaPopUpView methodsFor:'initialization'!
672f794c4232 initial checkin
cg
parents:
diff changeset
   129
672f794c4232 initial checkin
cg
parents:
diff changeset
   130
initialize
672f794c4232 initial checkin
cg
parents:
diff changeset
   131
    super initialize.
672f794c4232 initial checkin
cg
parents:
diff changeset
   132
672f794c4232 initial checkin
cg
parents:
diff changeset
   133
    self enableMotionEvents.
672f794c4232 initial checkin
cg
parents:
diff changeset
   134
672f794c4232 initial checkin
cg
parents:
diff changeset
   135
    "Modified: / 2.12.1998 / 23:32:30 / cg"
672f794c4232 initial checkin
cg
parents:
diff changeset
   136
    "Created: / 4.12.1998 / 14:09:13 / cg"
672f794c4232 initial checkin
cg
parents:
diff changeset
   137
! !
672f794c4232 initial checkin
cg
parents:
diff changeset
   138
672f794c4232 initial checkin
cg
parents:
diff changeset
   139
!JavaPopUpView methodsFor:'queries'!
672f794c4232 initial checkin
cg
parents:
diff changeset
   140
672f794c4232 initial checkin
cg
parents:
diff changeset
   141
isJavaView
672f794c4232 initial checkin
cg
parents:
diff changeset
   142
    ^ true
672f794c4232 initial checkin
cg
parents:
diff changeset
   143
672f794c4232 initial checkin
cg
parents:
diff changeset
   144
    "Created: / 4.12.1998 / 14:09:40 / cg"
672f794c4232 initial checkin
cg
parents:
diff changeset
   145
! !
672f794c4232 initial checkin
cg
parents:
diff changeset
   146
672f794c4232 initial checkin
cg
parents:
diff changeset
   147
!JavaPopUpView class methodsFor:'documentation'!
672f794c4232 initial checkin
cg
parents:
diff changeset
   148
672f794c4232 initial checkin
cg
parents:
diff changeset
   149
version
3412
df11bb428463 Merged with mercurial revision 4f3cc813be4 (8 changesets total)
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 3360
diff changeset
   150
    ^ '$Header: /cvs/stx/stx/libjava/JavaPopUpView.st,v 1.10 2015-03-20 12:08:00 vrany Exp $'
2353
fa7400d022a0 Updated to https://swing.fit.cvut.cz/hg/stx.libjava/rev/31f8b995905e
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 2164
diff changeset
   151
!
fa7400d022a0 Updated to https://swing.fit.cvut.cz/hg/stx.libjava/rev/31f8b995905e
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 2164
diff changeset
   152
fa7400d022a0 Updated to https://swing.fit.cvut.cz/hg/stx.libjava/rev/31f8b995905e
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 2164
diff changeset
   153
version_CVS
3412
df11bb428463 Merged with mercurial revision 4f3cc813be4 (8 changesets total)
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 3360
diff changeset
   154
    ^ '$Header: /cvs/stx/stx/libjava/JavaPopUpView.st,v 1.10 2015-03-20 12:08:00 vrany Exp $'
2353
fa7400d022a0 Updated to https://swing.fit.cvut.cz/hg/stx.libjava/rev/31f8b995905e
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 2164
diff changeset
   155
!
fa7400d022a0 Updated to https://swing.fit.cvut.cz/hg/stx.libjava/rev/31f8b995905e
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 2164
diff changeset
   156
fa7400d022a0 Updated to https://swing.fit.cvut.cz/hg/stx.libjava/rev/31f8b995905e
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 2164
diff changeset
   157
version_HG
fa7400d022a0 Updated to https://swing.fit.cvut.cz/hg/stx.libjava/rev/31f8b995905e
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 2164
diff changeset
   158
fa7400d022a0 Updated to https://swing.fit.cvut.cz/hg/stx.libjava/rev/31f8b995905e
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 2164
diff changeset
   159
    ^ '$Changeset: <not expanded> $'
2151
c0b6570c6f9b Jan's version
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 2108
diff changeset
   160
!
c0b6570c6f9b Jan's version
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 2108
diff changeset
   161
c0b6570c6f9b Jan's version
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 2108
diff changeset
   162
version_SVN
2731
13f5be2bf83b Merged d87e89dd5276 and fe83a843a7bf (branch default - CVS HEAD)
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 2711 2678
diff changeset
   163
    ^ 'Id'
2108
ca8c4e7db2e8 category change
Claus Gittinger <cg@exept.de>
parents: 749
diff changeset
   164
! !
2353
fa7400d022a0 Updated to https://swing.fit.cvut.cz/hg/stx.libjava/rev/31f8b995905e
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 2164
diff changeset
   165