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 |
|
472
|
13 |
StandardSystemView subclass:#JavaTopView
|
|
14 |
instanceVariableNames:'eventReceiver updateRegions javaPeer'
|
|
15 |
classVariableNames:''
|
|
16 |
poolDictionaries:''
|
713
|
17 |
category:'Languages-Java-Views-Support'
|
472
|
18 |
!
|
|
19 |
|
545
|
20 |
!JavaTopView 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.
|
2151
|
32 |
"
|
545
|
33 |
!
|
|
34 |
|
|
35 |
documentation
|
|
36 |
"
|
|
37 |
[Author:]
|
|
38 |
Claus Gittinger
|
|
39 |
"
|
|
40 |
|
|
41 |
|
|
42 |
! !
|
472
|
43 |
|
|
44 |
!JavaTopView methodsFor:'accessing'!
|
|
45 |
|
|
46 |
delegate:anObject
|
473
|
47 |
"/ super delegate:anObject.
|
472
|
48 |
eventReceiver := anObject.
|
|
49 |
|
|
50 |
"Created: / 2.12.1998 / 23:32:13 / cg"
|
473
|
51 |
"Modified: / 2.12.1998 / 23:57:57 / cg"
|
472
|
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: / 2.12.1998 / 23:32:13 / cg"
|
|
63 |
!
|
|
64 |
|
|
65 |
javaPeer
|
|
66 |
"for debugging support - here is a handle to the corresponding
|
|
67 |
javaPeer"
|
|
68 |
|
|
69 |
^ javaPeer
|
|
70 |
|
|
71 |
"Created: / 2.12.1998 / 23:32: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: / 2.12.1998 / 23:32:13 / cg"
|
|
81 |
! !
|
|
82 |
|
|
83 |
!JavaTopView methodsFor:'event handling'!
|
|
84 |
|
|
85 |
exposeX:x y:y width:w height:h
|
|
86 |
|ev rect|
|
|
87 |
|
|
88 |
rect := Rectangle left:x top:y width:w height:h.
|
|
89 |
|
596
|
90 |
('JavaTopView exposeX:' , x printString , ' y:' , y printString , ' width:' , w printString , ' height:' , h printString) printCR.
|
472
|
91 |
|
|
92 |
updateRegions isNil ifTrue:[
|
|
93 |
updateRegions := OrderedCollection new.
|
|
94 |
].
|
|
95 |
updateRegions add:rect.
|
|
96 |
eventReceiver notNil ifTrue:[
|
|
97 |
ev := WindowEvent
|
|
98 |
damageFor:self
|
|
99 |
rectangle:rect.
|
|
100 |
eventReceiver processEvent:ev.
|
|
101 |
].
|
|
102 |
"/ super exposeX:x y:y width:w height:h
|
|
103 |
|
|
104 |
"Modified: / 19.10.1998 / 23:10:15 / cg"
|
|
105 |
"Created: / 2.12.1998 / 23:32:13 / cg"
|
|
106 |
! !
|
|
107 |
|
|
108 |
!JavaTopView methodsFor:'initialization'!
|
|
109 |
|
|
110 |
initialize
|
|
111 |
super initialize.
|
|
112 |
|
|
113 |
self enableMotionEvents.
|
|
114 |
|
|
115 |
"Modified: / 2.12.1998 / 23:32:30 / cg"
|
|
116 |
! !
|
|
117 |
|
482
|
118 |
!JavaTopView methodsFor:'queries'!
|
|
119 |
|
|
120 |
isJavaView
|
|
121 |
^ true
|
|
122 |
|
|
123 |
"Created: / 4.12.1998 / 14:09:37 / cg"
|
|
124 |
! !
|
|
125 |
|
472
|
126 |
!JavaTopView class methodsFor:'documentation'!
|
|
127 |
|
|
128 |
version
|
2165
|
129 |
^ '$Header: /cvs/stx/stx/libjava/JavaTopView.st,v 1.9 2011-11-24 10:26:10 cg Exp $'
|
2151
|
130 |
!
|
|
131 |
|
|
132 |
version_SVN
|
2165
|
133 |
^ '§Id: JavaTopView.st,v 1.8 2011/08/18 18:42:48 vrany Exp §'
|
2108
|
134 |
! !
|