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

VectorModel interface

borland.jbcl.model.VectorModel
   +----borland.jbcl.model.WritableVectorModel

About the VectorModel interface

Properties  Methods  Event Listeners

Implemented by ListControl, VectorDataSetManager, BasicVectorContainer

Contains the methods required for a read-only model object that holds vector data. A vector model holds data in a one-dimensional array like a list. For example, list controls implement the vector model.

The VectorModel interface has a count property that holds the number of data items contained in the model. Use the get() method to locate a data item when you know the index of the data item. Or you can use find() to obtain the index 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 BasicVectorContainer. You can, however, implement the interface directly.

If you are developing a read-and-write component that holds vector data, implement the WritableVectorModel interface instead of VectorModel.

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


VectorModel properties

*Read-only properties **Write-only properties

Properties defined in this interface

VectorModel methods

Methods defined in this interface

VectorModel event listeners


VectorModel properties

count

 public int getCount()
Returns a count of the data items in the model.

VectorModel methods

find(java.lang.Object)

  public int find(java.lang.Object data)
Returns the storage index of the passed data object. The index, which is zero-based, indicates the position of the data object in the model. If the specified data object cannot be found, find() returns -1.

Parameters:

data
The data object to search for in this container.

get(int)

  public Object get(int index)
Returns the data object at the specified index position.

Parameters:

index
The zero-based index of the object to retrieve.

VectorModel 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.VectorModelListener listener)
 public void removeModelListener(borland.jbcl.model.VectorModelListener listener)