public class PlayerTableModel
extends javax.swing.table.AbstractTableModel
Constructor and Description |
---|
PlayerTableModel() |
Modifier and Type | Method and Description |
---|---|
java.lang.Class<?> |
getColumnClass(int arg0) |
int |
getColumnCount() |
java.lang.String |
getColumnName(int arg0) |
int |
getColumnWidth(int arg0) |
Player |
getPlayer(java.lang.String playerName)
Return the Player in the table that matches this name.
|
int |
getRowCount() |
java.lang.Object |
getValueAt(int row,
int col) |
boolean |
isCellEditable(int arg0,
int arg1)
All cells are non-editable.
|
void |
playerChanged(Player player)
Update or add this player to the table.
|
void |
playerGone(java.lang.String playerName)
Remove this player from the table.
|
void |
playerInvited(java.lang.String playerName)
You invited this player to play a match.
|
boolean |
playerUninvited()
Clear the invited flag from any players.
|
void |
removeAll()
Remove all of the Players in the list.
|
void |
setValueAt(java.lang.Object arg0,
int arg1,
int arg2) |
addTableModelListener, findColumn, fireTableCellUpdated, fireTableChanged, fireTableDataChanged, fireTableRowsDeleted, fireTableRowsInserted, fireTableRowsUpdated, fireTableStructureChanged, getListeners, getTableModelListeners, removeTableModelListener
public void playerChanged(Player player)
player
- The player who's state has changed.public void playerGone(java.lang.String playerName)
playerName
- The name of the player who left.public void playerInvited(java.lang.String playerName)
playerName
- The name of the player invited.public boolean playerUninvited()
public void removeAll()
public Player getPlayer(java.lang.String playerName)
playerName
- The name to querypublic java.lang.Class<?> getColumnClass(int arg0)
getColumnClass
in interface javax.swing.table.TableModel
getColumnClass
in class javax.swing.table.AbstractTableModel
public int getColumnCount()
public java.lang.String getColumnName(int arg0)
getColumnName
in interface javax.swing.table.TableModel
getColumnName
in class javax.swing.table.AbstractTableModel
public int getColumnWidth(int arg0)
public int getRowCount()
public java.lang.Object getValueAt(int row, int col)
public boolean isCellEditable(int arg0, int arg1)
isCellEditable
in interface javax.swing.table.TableModel
isCellEditable
in class javax.swing.table.AbstractTableModel
TableModel.isCellEditable(int, int)
public void setValueAt(java.lang.Object arg0, int arg1, int arg2)
setValueAt
in interface javax.swing.table.TableModel
setValueAt
in class javax.swing.table.AbstractTableModel