Package org.nuiton.math.matrix.gui
Class MatrixTableModelLinear
- java.lang.Object
-
- javax.swing.table.AbstractTableModel
-
- org.nuiton.math.matrix.gui.MatrixTableModelLinear
-
- All Implemented Interfaces:
Serializable,TableModel,MatrixTableModel
public class MatrixTableModelLinear extends AbstractTableModel implements MatrixTableModel
MatrixTableModelLinear. Created: 22 mars 2006 12:11:46- Version:
- $Revision$ Last update: $Date$ by : $Author$
- Author:
- poussin
- See Also:
- Serialized Form
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description static classMatrixTableModelLinear.MatrixCellRenderer
-
Field Summary
Fields Modifier and Type Field Description protected doubledefaultValueprotected MatrixNDmprotected List<Object[]>mappingRowSemsprotected TableCellRendererrendererprotected booleanshowDefault-
Fields inherited from class javax.swing.table.AbstractTableModel
listenerList
-
-
Constructor Summary
Constructors Constructor Description MatrixTableModelLinear(MatrixND m, boolean showDefault)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description protected voidcomputeMapping()intgetAdditionalColumns()Get how many additional columns table model need to renderer matrix.intgetAdditionalRows()Get how many additional rows table model need to renderer matrix.Class<?>getColumnClass(int column)Par defaut, la classe de la colonne est du type Function.classintgetColumnCount()StringgetColumnName(int column)Return column names.doublegetDefaultValue()MatrixNDgetMatrix()TableCellRenderergetMatrixCellRenderer()intgetRowCount()ObjectgetValueAt(int rowIndex, int columnIndex)booleanisCellEditable(int rowIndex, int columnIndex)booleanisShowDefault()voidsetDefaultValue(double defaultValue)voidsetMatrix(MatrixND m)voidsetShowDefault(boolean showDefault)voidsetValueAt(Object aValue, int rowIndex, int columnIndex)-
Methods inherited from class javax.swing.table.AbstractTableModel
addTableModelListener, findColumn, fireTableCellUpdated, fireTableChanged, fireTableDataChanged, fireTableRowsDeleted, fireTableRowsInserted, fireTableRowsUpdated, fireTableStructureChanged, getListeners, getTableModelListeners, removeTableModelListener
-
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
-
Methods inherited from interface javax.swing.table.TableModel
addTableModelListener, removeTableModelListener
-
-
-
-
Field Detail
-
m
protected MatrixND m
-
showDefault
protected boolean showDefault
-
defaultValue
protected double defaultValue
-
renderer
protected TableCellRenderer renderer
-
-
Constructor Detail
-
MatrixTableModelLinear
public MatrixTableModelLinear(MatrixND m, boolean showDefault)
-
-
Method Detail
-
getMatrix
public MatrixND getMatrix()
- Specified by:
getMatrixin interfaceMatrixTableModel
-
setMatrix
public void setMatrix(MatrixND m)
- Specified by:
setMatrixin interfaceMatrixTableModel
-
computeMapping
protected void computeMapping()
-
isShowDefault
public boolean isShowDefault()
- Returns:
- Returns the showDefault.
-
setShowDefault
public void setShowDefault(boolean showDefault)
- Parameters:
showDefault- The showDefault to set.
-
getDefaultValue
public double getDefaultValue()
- Returns:
- Returns the defaultValue.
-
setDefaultValue
public void setDefaultValue(double defaultValue)
- Parameters:
defaultValue- The defaultValue to set.
-
getRowCount
public int getRowCount()
- Specified by:
getRowCountin interfaceTableModel
-
getColumnCount
public int getColumnCount()
- Specified by:
getColumnCountin interfaceTableModel
-
getValueAt
public Object getValueAt(int rowIndex, int columnIndex)
- Specified by:
getValueAtin interfaceTableModel
-
isCellEditable
public boolean isCellEditable(int rowIndex, int columnIndex)- Specified by:
isCellEditablein interfaceTableModel- Overrides:
isCellEditablein classAbstractTableModel
-
setValueAt
public void setValueAt(Object aValue, int rowIndex, int columnIndex)
- Specified by:
setValueAtin interfaceTableModel- Overrides:
setValueAtin classAbstractTableModel
-
getColumnName
public String getColumnName(int column)
Return column names. Try to return i18n column names if possible.- Specified by:
getColumnNamein interfaceTableModel- Overrides:
getColumnNamein classAbstractTableModel
-
getColumnClass
public Class<?> getColumnClass(int column)
Par defaut, la classe de la colonne est du type Function.class- Specified by:
getColumnClassin interfaceTableModel- Overrides:
getColumnClassin classAbstractTableModel- Parameters:
column-
-
getMatrixCellRenderer
public TableCellRenderer getMatrixCellRenderer()
- Specified by:
getMatrixCellRendererin interfaceMatrixTableModel
-
getAdditionalRows
public int getAdditionalRows()
Description copied from interface:MatrixTableModelGet how many additional rows table model need to renderer matrix.- Specified by:
getAdditionalRowsin interfaceMatrixTableModel- Returns:
- additional rows
-
getAdditionalColumns
public int getAdditionalColumns()
Description copied from interface:MatrixTableModelGet how many additional columns table model need to renderer matrix.- Specified by:
getAdditionalColumnsin interfaceMatrixTableModel- Returns:
- additional columns
-
-