borland.jbcl Packages  borland.jbcl Class Hierarchy  borland.jbcl.view 

MatrixView interface

borland.jbcl.view.MatrixView

About the MatrixView interface

Properties  Event Listeners

Implemented by GridControl, CompositeGridView, GridView, ScrollPaneGridView

Collects the basic behavior required of all components using a matrix-type model object to access data items. Implementers of MatrixView have the simple properties that exist on all views of a MatrixModel model object.

If you are writing a new matrix-type component, implement MatrixView in the view class to ensure that the component has all expected functionality.

See also: Understanding model-view architecture, Models in the Java Beans Component Library,


MatrixView properties

*Read-only properties **Write-only properties

Properties defined in this interface

MatrixView event listeners


MatrixView properties

model

 public MatrixModel getModel()
 public void setModel(borland.jbcl.model.MatrixModel model)
Specifies the model object providing item access for this matrix-type component. The model provides read/write access to matrix data. Although getModel() always returns a read-only model, setModel() attempts a cast to WritableMatrixModel. If the cast is successful, it sets the writeModel property to the same object.

See also: Matrix model classes

readOnly

 public boolean isReadOnly()
 public void setReadOnly(boolean readOnly)
The readOnly property overrides the existance of a writeable model. When the property is set to true, isReadOnly() always returns true. When set to false, isReadOnly() still returns true if the model is not writeable.

selection

 public WritableMatrixSelection getSelection()
 public void setSelection(borland.jbcl.model.WritableMatrixSelection selection)
Specifies the editable selection object associated with this matrix-type component. The selection object manages the selected items in the view.

See also: Selecting items in composite components

subfocus

 public MatrixLocation getSubfocus()
 public void setSubfocus(borland.jbcl.model.MatrixLocation subfocus)
Specifies the position of the item in the matrix that has subfocus.

See also: Handling subfocus events

viewManager

 public MatrixViewManager getViewManager()
 public void setViewManager(borland.jbcl.model.MatrixViewManager viewManager)
Specifies the view manager object associated with this matrix-type component. The viewManager provides item painters and item editors based on the model object's type.

See also: View manager classes

writeModel

 public WritableMatrixModel getWriteModel()
A read-only property that provides read/write access to the model object, if such is available.

See also: Matrix model classes


MatrixView 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)

selection

 public void addSelectionListener(borland.jbcl.model.MatrixSelectionListener listener)
 public void removeSelectionListener(borland.jbcl.model.MatrixSelectionListener listener)

subfocus

 public void addSubfocusListener(borland.jbcl.model.MatrixSubfocusListener listener)
 public void removeSubfocusListener(borland.jbcl.model.MatrixSubfocusListener listener)