org.jacorb.imr.util
Class ImRServerTableModel
AbstractTableModel
org.jacorb.imr.util.ImRServerTableModel
public class ImRServerTableModel
extends AbstractTableModel
This class is the model for the server table.
On user changes, it writes back its edited cells
via the IMRModel class.
- Nicolas Noffke
$Id: ImRServerTableModel.java,v 1.7 2004/05/06 12:39:59 nicolas Exp $
Class | getColumnClass(int index) - Get the class of a specific column.
|
int | getColumnCount() - Get the number of columns of this table.
|
String | getColumnName(int column) - Get the name of a specific column.
|
int | getRowCount() - Get the number of rows of this table.
|
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(Object value, int row, int column) - Set the value of a specific cell, i.e. the user has edited a cell.
|
ImRServerTableModel
public ImRServerTableModel(ImRModel model)
The constructor.
model
- the ImRModel to write changes via.
getColumnClass
public Class getColumnClass(int index)
Get the class of a specific column.
index
- the columns index.
- the columns Class object.
getColumnCount
public int getColumnCount()
Get the number of columns of this table.
- the number of columns.
getColumnName
public String getColumnName(int column)
Get the name of a specific column.
- String the columns name.
getRowCount
public int getRowCount()
Get the number of rows of this table.
- the number of rows.
getValueAt
public Object getValueAt(int row,
int column)
Get the value of a specific cell.
row
- the cells row.column
- the cells column.
- the cells value.
isCellEditable
public boolean isCellEditable(int row,
int column)
Test, wheter a cell is editable.
row
- the cells row.column
- the cells column.
- true, if the cell is editable.
serverRefreshed
public void serverRefreshed(int index)
Notify the JTable that a server has been updated.
index
- the servers index in the table.
setServers
public void setServers(ServerInfo[] servers)
Pass in the servers the table should display.
Notify the JTable of that.
servers
- an array containing the ServerInfo structs of the
servers to display.
setValueAt
public void setValueAt(Object value,
int row,
int column)
Set the value of a specific cell, i.e. the user has edited a cell.
value
- the new value.row
- the cells row.column
- the cells column.