We need to translate mouse wheel events as well.

git-svn-id: svn+ssh://src.earth.threerings.net/narya/trunk@3304 542714f4-19e9-0310-aa3c-eee0fc999fb1
This commit is contained in:
Michael Bayne
2005-01-19 16:09:17 +00:00
parent 2b085bd8c2
commit 64b5b856ca
@@ -21,10 +21,11 @@
package com.threerings.media;
import java.awt.Graphics;
import java.awt.Graphics2D;
import java.awt.Graphics;
import java.awt.Rectangle;
import java.awt.event.MouseEvent;
import java.awt.event.MouseWheelEvent;
import java.util.ArrayList;
import javax.swing.SwingUtilities;
@@ -163,6 +164,17 @@ public class VirtualMediaPanel extends MediaPanel
super.processMouseMotionEvent(event);
}
/**
* We overload this to translate mouse events into the proper
* coordinates before they are dispatched to any of the mouse
* listeners.
*/
protected void processMouseWheelEvent (MouseWheelEvent event)
{
event.translatePoint(_vbounds.x, _vbounds.y);
super.processMouseWheelEvent(event);
}
// documentation inherited
protected void dirtyScreenRect (Rectangle rect)
{