borland Packages Class Hierarchy jbcl.model Package Index
borland.jbcl.model.VectorModel +----borland.jbcl.model.WritableVectorModel
Properties Methods Event Listeners
Implemented by VectorDataSetManager, BasicVectorContainer
Provides the methods required for a read-write vector model object; that is, a model that holds data in a one-dimensional array such as a list. WritableVectorModel extends the VectorModel interface and adds the methods needed to add, change, and delete items in the list.
Generally, you extend a class that implements this interface, such as BasicVectorContainer. 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 VectorModel interface instead.
The setting of variableSize determines whether data items can be added or deleted from the vector. To add an item, call one of the addItem() methods. To remove items, call remove() or removeAll(). Set the data object at a specified position in the vector with the set() method. The touched() method notifies all listeners that a data item has been manipulated.
public boolean isVariableSize()Determines whether the vector size can vary, and therefore, whether data items can be added or removed. If variableSize is true, data items can be added and deleted; if it is false, the size of the vector cannot vary and data items can't be added or removed.
public void addItem(int aheadOf, java.lang.Object data)Adds a new data object to the vector. The data object is added above the specified location.
Parameters:
public void addItem(java.lang.Object data)Appends a new data object at the end of the vector.
Parameters:
public boolean canSet(int index, boolean startEditing)Determines whether the data object at the specified location in the vector can be modified. If canSet is true, the data object can be modified.
Parameters:
public void enableModelEvents(boolean enable)Determines whether the broadcasting of vector-model events is enabled or disabled.
Parameters:
public void remove(int index)Removes a data object from the vector at the specified location.
Parameters:
public void removeAll()Removes all data objects from vector.
public void set(int index, java.lang.Object data)Sets the data object at the specified location.
Parameters:
public void touched(int index)Notifies all vector-model listeners that the data object at the specified location was manipulated.
Parameters:
public void addModelListener(borland.jbcl.model.VectorModelListener listener) public void removeModelListener(borland.jbcl.model.VectorModelListener listener)