diff options
author | Rolf W. Rasmussen <rolfwr@ii.uib.no> | 2000-06-27 23:30:34 +0200 |
---|---|---|
committer | Tom Tromey <tromey@gcc.gnu.org> | 2000-06-27 21:30:34 +0000 |
commit | b32dabe5ed4a43e90b91f22f2ebb00875c081591 (patch) | |
tree | 770903c5c7da08ce43a4336e59d0fe98fe4d8dd4 /libjava/java/awt | |
parent | 56067b0077074c026b8ad099a74292a2becd6278 (diff) | |
download | gcc-b32dabe5ed4a43e90b91f22f2ebb00875c081591.zip gcc-b32dabe5ed4a43e90b91f22f2ebb00875c081591.tar.gz gcc-b32dabe5ed4a43e90b91f22f2ebb00875c081591.tar.bz2 |
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
Diffstat (limited to 'libjava/java/awt')
-rw-r--r-- | libjava/java/awt/event/MouseEvent.java | 9 |
1 files changed, 3 insertions, 6 deletions
diff --git a/libjava/java/awt/event/MouseEvent.java b/libjava/java/awt/event/MouseEvent.java index 49e2eb8..e3dff04 100644 --- a/libjava/java/awt/event/MouseEvent.java +++ b/libjava/java/awt/event/MouseEvent.java @@ -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 () |