org.zaval.data
Interface MatrixModel

All Known Implementing Classes:
Matrix, LwTreeGrid

public interface MatrixModel

This interface provides ability to manipulate a matrix-like data structures.


Method Summary
 void addMatrixListener(MatrixListener l)
          Adds the matrix listener to be notified whenever the matrix cell has been updated or the matrix dimension has been changed.
 java.lang.Object get(int row, int col)
          Gets the value of the specified cell.
 int getCols()
          Gets the number of columns.
 int getRows()
          Gets the number of rows.
 void put(int row, int col, java.lang.Object o)
          Updates the specified cell with the specified value.
 void removeMatrixListener(MatrixListener l)
          Removes the matrix listener.
 

Method Detail

getRows

public int getRows()
Gets the number of rows.
Returns:
a number of rows.

getCols

public int getCols()
Gets the number of columns.
Returns:
a number of columns.

get

public java.lang.Object get(int row,
                            int col)
Gets the value of the specified cell.
Parameters:
row - the specified row.
col - the specified column.
Returns:
a value.

put

public void put(int row,
                int col,
                java.lang.Object o)
Updates the specified cell with the specified value.
Parameters:
row - the specified row.
col - the specified column.
obj - the specified value to update the cell value.

addMatrixListener

public void addMatrixListener(MatrixListener l)
Adds the matrix listener to be notified whenever the matrix cell has been updated or the matrix dimension has been changed.
Parameters:
l - the matrix listener.

removeMatrixListener

public void removeMatrixListener(MatrixListener l)
Removes the matrix listener.
Parameters:
l - the matrix listener.


Copyright © Zaval Creative Engineering Group, 2000-2005.
http://www.zaval.org