de.matthiasmann.twl.model
Class SimpleTableModel

java.lang.Object
  extended by de.matthiasmann.twl.model.AbstractTableColumnHeaderModel
      extended by de.matthiasmann.twl.model.AbstractTableModel
          extended by de.matthiasmann.twl.model.SimpleTableModel
All Implemented Interfaces:
TableColumnHeaderModel, TableModel

public class SimpleTableModel
extends AbstractTableModel

A simple table model which stores each row as Object[]


Nested Class Summary
 
Nested classes/interfaces inherited from interface de.matthiasmann.twl.model.TableModel
TableModel.ChangeListener
 
Nested classes/interfaces inherited from interface de.matthiasmann.twl.model.TableColumnHeaderModel
TableColumnHeaderModel.ColumnHeaderChangeListener
 
Constructor Summary
SimpleTableModel(java.lang.String[] columnHeaders)
           
 
Method Summary
 void addRow(java.lang.Object... data)
           
 void addRows(java.util.Collection<java.lang.Object[]> rows)
           
 void deleteRow(int index)
           
 void deleteRows(int index, int count)
           
 java.lang.Object getCell(int row, int column)
           
 java.lang.String getColumnHeaderText(int column)
          The text of the specified column header.
 int getNumColumns()
           
 int getNumRows()
           
 void insertRow(int index, java.lang.Object... data)
           
 void insertRows(int index, java.util.Collection<java.lang.Object[]> rows)
           
 void setCell(int row, int column, java.lang.Object data)
           
 void setColumnHeaderText(int column, java.lang.String text)
           
 
Methods inherited from class de.matthiasmann.twl.model.AbstractTableModel
addChangeListener, fireAllChanged, fireCellChanged, fireColumnDeleted, fireColumnHeaderChanged, fireColumnInserted, fireRowsChanged, fireRowsDeleted, fireRowsInserted, getTooltipContent, hasCallbacks, removeChangeListener
 
Methods inherited from class de.matthiasmann.twl.model.AbstractTableColumnHeaderModel
getColumnHeaderState, getColumnHeaderStates
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 
Methods inherited from interface de.matthiasmann.twl.model.TableColumnHeaderModel
getColumnHeaderState, getColumnHeaderStates
 

Constructor Detail

SimpleTableModel

public SimpleTableModel(java.lang.String[] columnHeaders)
Method Detail

getNumColumns

public int getNumColumns()

getColumnHeaderText

public java.lang.String getColumnHeaderText(int column)
Description copied from interface: TableColumnHeaderModel
The text of the specified column header.

Parameters:
column - the column index
Returns:
the column header test

setColumnHeaderText

public void setColumnHeaderText(int column,
                                java.lang.String text)

getNumRows

public int getNumRows()

getCell

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

setCell

public void setCell(int row,
                    int column,
                    java.lang.Object data)

addRow

public void addRow(java.lang.Object... data)

addRows

public void addRows(java.util.Collection<java.lang.Object[]> rows)

insertRow

public void insertRow(int index,
                      java.lang.Object... data)

insertRows

public void insertRows(int index,
                       java.util.Collection<java.lang.Object[]> rows)

deleteRow

public void deleteRow(int index)

deleteRows

public void deleteRows(int index,
                       int count)