Package com.treemap.swing.table
Class DataFrameTableModel<R,C,V>
java.lang.Object
com.treemap.swing.table.DataFrameTableModel<R,C,V>
- All Implemented Interfaces:
TableModel
-
Field Summary
Fields -
Constructor Summary
ConstructorsConstructorDescriptionDataFrameTableModel(com.macrofocus.molap.dataframe.DataFrame<R, C, V> dataFrame) -
Method Summary
Modifier and TypeMethodDescriptionvoidAdds a listener to the list that's notified each time a change to the data model occurs.voidForwards the given notification event to allTableModelListenersthat registered themselves as listeners for this table model.protected voidNotifies all listeners that all cell values in the table's rows may have changed.protected voidNotifies all listeners that the table's structure has changed.Class<?> getColumnClass(int columnIndex) intgetColumnName(int column) intgetValueAt(int rowIndex, int columnIndex) booleanisCellEditable(int rowIndex, int columnIndex) voidRemoves a listener from the list that's notified each time a change to the data model occurs.voidsetValueAt(Object aValue, int rowIndex, int columnIndex)
-
Field Details
-
listeners
-
-
Constructor Details
-
DataFrameTableModel
-
-
Method Details
-
getColumnName
- Specified by:
getColumnNamein interfaceTableModel
-
getColumnClass
- Specified by:
getColumnClassin interfaceTableModel
-
getRowCount
public int getRowCount()- Specified by:
getRowCountin interfaceTableModel
-
getColumnCount
public int getColumnCount()- Specified by:
getColumnCountin interfaceTableModel
-
getValueAt
- Specified by:
getValueAtin interfaceTableModel
-
isCellEditable
public boolean isCellEditable(int rowIndex, int columnIndex) - Specified by:
isCellEditablein interfaceTableModel
-
setValueAt
- Specified by:
setValueAtin interfaceTableModel
-
addTableModelListener
Adds a listener to the list that's notified each time a change to the data model occurs.- Specified by:
addTableModelListenerin interfaceTableModel- Parameters:
l- the TableModelListener
-
removeTableModelListener
Removes a listener from the list that's notified each time a change to the data model occurs.- Specified by:
removeTableModelListenerin interfaceTableModel- Parameters:
l- the TableModelListener
-
fireTableDataChanged
protected void fireTableDataChanged()Notifies all listeners that all cell values in the table's rows may have changed. The number of rows may also have changed and theJTableshould redraw the table from scratch. The structure of the table (as in the order of the columns) is assumed to be the same.- See Also:
-
fireTableStructureChanged
protected void fireTableStructureChanged()Notifies all listeners that the table's structure has changed. The number of columns in the table, and the names and types of the new columns may be different from the previous state. If theJTablereceives this event and itsautoCreateColumnsFromModelflag is set it discards any table columns that it had and reallocates default columns in the order they appear in the model. This is the same as callingsetModel(TableModel)on theJTable.- See Also:
-
fireTableChanged
Forwards the given notification event to allTableModelListenersthat registered themselves as listeners for this table model.- Parameters:
e- the event to be forwarded- See Also:
-