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 class
MatrixTableModelLinear.MatrixCellRenderer
-
Field Summary
Fields Modifier and Type Field Description protected double
defaultValue
protected MatrixND
m
protected List<Object[]>
mappingRowSems
protected TableCellRenderer
renderer
protected boolean
showDefault
-
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 void
computeMapping()
int
getAdditionalColumns()
Get how many additional columns table model need to renderer matrix.int
getAdditionalRows()
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.classint
getColumnCount()
String
getColumnName(int column)
Return column names.double
getDefaultValue()
MatrixND
getMatrix()
TableCellRenderer
getMatrixCellRenderer()
int
getRowCount()
Object
getValueAt(int rowIndex, int columnIndex)
boolean
isCellEditable(int rowIndex, int columnIndex)
boolean
isShowDefault()
void
setDefaultValue(double defaultValue)
void
setMatrix(MatrixND m)
void
setShowDefault(boolean showDefault)
void
setValueAt(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:
getMatrix
in interfaceMatrixTableModel
-
setMatrix
public void setMatrix(MatrixND m)
- Specified by:
setMatrix
in 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:
getRowCount
in interfaceTableModel
-
getColumnCount
public int getColumnCount()
- Specified by:
getColumnCount
in interfaceTableModel
-
getValueAt
public Object getValueAt(int rowIndex, int columnIndex)
- Specified by:
getValueAt
in interfaceTableModel
-
isCellEditable
public boolean isCellEditable(int rowIndex, int columnIndex)
- Specified by:
isCellEditable
in interfaceTableModel
- Overrides:
isCellEditable
in classAbstractTableModel
-
setValueAt
public void setValueAt(Object aValue, int rowIndex, int columnIndex)
- Specified by:
setValueAt
in interfaceTableModel
- Overrides:
setValueAt
in classAbstractTableModel
-
getColumnName
public String getColumnName(int column)
Return column names. Try to return i18n column names if possible.- Specified by:
getColumnName
in interfaceTableModel
- Overrides:
getColumnName
in classAbstractTableModel
-
getColumnClass
public Class<?> getColumnClass(int column)
Par defaut, la classe de la colonne est du type Function.class- Specified by:
getColumnClass
in interfaceTableModel
- Overrides:
getColumnClass
in classAbstractTableModel
- Parameters:
column
-
-
getMatrixCellRenderer
public TableCellRenderer getMatrixCellRenderer()
- Specified by:
getMatrixCellRenderer
in interfaceMatrixTableModel
-
getAdditionalRows
public int getAdditionalRows()
Description copied from interface:MatrixTableModel
Get how many additional rows table model need to renderer matrix.- Specified by:
getAdditionalRows
in interfaceMatrixTableModel
- Returns:
- additional rows
-
getAdditionalColumns
public int getAdditionalColumns()
Description copied from interface:MatrixTableModel
Get how many additional columns table model need to renderer matrix.- Specified by:
getAdditionalColumns
in interfaceMatrixTableModel
- Returns:
- additional columns
-
-