ExitNodeTableModel (SelekTOR Java Documentation)
Date: 2017-04-14

client

## Class ExitNodeTableModel

- java.lang.Object
- - javax.swing.table.AbstractTableModel
  - - javax.swing.table.DefaultTableModel
    - - client.ExitNodeTableModel

- All Implemented Interfaces:
    java.io.Serializable, javax.swing.table.TableModel

      public class ExitNodeTableModel
      extends javax.swing.table.DefaultTableModel

  Author:
    Alistair Neil
  See Also:
    Serialized Form

- - ### Field Summary

    - ### Fields inherited from class javax.swing.table.DefaultTableModel

      `columnIdentifiers, dataVector`

    - ### Fields inherited from class javax.swing.table.AbstractTableModel

      `listenerList`

  - ### Constructor Summary

    Constructors
    Constructor and Description
    `ExitNodeTableModel()`

  - ### Method Summary

    All Methods Instance Methods Concrete Methods
    Modifier and Type | Method and Description
    --- | ---
    `void` | `addRow(java.lang.Object[] rowData)` Add rowdata with given data object array
    `void` | `clear()` Clear the table model of all data
    `java.lang.Class` | `getColumnClass(int index)` Get column class at given index
    `int` | `getColumnCount()` Get the number of columns
    `java.lang.String` | `getColumnName(int index)` Get column name at given index
    `NodeItem` | `getNodeItemAt(int row)` Get row nodeitem
    `java.lang.Object` | `getValueAt(int row, int col)` Get cell value as object at row,col
    `boolean` | `isCellEditable(int row, int col)` Test if the cell is editable
    `void` | `setColumnName(java.lang.String name, int index)` Set the column name at the specified index
    `void` | `setTestFieldValues(java.lang.String finger, long latency, java.lang.String status, java.lang.String hops)` Convenience method to set the testing field cell values for a specific fingerprint, the hops field is hidden and does npt show up in table
    `void` | `setValueAt(java.lang.Object value, int row, int col)` Set cell value at row,col
    `void` | `setValueAt(java.lang.Object value, java.lang.String finger, int col)` Set value with given fingerprint at given column

    - ### Methods inherited from class javax.swing.table.DefaultTableModel

      `addColumn, addColumn, addColumn, addRow, convertToVector, convertToVector, getDataVector, getRowCount, insertRow, insertRow, moveRow, newDataAvailable, newRowsAdded, removeRow, rowsRemoved, setColumnCount, setColumnIdentifiers, setColumnIdentifiers, setDataVector, setDataVector, setNumRows, setRowCount`

    - ### Methods inherited from class javax.swing.table.AbstractTableModel

      `addTableModelListener, findColumn, fireTableCellUpdated, fireTableChanged, fireTableDataChanged, fireTableRowsDeleted, fireTableRowsInserted, fireTableRowsUpdated, fireTableStructureChanged, getListeners, getTableModelListeners, removeTableModelListener`

    - ### Methods inherited from class java.lang.Object

      `clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

- - ### Constructor Detail

    - #### ExitNodeTableModel

          public ExitNodeTableModel()

  - ### Method Detail

    - #### clear

          public void clear()

      Clear the table model of all data

    - #### getColumnCount

          public int getColumnCount()

      Get the number of columns
      Specified by:
        `getColumnCount` in interface `javax.swing.table.TableModel`
      Overrides:
        `getColumnCount` in class `javax.swing.table.DefaultTableModel`
      Returns:
        columns as integer

    - #### isCellEditable

          public boolean isCellEditable(int row,
                                        int col)

      Test if the cell is editable
      Specified by:
        `isCellEditable` in interface `javax.swing.table.TableModel`
      Overrides:
        `isCellEditable` in class `javax.swing.table.DefaultTableModel`
      Parameters:
        `row` - Cell row
        `col` - Cell column
      Returns:
        True if editable

    - #### setValueAt

          public void setValueAt(java.lang.Object value,
                                 java.lang.String finger,
                                 int col)

      Set value with given fingerprint at given column
      Parameters:
        `value` - Value
        `finger` - Fingerprint
        `col` - Column

    - #### setTestFieldValues

          public void setTestFieldValues(java.lang.String finger,
                                         long latency,
                                         java.lang.String status,
                                         java.lang.String hops)

      Convenience method to set the testing field cell values for a specific fingerprint, the hops field is hidden and does npt show up in table
      Parameters:
        `finger` - Fingerprint
        `latency` - Latency value
        `status` - Status value
        `hops` - Hops value

    - #### getNodeItemAt

          public NodeItem getNodeItemAt(int row)

      Get row nodeitem
      Parameters:
        `row` -
      Returns:
        a nodeitem

    - #### setValueAt

          public void setValueAt(java.lang.Object value,
                                 int row,
                                 int col)

      Set cell value at row,col
      Specified by:
        `setValueAt` in interface `javax.swing.table.TableModel`
      Overrides:
        `setValueAt` in class `javax.swing.table.DefaultTableModel`
      Parameters:
        `value` -
        `row` -
        `col` -

    - #### getValueAt

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

      Get cell value as object at row,col
      Specified by:
        `getValueAt` in interface `javax.swing.table.TableModel`
      Overrides:
        `getValueAt` in class `javax.swing.table.DefaultTableModel`
      Parameters:
        `row` -
        `col` -
      Returns:
        value as object

    - #### addRow

          public void addRow(java.lang.Object[] rowData)

      Add rowdata with given data object array
      Overrides:
        `addRow` in class `javax.swing.table.DefaultTableModel`
      Parameters:
        `rowData` -

    - #### getColumnName

          public java.lang.String getColumnName(int index)

      Get column name at given index
      Specified by:
        `getColumnName` in interface `javax.swing.table.TableModel`
      Overrides:
        `getColumnName` in class `javax.swing.table.DefaultTableModel`
      Parameters:
        `index` -
      Returns:
        name as string

    - #### setColumnName

          public void setColumnName(java.lang.String name,
                                    int index)

      Set the column name at the specified index
      Parameters:
        `name` -
        `index` -

    - #### getColumnClass

          public java.lang.Class getColumnClass(int index)

      Get column class at given index
      Specified by:
        `getColumnClass` in interface `javax.swing.table.TableModel`
      Overrides:
        `getColumnClass` in class `javax.swing.table.AbstractTableModel`
      Parameters:
        `index` -
      Returns:
        Class