--- a/JavaVM.st Fri Dec 04 18:48:13 1998 +0000
+++ b/JavaVM.st Sat Dec 05 13:43:51 1998 +0000
@@ -2221,7 +2221,7 @@
^ nil
"Created: / 4.1.1998 / 18:00:52 / cg"
- "Modified: / 4.12.1998 / 17:35:30 / cg"
+ "Modified: / 5.12.1998 / 13:34:20 / cg"
!
createdWindowsView:aView for:aJavaPeer
@@ -2301,33 +2301,37 @@
"/ ' ' print. x print. '/' print. y print.
"/ ' extent: ' print. width print. '/' print. height printNL.
+ view isPopUpView ifTrue:[
+ self halt.
+ ].
+
(view isTopView
or:[view isMemberOf:JavaEmbeddedFrameView]) ifTrue:[
- "/
- "/ dont allow setting the origin
- "/
- menu := self topViewsMenu:view.
- menu notNil ifTrue:[
- "/ must add the menus height
- height := height + menu height
- ].
- view extent:width@height.
+ "/
+ "/ dont allow setting the origin
+ "/
+ menu := self topViewsMenu:view.
+ menu notNil ifTrue:[
+ "/ must add the menus height
+ height := height + menu height
+ ].
+ view extent:width@height.
] ifFalse:[
- (view superView notNil
- and:[view superView isTopView]) ifTrue:[
- menu := self topViewsMenu:view superView.
- menu notNil ifTrue:[
- "/ must add menus height to yPos
- y := y + menu height.
- ]
- ].
- view origin:x@y extent:width@height.
+ (view superView notNil
+ and:[view superView isTopView]) ifTrue:[
+ menu := self topViewsMenu:view superView.
+ menu notNil ifTrue:[
+ "/ must add menus height to yPos
+ y := y + menu height.
+ ]
+ ].
+ view origin:x@y extent:width@height.
].
^ nil
- "Modified: / 21.8.1997 / 19:34:16 / cg"
"Created: / 7.1.1998 / 21:47:11 / cg"
+ "Modified: / 5.12.1998 / 13:47:52 / cg"
!
topViewsMenu:view
@@ -7545,12 +7549,13 @@
view isNil ifTrue:[^ nil].
p := view originRelativeTo:nil.
- jP := (Java classForName:'java.awt.Point') newCleared.
+p printCR.
+ jP := (Java classForName:'java.awt.Point') basicNew.
jP instVarNamed:'x' put:p x.
jP instVarNamed:'y' put:p y.
^ jP
- "Modified: / 3.12.1998 / 21:16:05 / cg"
+ "Modified: / 5.12.1998 / 14:28:41 / cg"
!
_WComponentPeer_handleEvent:nativeContext
@@ -10342,32 +10347,35 @@
w := eventArgs at:3.
h := eventArgs at:4.
- resized := moved := true.
- (w == view width and:[h == view height]) ifTrue:[
- resized := false.
+ (view isTopView or:[view isPopUpView]) ifTrue:[
+ "/ view must update its origin/extent.
+ view dispatchEvent:anEvent.
].
- (x == view left and:[y == view top]) ifTrue:[
- moved := false.
- ].
+
+ resized := (w ~~ view width or:[h ~~ view height]).
+ moved := (x ~~ view left or:[y ~~ view top]).
"/
"/ must change the components extent
"/ is there no cleaner way to do this ?
"/
view isTopView ifTrue:[
-
- "/
- "/ sigh - don't include the menu.
- "/
- menu := self topViewsMenu:view.
- menu notNil ifTrue:[
- "/ must add the menus height
- h := h - menu height
+ view isPopUpView ifFalse:[
+ "/
+ "/ sigh - don't include the menu.
+ "/
+ menu := self topViewsMenu:view.
+ menu notNil ifTrue:[
+ "/ must add the menus height
+ h := h - menu height
+ ]
]
].
jWin instVarNamed:'width' put:w.
jWin instVarNamed:'height' put:h.
+ jWin instVarNamed:'x' put:x.
+ jWin instVarNamed:'y' put:y.
jComponentEventClass := Java classForName:'java.awt.event.ComponentEvent'.
moved ifTrue:[
@@ -10442,7 +10450,7 @@
^ nil.
"Created: / 6.1.1998 / 20:38:58 / cg"
- "Modified: / 4.12.1998 / 15:27:47 / cg"
+ "Modified: / 5.12.1998 / 14:39:54 / cg"
!
doWindowsEventThread
@@ -10660,6 +10668,6 @@
!JavaVM class methodsFor:'documentation'!
version
- ^ '$Header: /home/jv/Projects/SmalltalkX/repositories/cvs/stx/libjava/JavaVM.st,v 1.91 1998/12/04 18:48:13 cg Exp $'
+ ^ '$Header: /home/jv/Projects/SmalltalkX/repositories/cvs/stx/libjava/JavaVM.st,v 1.92 1998/12/05 13:43:51 cg Exp $'
! !
JavaVM initialize!