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