borland.jbcl Packages borland.jbcl Class Hierarchy borland.jbcl.model
borland.jbcl.model.MatrixModel +----borland.jbcl.model.WritableMatrixModel
Properties Methods Event Listeners
Implemented by GridControl, MatrixDataSetManager, BasicMatrixContainer
Provides the methods required for a read-write matrix model object; that is, a model that holds data in a two-dimensional array such as a grid. WritableMatrixModel extends the MatrixModel interface and adds the methods needed to add, change, and delete items in the matrix.
Generally, you extend a class that implements this interface, such as BasicMatrixContainer. You can, however, implement the interface directly if you are creating an entirely new component.
If you need read access only, you can choose to implement the MatrixModel interface instead.
See also: Models in the Java Beans Component Library, Matrix model classes and interfaces
public boolean isVariableColumns()Determines whether columns can be add to or removed from the matrix. If variableColumns is true, columns can be added or removed.
public boolean isVariableRows()Determines whether rows can be add to or removed from the matrix. If variableRows is true, rows can be added or removed.
public void addColumn()Appends a new column after the last column in the matrix.
public void addColumn(int aheadOf)Inserts a new column into the matrix before the specified column.
Parameters:
public void addRow()Appends a new row after the last row.
public void addRow(int aheadOf)Inserts a new row before the specified row.
Parameters:
public boolean canSet(int row, int column, boolean startEdit)Determines whether the data object at the specified row and column can be modified. If canSet() returns true, the data object can be changed.
Parameters:
public void enableModelEvents(boolean enable)Determines whether the broadcasting of matrix-model events is enabled or disabled.
Parameters:
public void removeAllColumns()Removes all columns in the matrix.
public void removeAllRows()Removes all rows in the matrix .
public void removeColumn(int column)Removes the specified column from the matrix.
Parameters:
public void removeRow(int row)Removes the specified row from the matrix.
Parameters:
public void set(int row, int column, java.lang.Object data)Sets the data object at the specified row and column location within the matrix.
Parameters:
public void touched(int row, int column)Notifies all matrix-model listeners that the data object at the specified row and column location was manipulated.
Parameters:
public void addModelListener(borland.jbcl.model.MatrixModelListener listener) public void removeModelListener(borland.jbcl.model.MatrixModelListener listener)