borland.jbcl Packages  borland.jbcl Class Hierarchy  borland.jbcl.model 

MatrixModel interface

borland.jbcl.model.MatrixModel
   +----borland.jbcl.model.WritableMatrixModel

About the MatrixModel interface

Properties  Methods  Event Listeners

Implemented by GridControl, MatrixDataSetManager, BasicMatrixContainer

Contains the methods required for a read-only model object that holds matrix data. A matrix model holds data in a two-dimensional array such as a grid.

The MatrixModel interface has a rowCount property that returns the number of rows in a matrix container, and a columnCount property that returns the number of columns. Use the get() method to locate a data item when you know the row and column of the data item. Or you can use find() to obtain the location of a data item in the model if you know what the data item is.

Usually you extend a class that implements this interface, such as BasicMatrixContainer. You can, however, implement the interface directly.

If you are developing a read-and-write component that holds matrix data, implement the WritableMatrixModel interface instead of MatrixModel.

See also: Models in the JavaBeans Component Library, Matrix model classes and interfaces


MatrixModel properties

*Read-only properties **Write-only properties

Properties defined in this interface

MatrixModel methods

Methods defined in this interface

MatrixModel event listeners


MatrixModel properties

columnCount

 public int getColumnCount()
Returns the number of columns in the matrix.

rowCount

 public int getRowCount()
Returns the number of rows in the matrix.

MatrixModel methods

find(java.lang.Object)

  public MatrixLocation find(java.lang.Object data)
Returns the storage location of the passed data object or null if the data object is not found.

Parameters:

data
The data object to search this container for.

get(int, int)

  public Object get(int row, int column)
Returns data object at row and column.

Parameters:

row
The row address of the data object to get.
column
The column address of the data object to get.

MatrixModel event listeners

This interface is a source for the following event sets. For information on the JBCL event sets, see Events in JBCL.

model

 public void addModelListener(borland.jbcl.model.MatrixModelListener listener)
 public void removeModelListener(borland.jbcl.model.MatrixModelListener listener)