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:
committed by
Tom Tromey
parent
56067b0077
commit
b32dabe5ed
@@ -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 ()
|
||||
|
||||
Reference in New Issue
Block a user