weka.gui

## Class InteractiveTableModel

- java.lang.Object
- - javax.swing.table.AbstractTableModel
  - - weka.gui.InteractiveTableModel

- All Implemented Interfaces:
    java.io.Serializable, javax.swing.table.TableModel
  Direct Known Subclasses:
    InteractiveTableModel

      public class InteractiveTableModel
      extends javax.swing.table.AbstractTableModel

  Table model that automatically adds a new row to the table on pressing enter in the last cell of a row.
  Version:
    $Revision: 47640 $
  Author:
    Mark Hall (mhall{[at]}pentaho{[dot]}com)
  See Also:
    Serialized Form

- - ### Field Summary

    Fields
    Modifier and Type | Field and Description
    --- | ---
    `int` | `m_hidden_index` Index of the hidden column

  - ### Constructor Summary

    Constructors
    Constructor and Description
    `InteractiveTableModel(java.lang.String[] columnNames)` Constructor

  - ### Method Summary

    All Methods Instance Methods Concrete Methods
    Modifier and Type | Method and Description
    --- | ---
    `void` | `addEmptyRow()` Adds an empty row to the model
    `java.lang.Class<?>` | `getColumnClass(int column)`
    `int` | `getColumnCount()`
    `java.lang.String` | `getColumnName(int column)`
    `int` | `getRowCount()`
    `java.lang.Object` | `getValueAt(int row, int column)`
    `boolean` | `hasEmptyRow()` Returns true if the model has an empty row
    `boolean` | `isCellEditable(int row, int column)`
    `void` | `setValueAt(java.lang.Object value, int row, int column)`

    - ### 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

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

- - ### Field Detail

    - #### m_hidden_index

          public int m_hidden_index

      Index of the hidden column

  - ### Constructor Detail

    - #### InteractiveTableModel

          public InteractiveTableModel(java.lang.String[] columnNames)

      Constructor
      Parameters:
        `columnNames` - the names of the columns

  - ### Method Detail

    - #### 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`

    - #### isCellEditable

          public boolean isCellEditable(int row,
                                        int column)

      Specified by:
        `isCellEditable` in interface `javax.swing.table.TableModel`
      Overrides:
        `isCellEditable` in class `javax.swing.table.AbstractTableModel`

    - #### getColumnClass

          public java.lang.Class<?> getColumnClass(int column)

      Specified by:
        `getColumnClass` in interface `javax.swing.table.TableModel`
      Overrides:
        `getColumnClass` in class `javax.swing.table.AbstractTableModel`

    - #### getValueAt

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

    - #### setValueAt

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

      Specified by:
        `setValueAt` in interface `javax.swing.table.TableModel`
      Overrides:
        `setValueAt` in class `javax.swing.table.AbstractTableModel`

    - #### getRowCount

          public int getRowCount()

    - #### getColumnCount

          public int getColumnCount()

    - #### hasEmptyRow

          public boolean hasEmptyRow()

      Returns true if the model has an empty row
      Returns:
        true if the model has an empty row

    - #### addEmptyRow

          public void addEmptyRow()

      Adds an empty row to the model