Package com.treemap.swing.table

# Class DataFrameTableModel<R,C,V>

java.lang.Object
com.treemap.swing.table.DataFrameTableModel<R,C,V>

All Implemented Interfaces:
  `TableModel`

public class DataFrameTableModel<R,C,V> extends Object implements TableModel

- ## Field Summary

  Fields
  Modifier and Type
  Field
  Description
  `protected List<TableModelListener>`
  `listeners`

- ## Constructor Summary

  Constructors
  Constructor
  Description
  `DataFrameTableModel(com.macrofocus.molap.dataframe.DataFrame<R,C,V> dataFrame)`

- ## Method Summary

  Modifier and Type
  Method
  Description
  `void`
  `addTableModelListener(TableModelListener l)`
  Adds a listener to the list that's notified each time a change to the data model occurs.
  `void`
  `fireTableChanged(TableModelEvent e)`
  Forwards the given notification event to all `TableModelListeners` that registered themselves as listeners for this table model.
  `protected void`
  `fireTableDataChanged()`
  Notifies all listeners that all cell values in the table's rows may have changed.
  `protected void`
  `fireTableStructureChanged()`
  Notifies all listeners that the table's structure has changed.
  `Class<?>`
  `getColumnClass(int columnIndex)`
  `int`
  `getColumnCount()`
  `String`
  `getColumnName(int column)`
  `int`
  `getRowCount()`
  `Object`
  `getValueAt(int rowIndex, int columnIndex)`
  `boolean`
  `isCellEditable(int rowIndex, int columnIndex)`
  `void`
  `removeTableModelListener(TableModelListener l)`
  Removes a listener from the list that's notified each time a change to the data model occurs.
  `void`
  `setValueAt(Object aValue, int rowIndex, int columnIndex)`

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

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

- ## Field Details

  - ### listeners

    protected List<TableModelListener> listeners

- ## Constructor Details

  - ### DataFrameTableModel

    public DataFrameTableModel(com.macrofocus.molap.dataframe.DataFrame<R,C,V> dataFrame)

- ## Method Details

  - ### getColumnName

    public String getColumnName(int column)
    Specified by:
      `getColumnName` in interface `TableModel`

  - ### getColumnClass

    public Class<?> getColumnClass(int columnIndex)
    Specified by:
      `getColumnClass` in interface `TableModel`

  - ### getRowCount

    public int getRowCount()
    Specified by:
      `getRowCount` in interface `TableModel`

  - ### getColumnCount

    public int getColumnCount()
    Specified by:
      `getColumnCount` in interface `TableModel`

  - ### getValueAt

    public Object getValueAt(int rowIndex, int columnIndex)
    Specified by:
      `getValueAt` in interface `TableModel`

  - ### isCellEditable

    public boolean isCellEditable(int rowIndex, int columnIndex)
    Specified by:
      `isCellEditable` in interface `TableModel`

  - ### setValueAt

    public void setValueAt(Object aValue, int rowIndex, int columnIndex)
    Specified by:
      `setValueAt` in interface `TableModel`

  - ### addTableModelListener

    public void addTableModelListener(TableModelListener l)
    Adds a listener to the list that's notified each time a change to the data model occurs.
    Specified by:
      `addTableModelListener` in interface `TableModel`
    Parameters:
      `l` - the TableModelListener

  - ### removeTableModelListener

    public void removeTableModelListener(TableModelListener l)
    Removes a listener from the list that's notified each time a change to the data model occurs.
    Specified by:
      `removeTableModelListener` in interface `TableModel`
    Parameters:
      `l` - the TableModelListener

  - ### fireTableDataChanged

    protected void fireTableDataChanged()
    Notifies all listeners that all cell values in the table's rows may have changed. The number of rows may also have changed and the `JTable` should redraw the table from scratch. The structure of the table (as in the order of the columns) is assumed to be the same.
    See Also:
      - `TableModelEvent`
      - `EventListenerList`
      - `JTable.tableChanged(TableModelEvent)`

  - ### fireTableStructureChanged

    protected void fireTableStructureChanged()
    Notifies all listeners that the table's structure has changed. The number of columns in the table, and the names and types of the new columns may be different from the previous state. If the `JTable` receives this event and its `autoCreateColumnsFromModel` flag is set it discards any table columns that it had and reallocates default columns in the order they appear in the model. This is the same as calling `setModel(TableModel)` on the `JTable`.
    See Also:
      - `TableModelEvent`
      - `EventListenerList`

  - ### fireTableChanged

    public void fireTableChanged(TableModelEvent e)
    Forwards the given notification event to all `TableModelListeners` that registered themselves as listeners for this table model.
    Parameters:
      `e` - the event to be forwarded
    See Also:
      - `addTableModelListener(javax.swing.event.TableModelListener)`
      - `TableModelEvent`
      - `EventListenerList`