JavaView.st
author cg
Mon, 18 Aug 1997 19:44:02 +0000
changeset 240 8474d3b49c77
parent 234 78953bbfaba1
child 242 30c61addabd9
permissions -rw-r--r--
checkin from browser
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
231
e8a2f47da1a3 intitial checkin
cg
parents:
diff changeset
     1
View subclass:#JavaView
e8a2f47da1a3 intitial checkin
cg
parents:
diff changeset
     2
	instanceVariableNames:'eventReceiver updateRegions'
e8a2f47da1a3 intitial checkin
cg
parents:
diff changeset
     3
	classVariableNames:''
e8a2f47da1a3 intitial checkin
cg
parents:
diff changeset
     4
	poolDictionaries:''
234
78953bbfaba1 checkin from browser
cg
parents: 231
diff changeset
     5
	category:'Java-Views-Support'
231
e8a2f47da1a3 intitial checkin
cg
parents:
diff changeset
     6
!
e8a2f47da1a3 intitial checkin
cg
parents:
diff changeset
     7
e8a2f47da1a3 intitial checkin
cg
parents:
diff changeset
     8
e8a2f47da1a3 intitial checkin
cg
parents:
diff changeset
     9
!JavaView methodsFor:'accessing'!
e8a2f47da1a3 intitial checkin
cg
parents:
diff changeset
    10
e8a2f47da1a3 intitial checkin
cg
parents:
diff changeset
    11
delegate:anObject
e8a2f47da1a3 intitial checkin
cg
parents:
diff changeset
    12
    super delegate:anObject.
e8a2f47da1a3 intitial checkin
cg
parents:
diff changeset
    13
    eventReceiver := anObject.
e8a2f47da1a3 intitial checkin
cg
parents:
diff changeset
    14
e8a2f47da1a3 intitial checkin
cg
parents:
diff changeset
    15
    "Created: 18.8.1997 / 15:22:20 / cg"
e8a2f47da1a3 intitial checkin
cg
parents:
diff changeset
    16
!
e8a2f47da1a3 intitial checkin
cg
parents:
diff changeset
    17
e8a2f47da1a3 intitial checkin
cg
parents:
diff changeset
    18
getNextUpdateRectangle
e8a2f47da1a3 intitial checkin
cg
parents:
diff changeset
    19
    |r|
e8a2f47da1a3 intitial checkin
cg
parents:
diff changeset
    20
e8a2f47da1a3 intitial checkin
cg
parents:
diff changeset
    21
    updateRegions size == 0 ifTrue:[^ nil].
e8a2f47da1a3 intitial checkin
cg
parents:
diff changeset
    22
    r := updateRegions removeFirst.
e8a2f47da1a3 intitial checkin
cg
parents:
diff changeset
    23
    updateRegions size == 0 ifTrue:[updateRegions := nil].
e8a2f47da1a3 intitial checkin
cg
parents:
diff changeset
    24
    ^ r
e8a2f47da1a3 intitial checkin
cg
parents:
diff changeset
    25
e8a2f47da1a3 intitial checkin
cg
parents:
diff changeset
    26
    "Created: 18.8.1997 / 15:37:31 / cg"
e8a2f47da1a3 intitial checkin
cg
parents:
diff changeset
    27
! !
e8a2f47da1a3 intitial checkin
cg
parents:
diff changeset
    28
e8a2f47da1a3 intitial checkin
cg
parents:
diff changeset
    29
!JavaView methodsFor:'event handling'!
e8a2f47da1a3 intitial checkin
cg
parents:
diff changeset
    30
e8a2f47da1a3 intitial checkin
cg
parents:
diff changeset
    31
exposeX:x y:y width:w height:h
e8a2f47da1a3 intitial checkin
cg
parents:
diff changeset
    32
    updateRegions isNil ifTrue:[
e8a2f47da1a3 intitial checkin
cg
parents:
diff changeset
    33
        updateRegions := OrderedCollection new.
e8a2f47da1a3 intitial checkin
cg
parents:
diff changeset
    34
    ].
e8a2f47da1a3 intitial checkin
cg
parents:
diff changeset
    35
    updateRegions add:(Rectangle left:x top:y width:w height:h).
240
8474d3b49c77 checkin from browser
cg
parents: 234
diff changeset
    36
    eventReceiver notNil ifTrue:[
8474d3b49c77 checkin from browser
cg
parents: 234
diff changeset
    37
        eventReceiver exposeX:x y:y width:w height:h view:self
8474d3b49c77 checkin from browser
cg
parents: 234
diff changeset
    38
    ].
8474d3b49c77 checkin from browser
cg
parents: 234
diff changeset
    39
    super exposeX:x y:y width:w height:h
231
e8a2f47da1a3 intitial checkin
cg
parents:
diff changeset
    40
e8a2f47da1a3 intitial checkin
cg
parents:
diff changeset
    41
    "Created: 18.8.1997 / 15:00:24 / cg"
240
8474d3b49c77 checkin from browser
cg
parents: 234
diff changeset
    42
    "Modified: 18.8.1997 / 18:14:53 / cg"
231
e8a2f47da1a3 intitial checkin
cg
parents:
diff changeset
    43
! !
e8a2f47da1a3 intitial checkin
cg
parents:
diff changeset
    44
e8a2f47da1a3 intitial checkin
cg
parents:
diff changeset
    45
!JavaView class methodsFor:'documentation'!
e8a2f47da1a3 intitial checkin
cg
parents:
diff changeset
    46
e8a2f47da1a3 intitial checkin
cg
parents:
diff changeset
    47
version
240
8474d3b49c77 checkin from browser
cg
parents: 234
diff changeset
    48
    ^ '$Header: /home/jv/Projects/SmalltalkX/repositories/cvs/stx/libjava/JavaView.st,v 1.3 1997/08/18 19:44:02 cg Exp $'
231
e8a2f47da1a3 intitial checkin
cg
parents:
diff changeset
    49
! !