Package weka.gui
Class InteractiveTableModel
- java.lang.Object
-
- javax.swing.table.AbstractTableModel
-
- weka.gui.InteractiveTableModel
-
- All Implemented Interfaces:
Serializable,TableModel
- Direct Known Subclasses:
InteractiveTableModel
public class InteractiveTableModel extends AbstractTableModel
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:
- Serialized Form
-
-
Field Summary
Fields Modifier and Type Field Description intm_hidden_indexIndex of the hidden column
-
Constructor Summary
Constructors Constructor Description InteractiveTableModel(String[] columnNames)Constructor
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description voidaddEmptyRow()Adds an empty row to the modelClass<?>getColumnClass(int column)intgetColumnCount()StringgetColumnName(int column)intgetRowCount()ObjectgetValueAt(int row, int column)booleanhasEmptyRow()Returns 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
-
-
-
-
Constructor Detail
-
InteractiveTableModel
public InteractiveTableModel(String[] columnNames)
Constructor- Parameters:
columnNames- the names of the columns
-
-
Method Detail
-
getColumnName
public String getColumnName(int column)
- Specified by:
getColumnNamein interfaceTableModel- Overrides:
getColumnNamein classAbstractTableModel
-
isCellEditable
public boolean isCellEditable(int row, int column)- Specified by:
isCellEditablein interfaceTableModel- Overrides:
isCellEditablein classAbstractTableModel
-
getColumnClass
public Class<?> getColumnClass(int column)
- Specified by:
getColumnClassin interfaceTableModel- Overrides:
getColumnClassin classAbstractTableModel
-
getValueAt
public Object getValueAt(int row, int column)
-
setValueAt
public void setValueAt(Object value, int row, int column)
- 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
-
-