borland.jbcl Packages borland.jbcl Class Hierarchy borland.jbcl.model
borland.jbcl.model.VectorModel +----borland.jbcl.model.WritableVectorModel
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
public int getCount()Returns a count of the data items in the model.
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:
public Object get(int index)Returns the data object at the specified index position.
Parameters:
public void addModelListener(borland.jbcl.model.VectorModelListener listener) public void removeModelListener(borland.jbcl.model.VectorModelListener listener)