public class ImRServerTableModel
extends javax.swing.table.AbstractTableModel
Constructor and Description |
---|
ImRServerTableModel(ImRModel model)
The constructor.
|
Modifier and Type | Method and Description |
---|---|
java.lang.Class |
getColumnClass(int index)
Get the class of a specific column.
|
int |
getColumnCount()
Get the number of columns of this table.
|
java.lang.String |
getColumnName(int column)
Get the name of a specific column.
|
int |
getRowCount()
Get the number of rows of this table.
|
java.lang.Object |
getValueAt(int row,
int column)
Get the value of a specific cell.
|
boolean |
isCellEditable(int row,
int column)
Test, wheter a cell is editable.
|
void |
serverRefreshed(int index)
Notify the JTable that a server has been updated.
|
void |
setServers(ServerInfo[] servers)
Pass in the servers the table should display.
|
void |
setValueAt(java.lang.Object value,
int row,
int column)
Set the value of a specific cell, i.e.
|
addTableModelListener, findColumn, fireTableCellUpdated, fireTableChanged, fireTableDataChanged, fireTableRowsDeleted, fireTableRowsInserted, fireTableRowsUpdated, fireTableStructureChanged, getListeners, getTableModelListeners, removeTableModelListener
public ImRServerTableModel(ImRModel model)
model
- the ImRModel to write changes via.public void setServers(ServerInfo[] servers)
servers
- an array containing the ServerInfo structs of the
servers to display.public void serverRefreshed(int index)
index
- the servers index in the table.public int getRowCount()
public int getColumnCount()
public java.lang.String getColumnName(int column)
getColumnName
in interface javax.swing.table.TableModel
getColumnName
in class javax.swing.table.AbstractTableModel
column
- the columns index.public java.lang.Class getColumnClass(int index)
getColumnClass
in interface javax.swing.table.TableModel
getColumnClass
in class javax.swing.table.AbstractTableModel
index
- the columns index.public java.lang.Object getValueAt(int row, int column)
row
- the cells row.column
- the cells column.public boolean isCellEditable(int row, int column)
isCellEditable
in interface javax.swing.table.TableModel
isCellEditable
in class javax.swing.table.AbstractTableModel
row
- the cells row.column
- the cells column.public void setValueAt(java.lang.Object value, int row, int column)
setValueAt
in interface javax.swing.table.TableModel
setValueAt
in class javax.swing.table.AbstractTableModel
value
- the new value.row
- the cells row.column
- the cells column.