: Download: FAQ: Licensing: Support: Contact ME
LwVCL Home
Introduction
Overview
Screen Shots
On-line Demos
Requirements
Further Plans
Docs
Tutorial
How-to (PDF)
API
FAQ
Download
Latest version

Home > J2SE > API

Overview  Package   Class  Tree  Deprecated  Index  Help 

org.zaval.data
Interface MatrixModel

All Known Implementing Classes:
Matrix, LwTreeGrid

public interface MatrixModel

This interface provides ability to manipulate with 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 obj)
          Updates the specified cell with the specified value.
 void removeCols(int begcol, int count)
          Removes the specified number of columns starting from the given column.
 void removeMatrixListener(MatrixListener l)
          Removes the matrix listener.
 void removeRows(int begrow, int count)
          Removes the specified number of rows starting from the given row.
 

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 obj)
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.

removeRows

public void removeRows(int begrow,
                       int count)
Removes the specified number of rows starting from the given row.
Parameters:
begrow - the first removed row.
count - the number of rows to be removed starting from the first row.

removeCols

public void removeCols(int begcol,
                       int count)
Removes the specified number of columns starting from the given column.
Parameters:
begcol - the first removed column.
count - the number of columns to be removed starting from the first column.

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.


: up