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
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionvoid
Adds an empty row to the modelClass<?>
getColumnClass
(int column) int
getColumnName
(int column) int
getValueAt
(int row, int column) boolean
Returns true if the model has an empty rowboolean
isCellEditable
(int row, int column) void
setValueAt
(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:
getColumnName
in interfaceTableModel
- Overrides:
getColumnName
in classAbstractTableModel
-
isCellEditable
public boolean isCellEditable(int row, int column) - Specified by:
isCellEditable
in interfaceTableModel
- Overrides:
isCellEditable
in classAbstractTableModel
-
getColumnClass
- Specified by:
getColumnClass
in interfaceTableModel
- Overrides:
getColumnClass
in classAbstractTableModel
-
getValueAt
-
setValueAt
- Specified by:
setValueAt
in interfaceTableModel
- Overrides:
setValueAt
in 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
-