|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectjavax.swing.table.AbstractTableModel
org.nuiton.math.matrix.gui.MatrixTableModelND
public class MatrixTableModelND
Extension de AbstractTableModel pour definir un TableModel avec une MatrixND comme support d'information. Created: 21 mars 2006 19:01:27
| Field Summary | |
|---|---|
protected int |
addCol
nombre de colone ajouté |
protected int |
addRow
nombre de ligne ajouté |
protected boolean |
enabled
par defaut, la matrice est editable. |
protected MatrixND |
m
|
protected int[] |
multRowCol
|
protected TableCellRenderer |
renderer
|
| Fields inherited from class javax.swing.table.AbstractTableModel |
|---|
listenerList |
| Constructor Summary | |
|---|---|
MatrixTableModelND(MatrixND m)
TableModel basee sur une MatrixND a une ou deux dimensions. |
|
| Method Summary | |
|---|---|
Class<?> |
getColumnClass(int column)
|
int |
getColumnCount()
|
String |
getColumnName(int column)
|
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 |
setEnabled(boolean enabled)
|
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)
|
| 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 |
|---|
protected MatrixND m
protected int addRow
protected int addCol
protected int[] multRowCol
protected boolean enabled
protected TableCellRenderer renderer
| Constructor Detail |
|---|
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 table
MatrixException| Method Detail |
|---|
public void setMatrix(MatrixND m)
setMatrix in interface MatrixTableModel
protected int[] tableToMatrix(int row,
int col)
row - la ligne dans la tablecol - la colonne dans la table
protected int tableToMatrixCell(int dim,
int tableValue)
protected Object getValue(int row,
int col)
row - rowcol - column
protected String getSemantic(int dim,
int elem)
dim - la dimension dans lequel on recherche l'elementelem - l'element de la dimension a prendre
public String getColumnName(int column)
getColumnName in interface TableModelgetColumnName in class AbstractTableModelpublic int getRowCount()
getRowCount in interface TableModelpublic int getColumnCount()
getColumnCount in interface TableModel
public Object getValueAt(int row,
int column)
getValueAt in interface TableModelrow - La lignecolumn - La colonnes
public 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 colonnes
public boolean isCellEditable(int row,
int column)
isCellEditable in interface TableModelisCellEditable in class AbstractTableModelpublic void setEnabled(boolean enabled)
setEnabled in interface MatrixTableModelpublic Class<?> getColumnClass(int column)
getColumnClass in interface TableModelgetColumnClass in class AbstractTableModelpublic TableCellRenderer getMatrixCellRenderer()
getMatrixCellRenderer in interface MatrixTableModel
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||