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:
@@ -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;
|
package com.threerings.miso.viewer;
|
||||||
|
|
||||||
@@ -18,7 +18,7 @@ import com.threerings.miso.util.*;
|
|||||||
import com.threerings.miso.viewer.util.ViewerContext;
|
import com.threerings.miso.viewer.util.ViewerContext;
|
||||||
|
|
||||||
public class ViewerSceneViewPanel extends SceneViewPanel
|
public class ViewerSceneViewPanel extends SceneViewPanel
|
||||||
implements MouseListener, MouseMotionListener, PerformanceObserver
|
implements PerformanceObserver
|
||||||
{
|
{
|
||||||
/**
|
/**
|
||||||
* Construct the panel and initialize it with a context.
|
* Construct the panel and initialize it with a context.
|
||||||
@@ -35,8 +35,11 @@ public class ViewerSceneViewPanel extends SceneViewPanel
|
|||||||
_animmgr = new AnimationManager(spritemgr, this);
|
_animmgr = new AnimationManager(spritemgr, this);
|
||||||
|
|
||||||
// listen to the desired events
|
// listen to the desired events
|
||||||
addMouseListener(this);
|
addMouseListener(new MouseAdapter() {
|
||||||
addMouseMotionListener(this);
|
public void mousePressed (MouseEvent e) {
|
||||||
|
ViewerSceneViewPanel.this.mousePressed(e);
|
||||||
|
}
|
||||||
|
});
|
||||||
|
|
||||||
// load up the initial scene
|
// load up the initial scene
|
||||||
prepareStartingScene();
|
prepareStartingScene();
|
||||||
@@ -89,16 +92,6 @@ public class ViewerSceneViewPanel extends SceneViewPanel
|
|||||||
_sprite.move(path);
|
_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. */
|
/** The animation manager. */
|
||||||
AnimationManager _animmgr;
|
AnimationManager _animmgr;
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user