Package jadex.commons.gui.jtable
Class AbstractIndexTableModel
- java.lang.Object
-
- javax.swing.table.AbstractTableModel
-
- jadex.commons.gui.jtable.DelegateTableModel
-
- jadex.commons.gui.jtable.AbstractIndexTableModel
-
- All Implemented Interfaces:
java.io.Serializable
,java.util.EventListener
,javax.swing.event.TableModelListener
,javax.swing.table.TableModel
- Direct Known Subclasses:
SorterFilterTableModel
public abstract class AbstractIndexTableModel extends DelegateTableModel
- See Also:
- Serialized Form
-
-
Field Summary
Fields Modifier and Type Field Description protected java.util.ArrayList
indexList
-
Fields inherited from class jadex.commons.gui.jtable.DelegateTableModel
delegate
-
-
Constructor Summary
Constructors Constructor Description AbstractIndexTableModel(javax.swing.table.TableModel delegate)
-
Method Summary
All Methods Instance Methods Abstract Methods Concrete Methods Modifier and Type Method Description int
getRowCount()
Get the number of rows in the table.java.lang.Object
getValueAt(int rowIndex, int columnIndex)
int
mapRow(int rowIndex)
void
setValueAt(java.lang.Object aValue, int rowIndex, int columnIndex)
void
tableChanged(javax.swing.event.TableModelEvent evt)
Signal that the table has changed in some way.abstract void
tableRowsDeleted(int column, int firstRow, int lastRow)
abstract void
tableRowsInserted(int column, int firstRow, int lastRow)
Filter the model.abstract void
tableRowsUpdated(int column, int firstRow, int lastRow)
-
Methods inherited from class jadex.commons.gui.jtable.DelegateTableModel
getColumnClass, getColumnCount, getColumnName, getDelegate, isCellEditable
-
Methods inherited from class javax.swing.table.AbstractTableModel
addTableModelListener, findColumn, fireTableCellUpdated, fireTableChanged, fireTableDataChanged, fireTableRowsDeleted, fireTableRowsInserted, fireTableRowsUpdated, fireTableStructureChanged, getListeners, getTableModelListeners, removeTableModelListener
-
-
-
-
Method Detail
-
tableRowsInserted
public abstract void tableRowsInserted(int column, int firstRow, int lastRow)
Filter the model. Subclasses should implement this methods to provide the filter logic.
-
tableRowsDeleted
public abstract void tableRowsDeleted(int column, int firstRow, int lastRow)
-
tableRowsUpdated
public abstract void tableRowsUpdated(int column, int firstRow, int lastRow)
-
getRowCount
public int getRowCount()
Get the number of rows in the table.- Specified by:
getRowCount
in interfacejavax.swing.table.TableModel
- Overrides:
getRowCount
in classDelegateTableModel
- Returns:
- The row count
-
getValueAt
public java.lang.Object getValueAt(int rowIndex, int columnIndex)
- Specified by:
getValueAt
in interfacejavax.swing.table.TableModel
- Overrides:
getValueAt
in classDelegateTableModel
-
setValueAt
public void setValueAt(java.lang.Object aValue, int rowIndex, int columnIndex)
- Specified by:
setValueAt
in interfacejavax.swing.table.TableModel
- Overrides:
setValueAt
in classDelegateTableModel
-
tableChanged
public void tableChanged(javax.swing.event.TableModelEvent evt)
Signal that the table has changed in some way.- Specified by:
tableChanged
in interfacejavax.swing.event.TableModelListener
- Overrides:
tableChanged
in classDelegateTableModel
- Parameters:
evt
- The TableModelEvent
-
mapRow
public int mapRow(int rowIndex)
-
-