Use a mouse adapter to listen to mouse events.

git-svn-id: svn+ssh://src.earth.threerings.net/narya/trunk@516 542714f4-19e9-0310-aa3c-eee0fc999fb1
This commit is contained in:
Walter Korman
2001-10-22 18:15:57 +00:00
parent 841f732174
commit 7bd5d86c34
@@ -1,5 +1,5 @@
//
// $Id: ViewerSceneViewPanel.java,v 1.18 2001/10/11 00:41:27 shaper Exp $
// $Id: ViewerSceneViewPanel.java,v 1.19 2001/10/22 18:15:57 shaper Exp $
package com.threerings.miso.viewer;
@@ -18,7 +18,7 @@ import com.threerings.miso.util.*;
import com.threerings.miso.viewer.util.ViewerContext;
public class ViewerSceneViewPanel extends SceneViewPanel
implements MouseListener, MouseMotionListener, PerformanceObserver
implements PerformanceObserver
{
/**
* Construct the panel and initialize it with a context.
@@ -35,8 +35,11 @@ public class ViewerSceneViewPanel extends SceneViewPanel
_animmgr = new AnimationManager(spritemgr, this);
// listen to the desired events
addMouseListener(this);
addMouseMotionListener(this);
addMouseListener(new MouseAdapter() {
public void mousePressed (MouseEvent e) {
ViewerSceneViewPanel.this.mousePressed(e);
}
});
// load up the initial scene
prepareStartingScene();
@@ -89,16 +92,6 @@ public class ViewerSceneViewPanel extends SceneViewPanel
_sprite.move(path);
}
public void mouseClicked (MouseEvent e) { }
public void mouseEntered (MouseEvent e) { }
public void mouseExited (MouseEvent e) { }
public void mouseReleased (MouseEvent e) { }
/** MouseMotionListener interface methods */
public void mouseMoved (MouseEvent e) { }
public void mouseDragged (MouseEvent e) { }
/** The animation manager. */
AnimationManager _animmgr;