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
This commit is contained in:
Rolf W. Rasmussen 2000-06-27 23:30:34 +02:00 committed by Tom Tromey
parent 56067b0077
commit b32dabe5ed
2 changed files with 8 additions and 6 deletions

View file

@ -47,20 +47,17 @@ public class MouseEvent extends InputEvent
public Point getPoint ()
{
Point p = ((Component) source).getLocation ();
p.x = x - p.x;
p.y = y - p.y;
return p;
return new Point (x, y);
}
public int getX ()
{
return x - ((Component) source).getX ();
return x;
}
public int getY ()
{
return y - ((Component) source).getY ();
return y;
}
public boolean isPopupTrigger ()