More updates.

git-svn-id: svn+ssh://src.earth.threerings.net/narya/trunk@2882 542714f4-19e9-0310-aa3c-eee0fc999fb1
This commit is contained in:
Michael Bayne
2003-11-26 17:46:06 +00:00
parent c5a422f7a2
commit fa1c7af17a
2 changed files with 32 additions and 19 deletions
@@ -1,5 +1,5 @@
//
// $Id: PuzzlePanel.java,v 1.1 2003/11/26 01:42:34 mdb Exp $
// $Id: PuzzlePanel.java,v 1.2 2003/11/26 17:46:06 mdb Exp $
package com.threerings.puzzle.client;
@@ -48,10 +48,6 @@ public abstract class PuzzlePanel extends JPanel
_xlate = getKeyTranslator();
_ctx.getKeyboardManager().setTarget(this, _xlate);
// leave the keyboard manager disabled to start, and set things up
// for chatting
setPuzzleGrabsKeys(false);
// configure the puzzle panel
setLayout(new BorderLayout());
@@ -59,12 +55,22 @@ public abstract class PuzzlePanel extends JPanel
_bview = createBoardView(ctx);
// create the puzzle board panel
_bpanel = createBoardPanel();
_bpanel = createBoardPanel(ctx);
// add the board panel
add(_bpanel, BorderLayout.CENTER);
}
// documentation inherited
public void addNotify ()
{
super.addNotify();
// leave the keyboard manager disabled to start, and set things up
// for chatting
setPuzzleGrabsKeys(false);
}
/**
* Temporarily replaces the puzzle board display with the supplied
* overlay panel. The panel can be removed and the board display
@@ -184,7 +190,7 @@ public abstract class PuzzlePanel extends JPanel
* derived panel is responsible for making sure that the board view is
* present in the board panel.
*/
protected abstract JPanel createBoardPanel ();
protected abstract JPanel createBoardPanel (PuzzleContext ctx);
/**
* Returns a key translator with the desired key to controller command