JavaPopUpView.st
author Claus Gittinger <cg@exept.de>
Thu, 24 Nov 2011 12:54:59 +0100
changeset 2305 c11e70f81f74
parent 2164 c4682bb0d828
child 2353 fa7400d022a0
permissions -rw-r--r--
fixed: #version_SVN ($ to §)
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
545
6a841644c5e9 checkin from browser
cg
parents: 481
diff changeset
     1
"
2151
c0b6570c6f9b Jan's version
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 2108
diff changeset
     2
 COPYRIGHT (c) 1996-2011 by Claus Gittinger
545
6a841644c5e9 checkin from browser
cg
parents: 481
diff changeset
     3
6a841644c5e9 checkin from browser
cg
parents: 481
diff changeset
     4
 This software is furnished under a license and may be used
6a841644c5e9 checkin from browser
cg
parents: 481
diff changeset
     5
 only in accordance with the terms of that license and with the
6a841644c5e9 checkin from browser
cg
parents: 481
diff changeset
     6
 inclusion of the above copyright notice.   This software may not
6a841644c5e9 checkin from browser
cg
parents: 481
diff changeset
     7
 be provided or otherwise made available to, or used by, any
6a841644c5e9 checkin from browser
cg
parents: 481
diff changeset
     8
 other person.  No title to or ownership of the software is
6a841644c5e9 checkin from browser
cg
parents: 481
diff changeset
     9
 hereby transferred.
2151
c0b6570c6f9b Jan's version
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 2108
diff changeset
    10
"
713
75e92ac63bf1 category change
cg
parents: 545
diff changeset
    11
"{ Package: 'stx:libjava' }"
75e92ac63bf1 category change
cg
parents: 545
diff changeset
    12
481
672f794c4232 initial checkin
cg
parents:
diff changeset
    13
PopUpView subclass:#JavaPopUpView
672f794c4232 initial checkin
cg
parents:
diff changeset
    14
	instanceVariableNames:'eventReceiver updateRegions javaPeer'
672f794c4232 initial checkin
cg
parents:
diff changeset
    15
	classVariableNames:''
672f794c4232 initial checkin
cg
parents:
diff changeset
    16
	poolDictionaries:''
713
75e92ac63bf1 category change
cg
parents: 545
diff changeset
    17
	category:'Languages-Java-Views-Support'
481
672f794c4232 initial checkin
cg
parents:
diff changeset
    18
!
672f794c4232 initial checkin
cg
parents:
diff changeset
    19
545
6a841644c5e9 checkin from browser
cg
parents: 481
diff changeset
    20
!JavaPopUpView class methodsFor:'documentation'!
6a841644c5e9 checkin from browser
cg
parents: 481
diff changeset
    21
6a841644c5e9 checkin from browser
cg
parents: 481
diff changeset
    22
copyright
6a841644c5e9 checkin from browser
cg
parents: 481
diff changeset
    23
"
2151
c0b6570c6f9b Jan's version
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 2108
diff changeset
    24
 COPYRIGHT (c) 1996-2011 by Claus Gittinger
545
6a841644c5e9 checkin from browser
cg
parents: 481
diff changeset
    25
6a841644c5e9 checkin from browser
cg
parents: 481
diff changeset
    26
 This software is furnished under a license and may be used
6a841644c5e9 checkin from browser
cg
parents: 481
diff changeset
    27
 only in accordance with the terms of that license and with the
6a841644c5e9 checkin from browser
cg
parents: 481
diff changeset
    28
 inclusion of the above copyright notice.   This software may not
6a841644c5e9 checkin from browser
cg
parents: 481
diff changeset
    29
 be provided or otherwise made available to, or used by, any
6a841644c5e9 checkin from browser
cg
parents: 481
diff changeset
    30
 other person.  No title to or ownership of the software is
6a841644c5e9 checkin from browser
cg
parents: 481
diff changeset
    31
 hereby transferred.
2108
ca8c4e7db2e8 category change
Claus Gittinger <cg@exept.de>
parents: 749
diff changeset
    32
"
545
6a841644c5e9 checkin from browser
cg
parents: 481
diff changeset
    33
!
6a841644c5e9 checkin from browser
cg
parents: 481
diff changeset
    34
6a841644c5e9 checkin from browser
cg
parents: 481
diff changeset
    35
documentation
6a841644c5e9 checkin from browser
cg
parents: 481
diff changeset
    36
"
6a841644c5e9 checkin from browser
cg
parents: 481
diff changeset
    37
    [Author:]
6a841644c5e9 checkin from browser
cg
parents: 481
diff changeset
    38
        Claus Gittinger
6a841644c5e9 checkin from browser
cg
parents: 481
diff changeset
    39
"
6a841644c5e9 checkin from browser
cg
parents: 481
diff changeset
    40
6a841644c5e9 checkin from browser
cg
parents: 481
diff changeset
    41
6a841644c5e9 checkin from browser
cg
parents: 481
diff changeset
    42
! !
481
672f794c4232 initial checkin
cg
parents:
diff changeset
    43
672f794c4232 initial checkin
cg
parents:
diff changeset
    44
!JavaPopUpView methodsFor:'accessing'!
672f794c4232 initial checkin
cg
parents:
diff changeset
    45
672f794c4232 initial checkin
cg
parents:
diff changeset
    46
delegate:anObject
672f794c4232 initial checkin
cg
parents:
diff changeset
    47
"/    super delegate:anObject.
672f794c4232 initial checkin
cg
parents:
diff changeset
    48
    eventReceiver := anObject.
672f794c4232 initial checkin
cg
parents:
diff changeset
    49
672f794c4232 initial checkin
cg
parents:
diff changeset
    50
    "Modified: / 2.12.1998 / 23:57:57 / cg"
672f794c4232 initial checkin
cg
parents:
diff changeset
    51
    "Created: / 4.12.1998 / 14:09:12 / cg"
672f794c4232 initial checkin
cg
parents:
diff changeset
    52
!
672f794c4232 initial checkin
cg
parents:
diff changeset
    53
672f794c4232 initial checkin
cg
parents:
diff changeset
    54
getNextUpdateRectangle
672f794c4232 initial checkin
cg
parents:
diff changeset
    55
    |r|
672f794c4232 initial checkin
cg
parents:
diff changeset
    56
672f794c4232 initial checkin
cg
parents:
diff changeset
    57
    updateRegions size == 0 ifTrue:[^ nil].
672f794c4232 initial checkin
cg
parents:
diff changeset
    58
    r := updateRegions removeFirst.
672f794c4232 initial checkin
cg
parents:
diff changeset
    59
    updateRegions size == 0 ifTrue:[updateRegions := nil].
672f794c4232 initial checkin
cg
parents:
diff changeset
    60
    ^ r
672f794c4232 initial checkin
cg
parents:
diff changeset
    61
672f794c4232 initial checkin
cg
parents:
diff changeset
    62
    "Created: / 4.12.1998 / 14:09:12 / cg"
672f794c4232 initial checkin
cg
parents:
diff changeset
    63
!
672f794c4232 initial checkin
cg
parents:
diff changeset
    64
672f794c4232 initial checkin
cg
parents:
diff changeset
    65
javaPeer
672f794c4232 initial checkin
cg
parents:
diff changeset
    66
    "for debugging support - here is a handle to the corresponding
672f794c4232 initial checkin
cg
parents:
diff changeset
    67
     javaPeer"
672f794c4232 initial checkin
cg
parents:
diff changeset
    68
672f794c4232 initial checkin
cg
parents:
diff changeset
    69
    ^ javaPeer
672f794c4232 initial checkin
cg
parents:
diff changeset
    70
672f794c4232 initial checkin
cg
parents:
diff changeset
    71
    "Created: / 4.12.1998 / 14:09:13 / cg"
672f794c4232 initial checkin
cg
parents:
diff changeset
    72
!
672f794c4232 initial checkin
cg
parents:
diff changeset
    73
672f794c4232 initial checkin
cg
parents:
diff changeset
    74
javaPeer:aJavaView
672f794c4232 initial checkin
cg
parents:
diff changeset
    75
    "for debugging support - here is a handle to the corresponding
672f794c4232 initial checkin
cg
parents:
diff changeset
    76
     javaPeer"
672f794c4232 initial checkin
cg
parents:
diff changeset
    77
672f794c4232 initial checkin
cg
parents:
diff changeset
    78
    javaPeer := aJavaView
672f794c4232 initial checkin
cg
parents:
diff changeset
    79
672f794c4232 initial checkin
cg
parents:
diff changeset
    80
    "Created: / 4.12.1998 / 14:09:13 / cg"
672f794c4232 initial checkin
cg
parents:
diff changeset
    81
! !
672f794c4232 initial checkin
cg
parents:
diff changeset
    82
672f794c4232 initial checkin
cg
parents:
diff changeset
    83
!JavaPopUpView methodsFor:'defaults'!
672f794c4232 initial checkin
cg
parents:
diff changeset
    84
672f794c4232 initial checkin
cg
parents:
diff changeset
    85
defaultShadow
672f794c4232 initial checkin
cg
parents:
diff changeset
    86
    ^ false
672f794c4232 initial checkin
cg
parents:
diff changeset
    87
672f794c4232 initial checkin
cg
parents:
diff changeset
    88
    "Created: / 4.12.1998 / 15:12:13 / cg"
672f794c4232 initial checkin
cg
parents:
diff changeset
    89
! !
672f794c4232 initial checkin
cg
parents:
diff changeset
    90
672f794c4232 initial checkin
cg
parents:
diff changeset
    91
!JavaPopUpView methodsFor:'event handling'!
672f794c4232 initial checkin
cg
parents:
diff changeset
    92
672f794c4232 initial checkin
cg
parents:
diff changeset
    93
exposeX:x y:y width:w height:h
672f794c4232 initial checkin
cg
parents:
diff changeset
    94
    |ev rect|
672f794c4232 initial checkin
cg
parents:
diff changeset
    95
672f794c4232 initial checkin
cg
parents:
diff changeset
    96
    rect := Rectangle left:x top:y width:w height:h.
672f794c4232 initial checkin
cg
parents:
diff changeset
    97
672f794c4232 initial checkin
cg
parents:
diff changeset
    98
"/ 'JavaView expose' printCR.
672f794c4232 initial checkin
cg
parents:
diff changeset
    99
672f794c4232 initial checkin
cg
parents:
diff changeset
   100
    updateRegions isNil ifTrue:[
672f794c4232 initial checkin
cg
parents:
diff changeset
   101
        updateRegions := OrderedCollection new.
672f794c4232 initial checkin
cg
parents:
diff changeset
   102
    ].
672f794c4232 initial checkin
cg
parents:
diff changeset
   103
    updateRegions add:rect.
672f794c4232 initial checkin
cg
parents:
diff changeset
   104
    eventReceiver notNil ifTrue:[
672f794c4232 initial checkin
cg
parents:
diff changeset
   105
        ev := WindowEvent 
672f794c4232 initial checkin
cg
parents:
diff changeset
   106
                damageFor:self 
672f794c4232 initial checkin
cg
parents:
diff changeset
   107
                rectangle:rect. 
672f794c4232 initial checkin
cg
parents:
diff changeset
   108
        eventReceiver processEvent:ev.
672f794c4232 initial checkin
cg
parents:
diff changeset
   109
    ].
672f794c4232 initial checkin
cg
parents:
diff changeset
   110
"/    super exposeX:x y:y width:w height:h
672f794c4232 initial checkin
cg
parents:
diff changeset
   111
672f794c4232 initial checkin
cg
parents:
diff changeset
   112
    "Modified: / 19.10.1998 / 23:10:15 / cg"
672f794c4232 initial checkin
cg
parents:
diff changeset
   113
    "Created: / 4.12.1998 / 14:09:13 / cg"
672f794c4232 initial checkin
cg
parents:
diff changeset
   114
! !
672f794c4232 initial checkin
cg
parents:
diff changeset
   115
672f794c4232 initial checkin
cg
parents:
diff changeset
   116
!JavaPopUpView methodsFor:'initialization'!
672f794c4232 initial checkin
cg
parents:
diff changeset
   117
672f794c4232 initial checkin
cg
parents:
diff changeset
   118
initialize
672f794c4232 initial checkin
cg
parents:
diff changeset
   119
    super initialize.
672f794c4232 initial checkin
cg
parents:
diff changeset
   120
672f794c4232 initial checkin
cg
parents:
diff changeset
   121
    self enableMotionEvents.
672f794c4232 initial checkin
cg
parents:
diff changeset
   122
672f794c4232 initial checkin
cg
parents:
diff changeset
   123
    "Modified: / 2.12.1998 / 23:32:30 / cg"
672f794c4232 initial checkin
cg
parents:
diff changeset
   124
    "Created: / 4.12.1998 / 14:09:13 / cg"
672f794c4232 initial checkin
cg
parents:
diff changeset
   125
! !
672f794c4232 initial checkin
cg
parents:
diff changeset
   126
672f794c4232 initial checkin
cg
parents:
diff changeset
   127
!JavaPopUpView methodsFor:'queries'!
672f794c4232 initial checkin
cg
parents:
diff changeset
   128
672f794c4232 initial checkin
cg
parents:
diff changeset
   129
isJavaView
672f794c4232 initial checkin
cg
parents:
diff changeset
   130
    ^ true
672f794c4232 initial checkin
cg
parents:
diff changeset
   131
672f794c4232 initial checkin
cg
parents:
diff changeset
   132
    "Created: / 4.12.1998 / 14:09:40 / cg"
672f794c4232 initial checkin
cg
parents:
diff changeset
   133
! !
672f794c4232 initial checkin
cg
parents:
diff changeset
   134
672f794c4232 initial checkin
cg
parents:
diff changeset
   135
!JavaPopUpView class methodsFor:'documentation'!
672f794c4232 initial checkin
cg
parents:
diff changeset
   136
672f794c4232 initial checkin
cg
parents:
diff changeset
   137
version
2164
c4682bb0d828 copyright fixed
Claus Gittinger <cg@exept.de>
parents: 2151
diff changeset
   138
    ^ '$Header: /cvs/stx/stx/libjava/JavaPopUpView.st,v 1.5 2011-11-24 10:26:08 cg Exp $'
2151
c0b6570c6f9b Jan's version
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 2108
diff changeset
   139
!
c0b6570c6f9b Jan's version
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 2108
diff changeset
   140
c0b6570c6f9b Jan's version
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 2108
diff changeset
   141
version_SVN
2164
c4682bb0d828 copyright fixed
Claus Gittinger <cg@exept.de>
parents: 2151
diff changeset
   142
    ^ '§Id: JavaPopUpView.st,v 1.4 2011/08/18 18:42:48 vrany Exp §'
2108
ca8c4e7db2e8 category change
Claus Gittinger <cg@exept.de>
parents: 749
diff changeset
   143
! !