com.jstatcom.table
Class JSCSArrayTableModel
- java.lang.Object
-
- javax.swing.table.AbstractTableModel
-
- com.jstatcom.table.JSCAbstractTableModel
-
- com.jstatcom.table.JSCSArrayTableModel
-
- All Implemented Interfaces:
- java.io.Serializable, javax.swing.table.TableModel
public class JSCSArrayTableModel extends JSCAbstractTableModel
Implementation ofJSCAbstractTableModelforJSCSArraydata objects. It takes thetransposedproperty into account.- See Also:
- Serialized Form
-
-
Constructor Summary
Constructors Constructor and Description JSCSArrayTableModel(Symbol symbol)Constructs a table model for a symbol of typeJSCTypes.SARRAY.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method and Description intgetColumnCount()intgetRowCount()java.lang.ObjectgetValueAt(int rowIndex, int columnIndex)booleanisTransposed()Gets whether the underlying data array is transposed through this model.voidsetTransposed(boolean isTransposed)Sets whether the underlying data array is transposed through this model.voidsetValueAt(java.lang.Object aValue, int rowIndex, int columnIndex)The data model is editable.-
Methods inherited from class com.jstatcom.table.JSCAbstractTableModel
getColIndexEditableMap, getJSCData, getRowIndexEditableMap, isCellEditable, isEditable, setColEditableMap, setEditable, setRowEditableMap
-
Methods inherited from class javax.swing.table.AbstractTableModel
addTableModelListener, findColumn, fireTableCellUpdated, fireTableChanged, fireTableDataChanged, fireTableRowsDeleted, fireTableRowsInserted, fireTableRowsUpdated, fireTableStructureChanged, getColumnClass, getColumnName, getListeners, getTableModelListeners, removeTableModelListener
-
-
-
-
Constructor Detail
-
JSCSArrayTableModel
public JSCSArrayTableModel(Symbol symbol)
Constructs a table model for a symbol of typeJSCTypes.SARRAY. The argument can benull.- Parameters:
symbol- must be of typeJSCTypes.SARRAY, can benull- Throws:
java.lang.IllegalArgumentException-if (symbol.type != JSCTypes.SARRAY)
-
-
Method Detail
-
getColumnCount
public int getColumnCount()
-
getRowCount
public int getRowCount()
-
getValueAt
public java.lang.Object getValueAt(int rowIndex, int columnIndex)
-
setValueAt
public void setValueAt(java.lang.Object aValue, int rowIndex, int columnIndex)The data model is editable. This method sets a value in the underlying data.- Specified by:
setValueAtin interfacejavax.swing.table.TableModel- Overrides:
setValueAtin classjavax.swing.table.AbstractTableModel- Parameters:
aValue- must be nonnullrowIndex- the row index, will be treated with takingtransposedinto accountcolumnIndex- the column index, will be treated with takingtransposedinto account- Throws:
java.lang.IllegalArgumentException-if (aValue == null)
-
isTransposed
public final boolean isTransposed()
Gets whether the underlying data array is transposed through this model.- Returns:
trueif transposed
-
setTransposed
public final void setTransposed(boolean isTransposed)
Sets whether the underlying data array is transposed through this model. Subclasses must take this into account while overwritinggetRowCount,getColumnCountandgetValueAt. This property should not affect the original data but only the model view.- Parameters:
isTransposed-trueif transposed
-
-
DMelt 3.0 © DataMelt by jWork.ORG