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
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.
See also: Models in the Java Beans Component Library, Vector model classes and interfaces
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)