org.nuiton.math.matrix.gui
Class MatrixTableModelLinear

java.lang.Object
  extended by javax.swing.table.AbstractTableModel
      extended by 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: 353 $ Last update: $Date: 2011-04-13 17:59:26 +0200 (mer., 13 avril 2011) $ by : $Author: echatellier $
Author:
poussin
See Also:
Serialized Form

Nested Class Summary
static class MatrixTableModelLinear.MatrixCellRenderer
           
 
Field Summary
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
MatrixTableModelLinear(MatrixND m, boolean showDefault)
           
 
Method Summary
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.class
 int 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

mappingRowSems

protected List<Object[]> mappingRowSems

renderer

protected TableCellRenderer renderer
Constructor Detail

MatrixTableModelLinear

public MatrixTableModelLinear(MatrixND m,
                              boolean showDefault)
Method Detail

getMatrix

public MatrixND getMatrix()
Specified by:
getMatrix in interface MatrixTableModel

setMatrix

public void setMatrix(MatrixND m)
Specified by:
setMatrix in interface MatrixTableModel

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 interface TableModel

getColumnCount

public int getColumnCount()
Specified by:
getColumnCount in interface TableModel

getValueAt

public Object getValueAt(int rowIndex,
                         int columnIndex)
Specified by:
getValueAt in interface TableModel

isCellEditable

public boolean isCellEditable(int rowIndex,
                              int columnIndex)
Specified by:
isCellEditable in interface TableModel
Overrides:
isCellEditable in class AbstractTableModel

setValueAt

public void setValueAt(Object aValue,
                       int rowIndex,
                       int columnIndex)
Specified by:
setValueAt in interface TableModel
Overrides:
setValueAt in class AbstractTableModel

getColumnName

public String getColumnName(int column)
Return column names. Try to return i18n column names if possible.

Specified by:
getColumnName in interface TableModel
Overrides:
getColumnName in class AbstractTableModel

getColumnClass

public Class<?> getColumnClass(int column)
Par defaut, la classe de la colonne est du type Function.class

Specified by:
getColumnClass in interface TableModel
Overrides:
getColumnClass in class AbstractTableModel
Parameters:
column -

getMatrixCellRenderer

public TableCellRenderer getMatrixCellRenderer()
Specified by:
getMatrixCellRenderer in interface MatrixTableModel

getAdditionalRows

public int getAdditionalRows()
Description copied from interface: MatrixTableModel
Get how many additional rows table model need to renderer matrix.

Specified by:
getAdditionalRows in interface MatrixTableModel
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 interface MatrixTableModel
Returns:
additional columns


Copyright © 2004-2011 CodeLutin. All Rights Reserved.