Class DataFrameTableModel<R,C,V>
java.lang.Object
com.macrofocus.high_d.table.swing.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 TypeMethodDescriptionvoid
Adds a listener to the list that's notified each time a change to the data model occurs.void
Forwards the given notification event to allTableModelListeners
that registered themselves as listeners for this table model.protected void
Notifies all listeners that all cell values in the table's rows may have changed.protected void
Notifies all listeners that the table's structure has changed.Class<?>
getColumnClass
(int columnIndex) int
getColumnName
(int column) int
getValueAt
(int rowIndex, int columnIndex) boolean
isCellEditable
(int rowIndex, int columnIndex) void
Removes a listener from the list that's notified each time a change to the data model occurs.void
setValueAt
(Object aValue, int rowIndex, int columnIndex)
-
Field Details
-
listeners
-
-
Constructor Details
-
DataFrameTableModel
-
-
Method Details
-
getColumnName
- Specified by:
getColumnName
in interfaceTableModel
-
getColumnClass
- Specified by:
getColumnClass
in interfaceTableModel
-
getRowCount
public int getRowCount()- Specified by:
getRowCount
in interfaceTableModel
-
getColumnCount
public int getColumnCount()- Specified by:
getColumnCount
in interfaceTableModel
-
getValueAt
- Specified by:
getValueAt
in interfaceTableModel
-
isCellEditable
public boolean isCellEditable(int rowIndex, int columnIndex) - Specified by:
isCellEditable
in interfaceTableModel
-
setValueAt
- Specified by:
setValueAt
in interfaceTableModel
-
addTableModelListener
Adds a listener to the list that's notified each time a change to the data model occurs.- Specified by:
addTableModelListener
in 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:
removeTableModelListener
in 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 theJTable
should redraw the table from scratch. The structure of the table (as in the order of the columns) is assumed to be the same. -
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 theJTable
receives this event and itsautoCreateColumnsFromModel
flag 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 allTableModelListeners
that registered themselves as listeners for this table model.- Parameters:
e
- the event to be forwarded- See Also:
-