Allow the sprite action handler to be customized.

git-svn-id: svn+ssh://src.earth.threerings.net/narya/trunk@3722 542714f4-19e9-0310-aa3c-eee0fc999fb1
This commit is contained in:
Michael Bayne
2005-10-05 05:59:53 +00:00
parent 1a61beac13
commit c442ce3023
+10 -1
View File
@@ -196,7 +196,7 @@ public class MediaPanel extends JComponent
if (((sprite instanceof ActionSprite) ||
(sprite instanceof HoverSprite)) && (_actionSpriteCount++ == 0)) {
if (_actionHandler == null) {
_actionHandler = new ActionSpriteHandler();
_actionHandler = createActionSpriteHandler();
}
addMouseListener(_actionHandler);
addMouseMotionListener(_actionHandler);
@@ -609,6 +609,15 @@ public class MediaPanel extends JComponent
}
}
/**
* Creates the mouse listener that will handle action sprites and their
* variants.
*/
protected ActionSpriteHandler createActionSpriteHandler ()
{
return new ActionSpriteHandler();
}
/** The frame manager with whom we register. */
protected FrameManager _framemgr;