gametable
Class TeamTableModel

java.lang.Object
  extended by javax.swing.table.AbstractTableModel
      extended by gametable.TeamTableModel
All Implemented Interfaces:
java.io.Serializable, javax.swing.table.TableModel

public class TeamTableModel
extends javax.swing.table.AbstractTableModel

Holds the Data of the current Round

Version:
1.0
Author:
fwalter
See Also:
Serialized Form

Constructor Summary
TeamTableModel(Round round)
          Initialize the TeamTableModel
 
Method Summary
 java.lang.Class getColumnClass(int col)
           
 int getColumnCount()
           
 java.lang.String getColumnName(int col)
           
 Round getCurrentTeams()
          get the current Teams
 int getRowCount()
           
 java.lang.Object getValueAt(int rowIndex, int columnIndex)
           
 boolean isCellEditable(int row, int column)
           
 void reset()
          Resets the clicked games
 void setNextRound(Round winners)
          set the winners for the next round
 void setValueAt(java.lang.Object aValue, int rowIndex, int columnIndex)
           
 void submit()
          Submits the current Round
 
Methods inherited from class javax.swing.table.AbstractTableModel
addTableModelListener, findColumn, fireTableCellUpdated, fireTableChanged, fireTableDataChanged, fireTableRowsDeleted, fireTableRowsInserted, fireTableRowsUpdated, fireTableStructureChanged, getListeners, getTableModelListeners, removeTableModelListener
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

TeamTableModel

public TeamTableModel(Round round)
Initialize the TeamTableModel

Parameters:
round - round of teams
Method Detail

getColumnCount

public int getColumnCount()

getRowCount

public int getRowCount()

getValueAt

public java.lang.Object getValueAt(int rowIndex,
                                   int columnIndex)

getColumnName

public java.lang.String getColumnName(int col)
Specified by:
getColumnName in interface javax.swing.table.TableModel
Overrides:
getColumnName in class javax.swing.table.AbstractTableModel

getColumnClass

public java.lang.Class getColumnClass(int col)
Specified by:
getColumnClass in interface javax.swing.table.TableModel
Overrides:
getColumnClass in class javax.swing.table.AbstractTableModel

isCellEditable

public boolean isCellEditable(int row,
                              int column)
Specified by:
isCellEditable in interface javax.swing.table.TableModel
Overrides:
isCellEditable in class javax.swing.table.AbstractTableModel

setValueAt

public void setValueAt(java.lang.Object aValue,
                       int rowIndex,
                       int columnIndex)
Specified by:
setValueAt in interface javax.swing.table.TableModel
Overrides:
setValueAt in class javax.swing.table.AbstractTableModel

submit

public void submit()
            throws NotAllDataSetException
Submits the current Round

Throws:
NotAllDataSetException - unless every game is set

reset

public void reset()
Resets the clicked games


getCurrentTeams

public Round getCurrentTeams()
get the current Teams

Returns:
the current round with teams

setNextRound

public void setNextRound(Round winners)
set the winners for the next round

Parameters:
winners - Winners of the last round