public class DataFrameTableModel extends AbstractTableModel implements com.zavtech.morpheus.frame.DataFrameListener
TableModel implementation to display a DataFrame in a JTable.This is open source software released under the Apache 2.0 License
| Modifier and Type | Field and Description |
|---|---|
private ThreadLocal<Object[]> |
coordinates |
private com.zavtech.morpheus.frame.DataFrame<Object,Object> |
frame |
private static Logger |
LOG |
private boolean |
mutable |
listenerList| Constructor and Description |
|---|
DataFrameTableModel()
Constructor
|
DataFrameTableModel(com.zavtech.morpheus.frame.DataFrame frame)
Constructor
|
| Modifier and Type | Method and Description |
|---|---|
Class<?> |
getColumnClass(int colIndex) |
int |
getColumnCount() |
String |
getColumnName(int colIndex) |
com.zavtech.morpheus.frame.DataFrame |
getFrame()
Returns the frame assigned to this model
|
(package private) Object[] |
getLastCoordinates()
Returns the coordinates of the last call to getValueAt()
|
int |
getRowCount() |
Object |
getValueAt(int rowIndex,
int colIndex) |
boolean |
isCellEditable(int rowIndex,
int colIndex) |
void |
onDataFrameEvent(com.zavtech.morpheus.frame.DataFrameEvent event) |
void |
setFrame(com.zavtech.morpheus.frame.DataFrame frame)
Sets the frame for this model
|
void |
setMutable(boolean mutable)
Sets whether the model will allow matrix changes
|
void |
setValueAt(Object value,
int rowIndex,
int colIndex) |
addTableModelListener, findColumn, fireTableCellUpdated, fireTableChanged, fireTableDataChanged, fireTableRowsDeleted, fireTableRowsInserted, fireTableRowsUpdated, fireTableStructureChanged, getListeners, getTableModelListeners, removeTableModelListenerprivate static final Logger LOG
private boolean mutable
private ThreadLocal<Object[]> coordinates
public DataFrameTableModel()
public DataFrameTableModel(com.zavtech.morpheus.frame.DataFrame frame)
frame - the frame to expose through table modelpublic com.zavtech.morpheus.frame.DataFrame getFrame()
public void setFrame(com.zavtech.morpheus.frame.DataFrame frame)
frame - the frame (can be nullpublic void setMutable(boolean mutable)
mutable - true to enable editingpublic void onDataFrameEvent(com.zavtech.morpheus.frame.DataFrameEvent event)
onDataFrameEvent in interface com.zavtech.morpheus.frame.DataFrameListenerpublic int getRowCount()
getRowCount in interface TableModelpublic int getColumnCount()
getColumnCount in interface TableModelpublic String getColumnName(int colIndex)
getColumnName in interface TableModelgetColumnName in class AbstractTableModelpublic Class<?> getColumnClass(int colIndex)
getColumnClass in interface TableModelgetColumnClass in class AbstractTableModelpublic boolean isCellEditable(int rowIndex,
int colIndex)
isCellEditable in interface TableModelisCellEditable in class AbstractTableModelpublic Object getValueAt(int rowIndex, int colIndex)
getValueAt in interface TableModelpublic void setValueAt(Object value, int rowIndex, int colIndex)
setValueAt in interface TableModelsetValueAt in class AbstractTableModelObject[] getLastCoordinates()
Copyright 2014-2017, Xavier Witdouck