JavaView.st
author cg
Thu, 21 Aug 1997 15:00:45 +0000
changeset 245 5177c0378723
parent 242 30c61addabd9
child 248 964ad5f9e8bc
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
242
30c61addabd9 *** empty log message ***
cg
parents: 240
diff changeset
     2
	instanceVariableNames:'eventReceiver updateRegions javaPeer'
231
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"
242
30c61addabd9 *** empty log message ***
cg
parents: 240
diff changeset
    27
!
30c61addabd9 *** empty log message ***
cg
parents: 240
diff changeset
    28
30c61addabd9 *** empty log message ***
cg
parents: 240
diff changeset
    29
javaPeer
30c61addabd9 *** empty log message ***
cg
parents: 240
diff changeset
    30
    "for debugging support - here is a handle to the corresponding
30c61addabd9 *** empty log message ***
cg
parents: 240
diff changeset
    31
     javaPeer"
30c61addabd9 *** empty log message ***
cg
parents: 240
diff changeset
    32
30c61addabd9 *** empty log message ***
cg
parents: 240
diff changeset
    33
    ^ javaPeer
30c61addabd9 *** empty log message ***
cg
parents: 240
diff changeset
    34
30c61addabd9 *** empty log message ***
cg
parents: 240
diff changeset
    35
    "Created: 18.8.1997 / 22:34:35 / cg"
30c61addabd9 *** empty log message ***
cg
parents: 240
diff changeset
    36
!
30c61addabd9 *** empty log message ***
cg
parents: 240
diff changeset
    37
30c61addabd9 *** empty log message ***
cg
parents: 240
diff changeset
    38
javaPeer:aJavaView
30c61addabd9 *** empty log message ***
cg
parents: 240
diff changeset
    39
    "for debugging support - here is a handle to the corresponding
30c61addabd9 *** empty log message ***
cg
parents: 240
diff changeset
    40
     javaPeer"
30c61addabd9 *** empty log message ***
cg
parents: 240
diff changeset
    41
30c61addabd9 *** empty log message ***
cg
parents: 240
diff changeset
    42
    javaPeer := aJavaView
30c61addabd9 *** empty log message ***
cg
parents: 240
diff changeset
    43
30c61addabd9 *** empty log message ***
cg
parents: 240
diff changeset
    44
    "Created: 18.8.1997 / 22:34:30 / cg"
231
e8a2f47da1a3 intitial checkin
cg
parents:
diff changeset
    45
! !
e8a2f47da1a3 intitial checkin
cg
parents:
diff changeset
    46
e8a2f47da1a3 intitial checkin
cg
parents:
diff changeset
    47
!JavaView methodsFor:'event handling'!
e8a2f47da1a3 intitial checkin
cg
parents:
diff changeset
    48
e8a2f47da1a3 intitial checkin
cg
parents:
diff changeset
    49
exposeX:x y:y width:w height:h
e8a2f47da1a3 intitial checkin
cg
parents:
diff changeset
    50
    updateRegions isNil ifTrue:[
e8a2f47da1a3 intitial checkin
cg
parents:
diff changeset
    51
        updateRegions := OrderedCollection new.
e8a2f47da1a3 intitial checkin
cg
parents:
diff changeset
    52
    ].
e8a2f47da1a3 intitial checkin
cg
parents:
diff changeset
    53
    updateRegions add:(Rectangle left:x top:y width:w height:h).
240
8474d3b49c77 checkin from browser
cg
parents: 234
diff changeset
    54
    eventReceiver notNil ifTrue:[
8474d3b49c77 checkin from browser
cg
parents: 234
diff changeset
    55
        eventReceiver exposeX:x y:y width:w height:h view:self
8474d3b49c77 checkin from browser
cg
parents: 234
diff changeset
    56
    ].
8474d3b49c77 checkin from browser
cg
parents: 234
diff changeset
    57
    super exposeX:x y:y width:w height:h
231
e8a2f47da1a3 intitial checkin
cg
parents:
diff changeset
    58
e8a2f47da1a3 intitial checkin
cg
parents:
diff changeset
    59
    "Created: 18.8.1997 / 15:00:24 / cg"
240
8474d3b49c77 checkin from browser
cg
parents: 234
diff changeset
    60
    "Modified: 18.8.1997 / 18:14:53 / cg"
231
e8a2f47da1a3 intitial checkin
cg
parents:
diff changeset
    61
! !
e8a2f47da1a3 intitial checkin
cg
parents:
diff changeset
    62
245
5177c0378723 checkin from browser
cg
parents: 242
diff changeset
    63
!JavaView methodsFor:'initialization'!
5177c0378723 checkin from browser
cg
parents: 242
diff changeset
    64
5177c0378723 checkin from browser
cg
parents: 242
diff changeset
    65
initialize
5177c0378723 checkin from browser
cg
parents: 242
diff changeset
    66
    super initialize.
5177c0378723 checkin from browser
cg
parents: 242
diff changeset
    67
    (superView notNil and:[superView isMemberOf:JavaEmbeddedFrameView])
5177c0378723 checkin from browser
cg
parents: 242
diff changeset
    68
    ifTrue:[
5177c0378723 checkin from browser
cg
parents: 242
diff changeset
    69
        self viewBackground:superView viewBackground
5177c0378723 checkin from browser
cg
parents: 242
diff changeset
    70
    ]
5177c0378723 checkin from browser
cg
parents: 242
diff changeset
    71
5177c0378723 checkin from browser
cg
parents: 242
diff changeset
    72
    "Created: 21.8.1997 / 16:37:45 / cg"
5177c0378723 checkin from browser
cg
parents: 242
diff changeset
    73
! !
5177c0378723 checkin from browser
cg
parents: 242
diff changeset
    74
231
e8a2f47da1a3 intitial checkin
cg
parents:
diff changeset
    75
!JavaView class methodsFor:'documentation'!
e8a2f47da1a3 intitial checkin
cg
parents:
diff changeset
    76
e8a2f47da1a3 intitial checkin
cg
parents:
diff changeset
    77
version
245
5177c0378723 checkin from browser
cg
parents: 242
diff changeset
    78
    ^ '$Header: /home/jv/Projects/SmalltalkX/repositories/cvs/stx/libjava/JavaView.st,v 1.5 1997/08/21 15:00:45 cg Exp $'
231
e8a2f47da1a3 intitial checkin
cg
parents:
diff changeset
    79
! !