752
|
1 |
"
|
877
|
2 |
COPYRIGHT (c) 1996-2011 by Claus Gittinger
|
1152
|
3 |
|
1155
|
4 |
New code and modifications done at SWING Research Group [1]:
|
1152
|
5 |
|
877
|
6 |
COPYRIGHT (c) 2010-2011 by Jan Vrany, Jan Kurs and Marcel Hlopko
|
|
7 |
SWING Research Group, Czech Technical University in Prague
|
|
8 |
|
752
|
9 |
This software is furnished under a license and may be used
|
|
10 |
only in accordance with the terms of that license and with the
|
|
11 |
inclusion of the above copyright notice. This software may not
|
|
12 |
be provided or otherwise made available to, or used by, any
|
|
13 |
other person. No title to or ownership of the software is
|
|
14 |
hereby transferred.
|
877
|
15 |
|
1155
|
16 |
[1] Code written at SWING Research Group contains a signature
|
|
17 |
of one of the above copright owners. For exact set of such code,
|
|
18 |
see the differences between this version and version stx:libjava
|
1152
|
19 |
as of 1.9.2010
|
752
|
20 |
"
|
|
21 |
"{ Package: 'stx:libjava' }"
|
|
22 |
|
|
23 |
StandardSystemView subclass:#JavaTopView
|
|
24 |
instanceVariableNames:'eventReceiver updateRegions javaPeer'
|
|
25 |
classVariableNames:''
|
|
26 |
poolDictionaries:''
|
|
27 |
category:'Languages-Java-Views-Support'
|
|
28 |
!
|
|
29 |
|
|
30 |
!JavaTopView class methodsFor:'documentation'!
|
|
31 |
|
|
32 |
copyright
|
|
33 |
"
|
877
|
34 |
COPYRIGHT (c) 1996-2011 by Claus Gittinger
|
1152
|
35 |
|
1155
|
36 |
New code and modifications done at SWING Research Group [1]:
|
1152
|
37 |
|
877
|
38 |
COPYRIGHT (c) 2010-2011 by Jan Vrany, Jan Kurs and Marcel Hlopko
|
|
39 |
SWING Research Group, Czech Technical University in Prague
|
|
40 |
|
752
|
41 |
This software is furnished under a license and may be used
|
|
42 |
only in accordance with the terms of that license and with the
|
|
43 |
inclusion of the above copyright notice. This software may not
|
|
44 |
be provided or otherwise made available to, or used by, any
|
|
45 |
other person. No title to or ownership of the software is
|
|
46 |
hereby transferred.
|
877
|
47 |
|
1155
|
48 |
[1] Code written at SWING Research Group contains a signature
|
|
49 |
of one of the above copright owners. For exact set of such code,
|
|
50 |
see the differences between this version and version stx:libjava
|
1152
|
51 |
as of 1.9.2010
|
877
|
52 |
|
|
53 |
"
|
752
|
54 |
! !
|
|
55 |
|
|
56 |
!JavaTopView methodsFor:'accessing'!
|
|
57 |
|
|
58 |
delegate:anObject
|
|
59 |
"/ super delegate:anObject.
|
|
60 |
eventReceiver := anObject.
|
|
61 |
|
|
62 |
"Created: / 2.12.1998 / 23:32:13 / cg"
|
|
63 |
"Modified: / 2.12.1998 / 23:57:57 / cg"
|
|
64 |
!
|
|
65 |
|
|
66 |
getNextUpdateRectangle
|
|
67 |
|r|
|
|
68 |
|
|
69 |
updateRegions size == 0 ifTrue:[^ nil].
|
|
70 |
r := updateRegions removeFirst.
|
|
71 |
updateRegions size == 0 ifTrue:[updateRegions := nil].
|
|
72 |
^ r
|
|
73 |
|
|
74 |
"Created: / 2.12.1998 / 23:32:13 / cg"
|
|
75 |
!
|
|
76 |
|
|
77 |
javaPeer
|
|
78 |
"for debugging support - here is a handle to the corresponding
|
|
79 |
javaPeer"
|
|
80 |
|
|
81 |
^ javaPeer
|
|
82 |
|
|
83 |
"Created: / 2.12.1998 / 23:32:13 / cg"
|
|
84 |
!
|
|
85 |
|
|
86 |
javaPeer:aJavaView
|
|
87 |
"for debugging support - here is a handle to the corresponding
|
|
88 |
javaPeer"
|
|
89 |
|
|
90 |
javaPeer := aJavaView
|
|
91 |
|
|
92 |
"Created: / 2.12.1998 / 23:32:13 / cg"
|
|
93 |
! !
|
|
94 |
|
|
95 |
!JavaTopView methodsFor:'event handling'!
|
|
96 |
|
|
97 |
exposeX:x y:y width:w height:h
|
|
98 |
|ev rect|
|
|
99 |
|
|
100 |
rect := Rectangle left:x top:y width:w height:h.
|
|
101 |
|
|
102 |
('JavaTopView exposeX:' , x printString , ' y:' , y printString , ' width:' , w printString , ' height:' , h printString) printCR.
|
|
103 |
|
|
104 |
updateRegions isNil ifTrue:[
|
|
105 |
updateRegions := OrderedCollection new.
|
|
106 |
].
|
|
107 |
updateRegions add:rect.
|
|
108 |
eventReceiver notNil ifTrue:[
|
|
109 |
ev := WindowEvent
|
|
110 |
damageFor:self
|
|
111 |
rectangle:rect.
|
|
112 |
eventReceiver processEvent:ev.
|
|
113 |
].
|
|
114 |
"/ super exposeX:x y:y width:w height:h
|
|
115 |
|
|
116 |
"Modified: / 19.10.1998 / 23:10:15 / cg"
|
|
117 |
"Created: / 2.12.1998 / 23:32:13 / cg"
|
|
118 |
! !
|
|
119 |
|
|
120 |
!JavaTopView methodsFor:'initialization'!
|
|
121 |
|
|
122 |
initialize
|
|
123 |
super initialize.
|
|
124 |
|
|
125 |
self enableMotionEvents.
|
|
126 |
|
|
127 |
"Modified: / 2.12.1998 / 23:32:30 / cg"
|
|
128 |
! !
|
|
129 |
|
|
130 |
!JavaTopView methodsFor:'queries'!
|
|
131 |
|
|
132 |
isJavaView
|
|
133 |
^ true
|
|
134 |
|
|
135 |
"Created: / 4.12.1998 / 14:09:37 / cg"
|
|
136 |
! !
|
|
137 |
|
|
138 |
!JavaTopView class methodsFor:'documentation'!
|
|
139 |
|
|
140 |
version
|
1864
|
141 |
^ '$Header$'
|
|
142 |
!
|
|
143 |
|
|
144 |
version_HG
|
|
145 |
|
|
146 |
^ '$Changeset: <not expanded> $'
|
752
|
147 |
!
|
|
148 |
|
|
149 |
version_SVN
|
1864
|
150 |
^ '§Id§'
|
1152
|
151 |
! !
|