synapsi.gui
Class ClientTableModel


java.lang.Object

  |

  +--javax.swing.table.AbstractTableModel

        |

        +--synapsi.gui.ClientTableModel


public class ClientTableModel
extends javax.swing.table.AbstractTableModel

Table model used in Client-table of NeuronServers main window

See Also:
Serialized Form

Fields inherited from class javax.swing.table.AbstractTableModel
listenerList
 
Constructor Summary
ClientTableModel()
          Calls ancestors constructor
 
Method Summary
 void deleteRow(int row)
          Removes specified row from table
 void emptyRows()
          Delete all rows from the tableModel
 int getColumnCount()
          Tells, how many columns there are in the table
 java.lang.String getColumnName(int col)
          Tells the name of requested column in table
 int getRowCount()
          Tells, how many rows there are in the table
 java.lang.Object getValueAt(int row, int column)
          Returns the value of requested column in Object-format
 void insertRow(java.lang.Object[] row)
          Add new row to table
 void setClientActive(java.lang.String clientIP, boolean active)
          Searches table model for specified client and sets it status to either active or inactive
 void setClientVector(java.util.Vector clientVector)
          Effectually reinitializes models content by reading DataClients from Vector and converting them to visual data
 void setClientVersion(java.lang.String clientIP, java.lang.String version)
          Searches table model for specified client and sets it version to given String
 void setValueAt(java.lang.Object value, int row, int col)
          Sets the value in specified cell of table
 
Methods inherited from class javax.swing.table.AbstractTableModel
addTableModelListener, findColumn, fireTableCellUpdated, fireTableChanged, fireTableDataChanged, fireTableRowsDeleted, fireTableRowsInserted, fireTableRowsUpdated, fireTableStructureChanged, getColumnClass, isCellEditable, removeTableModelListener
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

ClientTableModel


public ClientTableModel()
Calls ancestors constructor
Method Detail

getRowCount


public int getRowCount()
Tells, how many rows there are in the table
Overrides:
getRowCount in class javax.swing.table.AbstractTableModel
Returns:
number of rows in table

getColumnCount


public int getColumnCount()
Tells, how many columns there are in the table
Overrides:
getColumnCount in class javax.swing.table.AbstractTableModel
Returns:
number of columns in table

getColumnName


public java.lang.String getColumnName(int col)
Tells the name of requested column in table
Overrides:
getColumnName in class javax.swing.table.AbstractTableModel
Parameters:
col - index of requested column
Returns:
name of requested column

getValueAt


public java.lang.Object getValueAt(int row,
                                   int column)
Returns the value of requested column in Object-format
Overrides:
getValueAt in class javax.swing.table.AbstractTableModel
Parameters:
row - rownumber of requested item
column - column index of requested item
Returns:
requested value as Object

setValueAt


public void setValueAt(java.lang.Object value,
                       int row,
                       int col)
Sets the value in specified cell of table
Overrides:
setValueAt in class javax.swing.table.AbstractTableModel
Parameters:
value - value of new cell in Object
row - rownumber of modified cell
col - column index of modified column

deleteRow


public void deleteRow(int row)
Removes specified row from table
Parameters:
row - number of removed row

insertRow


public void insertRow(java.lang.Object[] row)
Add new row to table
Parameters:
row - New row added to table

emptyRows


public void emptyRows()
Delete all rows from the tableModel

setClientVector


public void setClientVector(java.util.Vector clientVector)
Effectually reinitializes models content by reading DataClients from Vector and converting them to visual data
Parameters:
clientVector - Vector containing clients to be shown

setClientActive


public void setClientActive(java.lang.String clientIP,
                            boolean active)
Searches table model for specified client and sets it status to either active or inactive
Parameters:
clientIP - ip of client
active - is client active or inactive

setClientVersion


public void setClientVersion(java.lang.String clientIP,
                             java.lang.String version)
Searches table model for specified client and sets it version to given String
Parameters:
clientIP - ip of client
version - new version of the client