org.jscience.computing.game.puzzle
Class JTilePuzzle

java.lang.Object
  extended by javax.swing.table.AbstractTableModel
      extended by org.jscience.computing.game.puzzle.JTilePuzzle
All Implemented Interfaces:
java.awt.event.ActionListener, java.io.Serializable, java.util.EventListener, javax.swing.table.TableModel, JGamePlay

public class JTilePuzzle
extends javax.swing.table.AbstractTableModel
implements JGamePlay, java.awt.event.ActionListener

implements the GUI wrapper for the TilePuzzle

See Also:
Serialized Form

Field Summary
 
Fields inherited from class javax.swing.table.AbstractTableModel
listenerList
 
Fields inherited from interface org.jscience.computing.game.JGamePlay
gameFrameX, gameFrameY, historyFrameX, historyFrameY, legalMovesFrameX, legalMovesFrameY, prototypeCellValue, redoFrameX, redoFrameY, windowHeight, windowLocationX, windowLocationY, windowWidth
 
Constructor Summary
JTilePuzzle()
          Creates a new JTilePuzzle object.
JTilePuzzle(TilePuzzle game, Player player, int level)
          Creates a new JTilePuzzle object.
 
Method Summary
 void actionPerformed(java.awt.event.ActionEvent e)
          DOCUMENT ME!
 AutoPlay getAutoPlay()
          DOCUMENT ME!
 int getColumnCount()
          DOCUMENT ME!
 java.awt.Container getContainer(GameGUI frame)
          DOCUMENT ME!
 java.lang.String getDefaultFileExtension()
          DOCUMENT ME!
 javax.swing.filechooser.FileFilter getFileFilter()
          DOCUMENT ME!
 java.awt.Container getHelp()
          DOCUMENT ME!
 javax.swing.JMenu getMenu()
          DOCUMENT ME!
 JGamePlay getNewGame()
          DOCUMENT ME!
 int getRowCount()
          DOCUMENT ME!
 java.lang.String getStatusMessage()
          DOCUMENT ME!
 java.lang.String getTitle()
          DOCUMENT ME!
 java.lang.Object getValueAt(int row, int column)
          DOCUMENT ME!
 JGamePlay setGame(AutoPlay play)
          DOCUMENT ME!
 
Methods inherited from class javax.swing.table.AbstractTableModel
addTableModelListener, findColumn, fireTableCellUpdated, fireTableChanged, fireTableDataChanged, fireTableRowsDeleted, fireTableRowsInserted, fireTableRowsUpdated, fireTableStructureChanged, getColumnClass, getColumnName, getListeners, getTableModelListeners, isCellEditable, removeTableModelListener, setValueAt
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

JTilePuzzle

public JTilePuzzle()
Creates a new JTilePuzzle object.


JTilePuzzle

public JTilePuzzle(TilePuzzle game,
                   Player player,
                   int level)
Creates a new JTilePuzzle object.

Parameters:
game - DOCUMENT ME!
player - DOCUMENT ME!
level - DOCUMENT ME!
Method Detail

getTitle

public java.lang.String getTitle()
DOCUMENT ME!

Specified by:
getTitle in interface JGamePlay
Returns:
DOCUMENT ME!

getStatusMessage

public java.lang.String getStatusMessage()
DOCUMENT ME!

Specified by:
getStatusMessage in interface JGamePlay
Returns:
DOCUMENT ME!

getContainer

public java.awt.Container getContainer(GameGUI frame)
DOCUMENT ME!

Specified by:
getContainer in interface JGamePlay
Parameters:
frame - DOCUMENT ME!
Returns:
DOCUMENT ME!

getAutoPlay

public AutoPlay getAutoPlay()
DOCUMENT ME!

Specified by:
getAutoPlay in interface JGamePlay
Returns:
DOCUMENT ME!

getFileFilter

public javax.swing.filechooser.FileFilter getFileFilter()
DOCUMENT ME!

Specified by:
getFileFilter in interface JGamePlay
Returns:
DOCUMENT ME!

getDefaultFileExtension

public java.lang.String getDefaultFileExtension()
DOCUMENT ME!

Specified by:
getDefaultFileExtension in interface JGamePlay
Returns:
DOCUMENT ME!

getMenu

public javax.swing.JMenu getMenu()
DOCUMENT ME!

Specified by:
getMenu in interface JGamePlay
Returns:
DOCUMENT ME!

getNewGame

public JGamePlay getNewGame()
DOCUMENT ME!

Specified by:
getNewGame in interface JGamePlay
Returns:
DOCUMENT ME!

setGame

public JGamePlay setGame(AutoPlay play)
                  throws GameRuntimeException
DOCUMENT ME!

Specified by:
setGame in interface JGamePlay
Parameters:
play - DOCUMENT ME!
Returns:
DOCUMENT ME!
Throws:
GameRuntimeException - DOCUMENT ME!

getHelp

public java.awt.Container getHelp()
DOCUMENT ME!

Specified by:
getHelp in interface JGamePlay
Returns:
DOCUMENT ME!

actionPerformed

public void actionPerformed(java.awt.event.ActionEvent e)
DOCUMENT ME!

Specified by:
actionPerformed in interface java.awt.event.ActionListener
Parameters:
e - DOCUMENT ME!

getColumnCount

public int getColumnCount()
DOCUMENT ME!

Specified by:
getColumnCount in interface javax.swing.table.TableModel
Returns:
DOCUMENT ME!

getRowCount

public int getRowCount()
DOCUMENT ME!

Specified by:
getRowCount in interface javax.swing.table.TableModel
Returns:
DOCUMENT ME!

getValueAt

public java.lang.Object getValueAt(int row,
                                   int column)
DOCUMENT ME!

Specified by:
getValueAt in interface javax.swing.table.TableModel
Parameters:
row - DOCUMENT ME!
column - DOCUMENT ME!
Returns:
DOCUMENT ME!