com.levigo.util.swing.table
Class EntryTableModel
java.lang.Object
javax.swing.table.AbstractTableModel
com.levigo.util.swing.table.EntryTableModel
- All Implemented Interfaces:
- EditableRowHeaderTableModel, Serializable, TableModel
public class EntryTableModel
- extends AbstractTableModel
- implements EditableRowHeaderTableModel
The EntryTableModel
provides a single-row model in order to
allow the addition of a single row to an existing table which is defined by a
master table model.
- Author:
- jh
- See Also:
- Serialized Form
Methods inherited from class javax.swing.table.AbstractTableModel |
addTableModelListener, findColumn, fireTableCellUpdated, fireTableChanged, fireTableDataChanged, fireTableRowsDeleted, fireTableRowsInserted, fireTableRowsUpdated, fireTableStructureChanged, getColumnClass, getListeners, getTableModelListeners, removeTableModelListener |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
EntryTableModel
public EntryTableModel(AppendableTableModel masterTableModel)
- Construct an entry table model which uses the row scheme of the given
master table model.
getColumnName
public String getColumnName(int i)
- Specified by:
getColumnName
in interface TableModel
- Overrides:
getColumnName
in class AbstractTableModel
getColumnCount
public int getColumnCount()
- Specified by:
getColumnCount
in interface TableModel
getRowCount
public int getRowCount()
- Specified by:
getRowCount
in interface TableModel
getValueAt
public Object getValueAt(int row,
int col)
- Specified by:
getValueAt
in interface TableModel
setValueAt
public void setValueAt(Object value,
int row,
int col)
- Specified by:
setValueAt
in interface TableModel
- Overrides:
setValueAt
in class AbstractTableModel
isCellEditable
public boolean isCellEditable(int arg0,
int arg1)
- Specified by:
isCellEditable
in interface TableModel
- Overrides:
isCellEditable
in class AbstractTableModel
clear
public void clear()
- Clear all entered data.
appendRow
public boolean appendRow()
- Append the entered data by sending it to the master table model.
isEdited
public boolean isEdited()
- Gets whether at least one field has been edited.
isRowLocked
public boolean isRowLocked(int row)
- Specified by:
isRowLocked
in interface EditableRowHeaderTableModel
isEntryRow
public boolean isEntryRow(int row)
- Specified by:
isEntryRow
in interface EditableRowHeaderTableModel