Package weka.gui
Class InteractiveTableModel
java.lang.Object
javax.swing.table.AbstractTableModel
weka.gui.InteractiveTableModel
- All Implemented Interfaces:
Serializable,TableModel
- Direct Known Subclasses:
InteractiveTableModel
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:
-
Field Summary
Fields -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionvoidAdds an empty row to the modelClass<?>getColumnClass(int column) intgetColumnName(int column) intgetValueAt(int row, int column) booleanReturns true if the model has an empty rowbooleanisCellEditable(int row, int column) voidsetValueAt(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
-
Field Details
-
Constructor Details
-
InteractiveTableModel
Constructor- Parameters:
columnNames- the names of the columns
-
-
Method Details
-
getColumnName
- Specified by:
getColumnNamein interfaceTableModel- Overrides:
getColumnNamein classAbstractTableModel
-
isCellEditable
public boolean isCellEditable(int row, int column) - Specified by:
isCellEditablein interfaceTableModel- Overrides:
isCellEditablein classAbstractTableModel
-
getColumnClass
- Specified by:
getColumnClassin interfaceTableModel- Overrides:
getColumnClassin classAbstractTableModel
-
getValueAt
-
setValueAt
- Specified by:
setValueAtin interfaceTableModel- Overrides:
setValueAtin classAbstractTableModel
-
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
-