jbcl.model Package 

BasicVectorContainer component

java.lang.Object
   +----com.borland.jbcl.model.BasicVectorContainer

About the BasicVectorContainer component

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 constructors

BasicVectorContainer properties

*Read-only properties **Write-only properties

Properties implemented in this class

Properties implemented in java.lang.Object

BasicVectorContainer methods

Methods implemented in this class

Methods implemented in java.lang.Object

BasicVectorContainer event listeners


BasicVectorContainer constructors

BasicVectorContainer()

  public BasicVectorContainer()
Constructs a BasicVectorContainer with default property values. The Array inside the container is empty.

BasicVectorContainer(int)

  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:

size
The number of data items the container can hold.

BasicVectorContainer(int, java.lang.Object)

  public BasicVectorContainer(int size, 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:

size
The number of data items the container can hold.
object
The data type of the array of objects.

BasicVectorContainer(java.lang.Object[])

  public BasicVectorContainer(Object[] newArray)
Constructs a BasicVectorContainer holding the array of objects specified in newArray.

Parameters:

newArray
An array of data items.

BasicVectorContainer properties

count

 public int getCount()
 public void setCount(int count)
Used to obtain and specify the number of items in the list.

Parameters:

count
Specify the number of items in the list.

items

 public Object[] getItems()
 public void setItems(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:

newItems
The data items stored in the container.

variableSize

 public boolean isVariableSize()
 public void setVariableSize(boolean variable)
Determines whether the capacity of the container can be changed. Default setting is true.

Parameters:

variable
Specify true if the capacity of the container can change; otherwise, specify false.

vector

 public Vector getVector()
Returns the Vector object.

BasicVectorContainer methods

begin()

  public Enumeration begin()
Returns an object that uses an Enumeration interface positioned at the first item in the array.

processModelEvent(com.borland.jbcl.model.VectorModelEvent)

  protected void processModelEvent(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.

BasicVectorContainer event listeners

This component is a source for the following event sets.

model

 public void addModelListener(VectorModelListener listener)
 public void removeModelListener(VectorModelListener listener)