p3j.gui.panels.matrices
Class GridMatrixModel

java.lang.Object
  extended by p3j.gui.panels.matrices.GridMatrixModel
All Implemented Interfaces:
net.sf.jeppers.grid.GridModel

public class GridMatrixModel
extends Object
implements net.sf.jeppers.grid.GridModel

Model of JGrid to integrate Matrix2D objects with JGrid. The original matrix is transposed, i.e. columns are regarded as rows and vice versa. Created on January 14, 2007

Author:
Christina Bohk, Roland Ewald

Constructor Summary
GridMatrixModel(Matrix2D mat)
          Default constructor.
 
Method Summary
 void addGridModelListener(net.sf.jeppers.grid.GridModelListener listener)
           
 int getColumnCount()
           
 int getRowCount()
           
 Object getValueAt(int row, int column)
           
 boolean isCellEditable(int row, int column)
           
 void removeGridModelListener(net.sf.jeppers.grid.GridModelListener listener)
           
 void setValueAt(Object value, int row, int column)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

GridMatrixModel

public GridMatrixModel(Matrix2D mat)
Default constructor.

Parameters:
mat - the matrix to be edited
Method Detail

addGridModelListener

public void addGridModelListener(net.sf.jeppers.grid.GridModelListener listener)
Specified by:
addGridModelListener in interface net.sf.jeppers.grid.GridModel

getColumnCount

public int getColumnCount()
Specified by:
getColumnCount in interface net.sf.jeppers.grid.GridModel

getRowCount

public int getRowCount()
Specified by:
getRowCount in interface net.sf.jeppers.grid.GridModel

getValueAt

public Object getValueAt(int row,
                         int column)
Specified by:
getValueAt in interface net.sf.jeppers.grid.GridModel

isCellEditable

public boolean isCellEditable(int row,
                              int column)
Specified by:
isCellEditable in interface net.sf.jeppers.grid.GridModel

removeGridModelListener

public void removeGridModelListener(net.sf.jeppers.grid.GridModelListener listener)
Specified by:
removeGridModelListener in interface net.sf.jeppers.grid.GridModel

setValueAt

public void setValueAt(Object value,
                       int row,
                       int column)
Specified by:
setValueAt in interface net.sf.jeppers.grid.GridModel


Copyright © 2012. All Rights Reserved.