borland Packages Class Hierarchy jbcl.model Package Index
java.lang.Object +----borland.jbcl.model.BasicVectorContainer
Constructors Properties Methods Event Listeners
Implements VectorModel, WritableVectorModel, Serializable
This container provides read-write access to data items stored in a single-dimension array, such as that used by a list. Use this container object in composing new model-view components that need a simple read-write model. BasicVectorContainer uses a jgl.Array to store the data items.
public BasicVectorContainer()Constructs a BasicVectorContainer with default property values. The Array inside the container is empty.
public BasicVectorContainer(com.objectspace.jgl.Array newArray)Constructs a BasicVectorContainer holding a copy of the existing Array passed as the newArray argument.
Parameters:
public BasicVectorContainer(int size)Constructs a BasicVectorContainer with a capacity specified by the size argument. The array is empty; data items must be added before the container component can be used.
Parameters:
public BasicVectorContainer(int size, java.lang.Object object)Constructs a BasicVectorContainer of a capacity specified by the size argument. Creates the internal Array as an array of objects of the same type as passed in the object argument.
Parameters:
public BasicVectorContainer(java.lang.Object[] newArray)Constructs a BasicVectorContainer holding the array of objects specified in newArray.
Parameters:
public Array getArray()Read-only property that specifies the jgl.Array object in the container that actually stores the data items.
public int getCount() public void setCount(int count)Used to obtain and specify the number of items in the list.
Parameters:
public Object[] getItems() public void setItems(java.lang.Object[] newItems)Returns and specifies the data items stored in the container. If you need a simple list, with no complex functionality or database connectvity, use setItems() to store items directly into the container's array. Calling setItems() generates a modelStructureChanged event.
Parameters:
public boolean isVariableSize() public void setVariableSize(boolean variable)Determines whether the capacity of the container can be changed. Default setting is true.
Parameters:
public ArrayIterator begin()Returns an ArrayIterator positioned at the first item in the array.
public ArrayIterator end()Returns an ArrayIterator positioned at the last item in the array.
protected void processModelEvent(borland.jbcl.model.VectorModelEvent e)This method is called when a model event occurs in the container component. It sends a copy of the event object to registered listeners for these events.
public void addModelListener(borland.jbcl.model.VectorModelListener listener) public void removeModelListener(borland.jbcl.model.VectorModelListener listener)