borland.jbcl Packages borland.jbcl Class Hierarchy borland.jbcl.control
java.lang.Object +----java.awt.Component +----java.awt.Container +----java.awt.ScrollPane +----borland.jbcl.view.ListView +----borland.jbcl.control.ListControl
Variables Constructors Properties Methods Event Listeners
Implements AccessListener, DataChangeListener, NavigationListener, VectorModel, VectorSubfocusListener, WritableVectorModel, BlackBox, VectorView, MenuContainer, ImageObserver, Serializable, EventListener
The ListControl component maintains a list of objects. It is designed to work as a replacement for awt.List, but has properties that allow it to display items from a DataSet.
You can add and remove items in the list using the addItem() and remove() methods. Use the count property to determine the number of items in the list. If your component requires only a simple list that is stored in the component, set the items property and specify an array of String objects.
ListControl is a composite component that instantiates a default data model (VectorModel) and view manager (VectorViewManager). It also implements the WritableVectorModel interface, and therefore can provide its items to another component that uses a vector data model.
public ListControl()Constructs a ListControl with all properties set to their default values.
public boolean isAutoInsert() public void setAutoInsert(boolean auto)Whether to automatically add an item to the list control when a data item is added to the model.
public String getColumnName() public void setColumnName(java.lang.String newColumnName)The columnName property specifies a column name in the dataSet object to fill the list contents.
public int getCount()Read-only property that returns the number of items in the list.
public DataSet getDataSet() public void setDataSet(borland.jbcl.dataset.DataSet newDataSet)When connecting a ListControl to a data set component, the dataSet property specifies a borland.jbcl.dataset.DataSet object to fill the list contents.
public synchronized String[] getItems() public synchronized void setItems(java.lang.String[] newItems)Specifies the list of items for the ListControl. If your component requires only a simple list that is stored in the component, with no complex functionality or database connectivity, use setItems() to specify an array of String objects for your list.
public void setModel(borland.jbcl.model.VectorModel model)Checks to prevent a recursive model assignment, then calls the same setter in the superclass: jbcl.view.ListView.setModel().
The model property defines the VectorModel that this list is displaying data from. If the current model is an instance of WritableVectorModel, an external user can get access to it using getWriteModel().
public boolean isMultiSelect() public void setMultiSelect(boolean select)Specifies whether the user can select more than one item in the list.
public boolean isNavigateWithDataSet() public void setNavigateWithDataSet(boolean navigate)Specifies whether the ListControl changes focus when the DataSet object specified in its dataSet property navigates. When true, the DataSet object navigates (and all controls bound to it change focus) when the ListControl changes focus. By default, navigateWithCursor is true.
public boolean isVariableSize()
Stores whether the list control data items are stored in a writeable vector model and the model is variable-size. To find the latter, calls jbcl.model.WritableVectorModel.variableSize().
public void addNotify()Creates the ListControl component's peer. Also, if the dataSet property is set, and that cursor's autoOpen property is set to true, opens the cursor.
Overrides: java.awt.ScrollPane.addNotify()
public void setItems(borland.jbcl.dataset.DataSet dataSet, java.lang.String columnName)Sets the contents of a Column in a dataSet to the list's contents (strings).
Parameters:
public void addActionListener(java.awt.event.ActionListener l) public void removeActionListener(java.awt.event.ActionListener l)
public synchronized void addComponentListener(java.awt.event.ComponentListener l) public synchronized void removeComponentListener(java.awt.event.ComponentListener l)
public synchronized void addContainerListener(java.awt.event.ContainerListener l) public void removeContainerListener(java.awt.event.ContainerListener l)
public void addFocusListener(java.awt.event.FocusListener l) public void removeFocusListener(java.awt.event.FocusListener l)
public void addKeyListener(java.awt.event.KeyListener l) public void removeKeyListener(java.awt.event.KeyListener l)
public void addModelListener(borland.jbcl.model.VectorModelListener listener) public void removeModelListener(borland.jbcl.model.VectorModelListener listener)
public void addMouseListener(java.awt.event.MouseListener l) public void removeMouseListener(java.awt.event.MouseListener l)
public void addMouseMotionListener(java.awt.event.MouseMotionListener l) public void removeMouseMotionListener(java.awt.event.MouseMotionListener l)
public void addSelectionListener(borland.jbcl.model.VectorSelectionListener listener) public void removeSelectionListener(borland.jbcl.model.VectorSelectionListener listener)
public void addSubfocusListener(borland.jbcl.model.VectorSubfocusListener listener) public void removeSubfocusListener(borland.jbcl.model.VectorSubfocusListener listener)