xmlgraphics-batik-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From tkorm...@apache.org
Subject cvs commit: xml-batik/sources/org/apache/batik/gvt/event AWTEventDispatcher.java
Date Wed, 19 Jun 2002 08:15:26 GMT
tkormann    2002/06/19 01:15:26

  Modified:    sources/org/apache/batik/bridge BridgeEventSupport.java
               sources/org/apache/batik/gvt/event AWTEventDispatcher.java
  Log:
  fix bug with screen coordinates
  
  Revision  Changes    Path
  1.42      +4 -1      xml-batik/sources/org/apache/batik/bridge/BridgeEventSupport.java
  
  Index: BridgeEventSupport.java
  ===================================================================
  RCS file: /home/cvs/xml-batik/sources/org/apache/batik/bridge/BridgeEventSupport.java,v
  retrieving revision 1.41
  retrieving revision 1.42
  diff -u -r1.41 -r1.42
  --- BridgeEventSupport.java	14 Jun 2002 08:43:11 -0000	1.41
  +++ BridgeEventSupport.java	19 Jun 2002 08:15:26 -0000	1.42
  @@ -150,6 +150,9 @@
                                           GraphicsNodeKeyEvent evt) {
               Element targetElement = 
                   (Element)context.getFocusManager().getCurrentEventTarget();
  +            if (targetElement == null) {
  +                return;
  +            }
               DocumentEvent d = (DocumentEvent)targetElement.getOwnerDocument();
               DOMKeyEvent keyEvt = (DOMKeyEvent)d.createEvent("KeyEvents");
               keyEvt.initKeyEvent(eventType, 
  
  
  
  1.9       +3 -1      xml-batik/sources/org/apache/batik/gvt/event/AWTEventDispatcher.java
  
  Index: AWTEventDispatcher.java
  ===================================================================
  RCS file: /home/cvs/xml-batik/sources/org/apache/batik/gvt/event/AWTEventDispatcher.java,v
  retrieving revision 1.8
  retrieving revision 1.9
  diff -u -r1.8 -r1.9
  --- AWTEventDispatcher.java	12 Jun 2002 12:02:51 -0000	1.8
  +++ AWTEventDispatcher.java	19 Jun 2002 08:15:26 -0000	1.9
  @@ -355,6 +355,8 @@
           // If the receiving node has changed, send a notification
           // check if we enter a new node
           Point screenPos = evt.getComponent().getLocationOnScreen();
  +        screenPos.x += evt.getX();
  +        screenPos.y += evt.getY();
           if (lastHit != node) {
               // post an MOUSE_EXITED
               if (lastHit != null) {
  
  
  

---------------------------------------------------------------------
To unsubscribe, e-mail: batik-dev-unsubscribe@xml.apache.org
For additional commands, e-mail: batik-dev-help@xml.apache.org


Mime
View raw message