public class MatrixTableModelND extends AbstractTableModel implements MatrixTableModel
| Modifier and Type | Class and Description |
|---|---|
static class |
MatrixTableModelND.MatrixCellRenderer |
| Modifier and Type | Field and Description |
|---|---|
protected int |
addCol
nombre de colone ajouté
|
protected int |
addRow
nombre de ligne ajouté
|
protected MatrixND |
m |
protected int[] |
multRowCol |
protected TableCellRenderer |
renderer |
listenerList| Constructor and Description |
|---|
MatrixTableModelND(MatrixND m)
TableModel basee sur une MatrixND a une ou deux dimensions.
|
| Modifier and Type | Method and Description |
|---|---|
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) |
int |
getColumnCount() |
String |
getColumnName(int column) |
MatrixND |
getMatrix() |
TableCellRenderer |
getMatrixCellRenderer() |
int |
getRowCount() |
protected String |
getSemantic(int dim,
int elem)
Retourne une representation String de la semantique de l'element elem de
la dimension dim
|
protected Object |
getValue(int row,
int col)
Get value.
|
Object |
getValueAt(int row,
int column) |
boolean |
isCellEditable(int row,
int column) |
void |
setMatrix(MatrixND m) |
void |
setValueAt(Object obj,
int row,
int column) |
protected int[] |
tableToMatrix(int row,
int col)
converti les coordonnées de la table en coordonnées pour la matrice
|
protected int |
tableToMatrixCell(int dim,
int tableValue) |
addTableModelListener, findColumn, fireTableCellUpdated, fireTableChanged, fireTableDataChanged, fireTableRowsDeleted, fireTableRowsInserted, fireTableRowsUpdated, fireTableStructureChanged, getListeners, getTableModelListeners, removeTableModelListenerclone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitaddTableModelListener, removeTableModelListenerprotected MatrixND m
protected int addRow
protected int addCol
protected int[] multRowCol
protected TableCellRenderer renderer
public MatrixTableModelND(MatrixND m) throws MatrixException
Pour les matrices 1D :
La premiere dimension represente les colonnes.
Pour les matrices 2D :
La premiere dimension represente les lignes.
La deuxieme dimension represente les colonnes.
Pour les matrices 3D :
La premiere dimension represente les lignes.
La deuxieme dimension represente les colonnes.
La troisieme dimension represente les lignes (dim1 x dim3).
m - Matrice a afficher dans la tableMatrixExceptionpublic MatrixND getMatrix()
getMatrix in interface MatrixTableModelpublic void setMatrix(MatrixND m)
setMatrix in interface MatrixTableModelprotected int[] tableToMatrix(int row,
int col)
row - la ligne dans la tablecol - la colonne dans la tableprotected int tableToMatrixCell(int dim,
int tableValue)
protected Object getValue(int row, int col)
row - rowcol - columnprotected String getSemantic(int dim, int elem)
dim - la dimension dans lequel on recherche l'elementelem - l'element de la dimension a prendrepublic String getColumnName(int column)
getColumnName in interface TableModelgetColumnName in class AbstractTableModelpublic int getRowCount()
getRowCount in interface TableModelpublic int getColumnCount()
getColumnCount in interface TableModelpublic Object getValueAt(int row, int column)
getValueAt in interface TableModelrow - La lignecolumn - La colonnespublic void setValueAt(Object obj, int row, int column)
setValueAt in interface TableModelsetValueAt in class AbstractTableModelobj - L'objet a inserer dans la matrice.row - La lignecolumn - La colonnespublic boolean isCellEditable(int row,
int column)
isCellEditable in interface TableModelisCellEditable in class AbstractTableModelpublic Class<?> getColumnClass(int column)
getColumnClass in interface TableModelgetColumnClass in class AbstractTableModelpublic TableCellRenderer getMatrixCellRenderer()
getMatrixCellRenderer in interface MatrixTableModelpublic int getAdditionalRows()
MatrixTableModelgetAdditionalRows in interface MatrixTableModelpublic int getAdditionalColumns()
MatrixTableModelgetAdditionalColumns in interface MatrixTableModelCopyright © 2004-2012 CodeLutin. All Rights Reserved.