Commit b32dabe5 by Rolf W. Rasmussen Committed by Tom Tromey

MouseEvent.java: Fixed coordinate space confusion.

2000-06-27  Rolf W. Rasmussen  <rolfwr@ii.uib.no>

	* java/awt/event/MouseEvent.java: Fixed coordinate space
	confusion.

From-SVN: r34746
parent 56067b00
2000-06-27 Rolf W. Rasmussen <rolfwr@ii.uib.no>
* java/awt/event/MouseEvent.java: Fixed coordinate space
confusion.
2000-06-27 Tom Tromey <tromey@cygnus.com> 2000-06-27 Tom Tromey <tromey@cygnus.com>
* java/io/PushbackInputStream.java (read): If there are characters * java/io/PushbackInputStream.java (read): If there are characters
......
...@@ -47,20 +47,17 @@ public class MouseEvent extends InputEvent ...@@ -47,20 +47,17 @@ public class MouseEvent extends InputEvent
public Point getPoint () public Point getPoint ()
{ {
Point p = ((Component) source).getLocation (); return new Point (x, y);
p.x = x - p.x;
p.y = y - p.y;
return p;
} }
public int getX () public int getX ()
{ {
return x - ((Component) source).getX (); return x;
} }
public int getY () public int getY ()
{ {
return y - ((Component) source).getY (); return y;
} }
public boolean isPopupTrigger () public boolean isPopupTrigger ()
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment