370 (jint)localPoint.x, (jint)localPoint.y,
371 (jint)absP.x, (jint)absP.y,
372 [event deltaY],
373 [event deltaX]);
374 if (jEvent == nil) {
375 // Unable to create event by some reason.
376 return;
377 }
378
379 static JNF_CLASS_CACHE(jc_PlatformView, "sun/lwawt/macosx/CPlatformView");
380 static JNF_MEMBER_CACHE(jm_deliverMouseEvent, jc_PlatformView, "deliverMouseEvent", "(Lsun/lwawt/macosx/event/NSEvent;)V");
381 JNFCallVoidMethod(env, m_cPlatformView, jm_deliverMouseEvent, jEvent);
382 }
383
384 - (void) resetTrackingArea {
385 if (rolloverTrackingArea != nil) {
386 [self removeTrackingArea:rolloverTrackingArea];
387 [rolloverTrackingArea release];
388 }
389
390 int options = (NSTrackingActiveInActiveApp | NSTrackingMouseEnteredAndExited |
391 NSTrackingMouseMoved | NSTrackingEnabledDuringMouseDrag);
392
393 rolloverTrackingArea = [[NSTrackingArea alloc] initWithRect:[self visibleRect]
394 options:options
395 owner:self
396 userInfo:nil
397 ];
398 [self addTrackingArea:rolloverTrackingArea];
399 }
400
401 - (void)updateTrackingAreas {
402 [super updateTrackingAreas];
403 [self resetTrackingArea];
404 }
405
406 - (void) resetCursorRects {
407 [super resetCursorRects];
408 [self resetTrackingArea];
409 }
410
|
370 (jint)localPoint.x, (jint)localPoint.y,
371 (jint)absP.x, (jint)absP.y,
372 [event deltaY],
373 [event deltaX]);
374 if (jEvent == nil) {
375 // Unable to create event by some reason.
376 return;
377 }
378
379 static JNF_CLASS_CACHE(jc_PlatformView, "sun/lwawt/macosx/CPlatformView");
380 static JNF_MEMBER_CACHE(jm_deliverMouseEvent, jc_PlatformView, "deliverMouseEvent", "(Lsun/lwawt/macosx/event/NSEvent;)V");
381 JNFCallVoidMethod(env, m_cPlatformView, jm_deliverMouseEvent, jEvent);
382 }
383
384 - (void) resetTrackingArea {
385 if (rolloverTrackingArea != nil) {
386 [self removeTrackingArea:rolloverTrackingArea];
387 [rolloverTrackingArea release];
388 }
389
390 int options = (NSTrackingActiveAlways | NSTrackingMouseEnteredAndExited |
391 NSTrackingMouseMoved | NSTrackingEnabledDuringMouseDrag);
392
393 rolloverTrackingArea = [[NSTrackingArea alloc] initWithRect:[self visibleRect]
394 options:options
395 owner:self
396 userInfo:nil
397 ];
398 [self addTrackingArea:rolloverTrackingArea];
399 }
400
401 - (void)updateTrackingAreas {
402 [super updateTrackingAreas];
403 [self resetTrackingArea];
404 }
405
406 - (void) resetCursorRects {
407 [super resetCursorRects];
408 [self resetTrackingArea];
409 }
410
|