spellcast.ui
Class ServerListTableModel

java.lang.Object
  extended by javax.swing.table.AbstractTableModel
      extended by spellcast.ui.ServerListTableModel
All Implemented Interfaces:
java.io.Serializable, javax.swing.table.TableModel

public class ServerListTableModel
extends javax.swing.table.AbstractTableModel

This class represents the table model for storing a server list. It is necessary because a JTable requires a model for displaying the table's data and we want to be able to work with ServerStatus classes more closely.

Author:
Barrie Treloar
See Also:
Serialized Form

Field Summary
 
Fields inherited from class javax.swing.table.AbstractTableModel
listenerList
 
Constructor Summary
ServerListTableModel()
           
 
Method Summary
 void add(ServerStatus ss)
           
 void clear()
           
 boolean contains(ServerStatus ss)
           
 ServerStatus get(int row)
           
 java.lang.Class getColumnClass(int col)
           
 int getColumnCount()
           
 java.lang.String getColumnName(int column)
           
 int getRowCount()
           
 java.lang.Object getValueAt(int row, int col)
           
 boolean isCellEditable(int row, int col)
           
 void remove(ServerStatus ss)
           
 java.util.Iterator servers()
           
 
Methods inherited from class javax.swing.table.AbstractTableModel
addTableModelListener, findColumn, fireTableCellUpdated, fireTableChanged, fireTableDataChanged, fireTableRowsDeleted, fireTableRowsInserted, fireTableRowsUpdated, fireTableStructureChanged, getListeners, getTableModelListeners, removeTableModelListener, setValueAt
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

ServerListTableModel

public ServerListTableModel()
Method Detail

add

public void add(ServerStatus ss)

remove

public void remove(ServerStatus ss)

clear

public void clear()

contains

public boolean contains(ServerStatus ss)

servers

public java.util.Iterator servers()

get

public ServerStatus get(int row)

getColumnCount

public int getColumnCount()

getRowCount

public int getRowCount()

getValueAt

public java.lang.Object getValueAt(int row,
                                   int col)

getColumnName

public java.lang.String getColumnName(int column)
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 col)
Specified by:
isCellEditable in interface javax.swing.table.TableModel
Overrides:
isCellEditable in class javax.swing.table.AbstractTableModel


Copyright © 2001-2005 Spellcast. All Rights Reserved.