borland Packages  Class Hierarchy  dbswing Package 

JdbList component

java.lang.Object
   +----java.awt.Component
           +----java.awt.Container
                   +----javax.swing.JComponent
                           +----javax.swing.JList
                                   +----com.borland.dbswing.JdbList

About the JdbList component

Variables  Constructors  Properties  Methods  Event Listeners

Implements DBDataBinder, AccessListener, ColumnAware, DataChangeListener, DataSetAware, NavigationListener, ImageObserver, MenuContainer, PropertyChangeListener, Serializable, EventListener, Accessible, ListSelectionListener, Scrollable

Note: This is a feature of JBuilder Professional and Enterprise.

The JdbList is a data-aware extension to the JList component. JdbList displays a list of choices from which a user may choose a single value. The selected value is written to a column of a DataSet and retrieved using the standard Swing ListSelectionModel methods. When JdbList is bound to a DataSet and DataSet Column, the currently selected choice always reflects the value of the corresponding column in the current DataSet row.

There are several ways to fill the list presented by JdbList:

You should avoid setting both the column's picklist property and JdbList's items property on the same list. If both properties are set in the UI Designer, the picklist setting takes precedence at runtime. When the list is displayed, however, the most recently set property setting always takes precedence.

Note that because a list can display one column only at a time, if more than one column is specified as a display column in the picklist definition, only the first display column is displayed by JdbList. For more information about picklists, refer to the DataExpress documentation and the PickListDescriptor class.

Ordinarily, the selection in a data-aware JdbList is the current value of the column it is bound to. If this value is not in its list, a JdbList has no selected value by default, but you can modify this behavior by changing the value of the unknownDataValueMode property.

See also: JdbNavList


JdbList variables

Variables implemented in java.awt.Component

Variables implemented in javax.swing.JComponent

JdbList constructors

JdbList properties

*Read-only properties **Write-only properties

Properties implemented in this class

Properties implemented in java.awt.Component

Properties implemented in java.awt.Container

Properties implemented in java.lang.Object

Properties implemented in javax.swing.JComponent

Properties implemented in javax.swing.JList

JdbList methods

Methods implemented in this class

Methods implemented in java.awt.Component

Methods implemented in java.awt.Container

Methods implemented in java.lang.Object

Methods implemented in javax.swing.JComponent

Methods implemented in javax.swing.JList

JdbList event listeners


JdbList constructors

JdbList()

  public JdbList()
Constructs a JdbList component by calling the constructor of its superclass.

JdbList(java.lang.Object[])

  public JdbList(Object[] listData)
Constructs a JdbList component by calling the constructor of its superclass that takes an array of Objects as a parameter.

Parameters:

listData
An array of Objects that makes up the list displayed in the JdbList.

JdbList(java.util.Vector)

  public JdbList(Vector listData)
Constructs a JdbList component by calling the constructor of its superclass that takes a Vector as a parameter.

Parameters:

listData
A Vector that makes up the list displayed in the JdbList.

JdbList(javax.swing.ListModel)

  public JdbList(ListModel dataModel)
Constructs a JdbList component by calling the constructor of its superclass and passing to it a ListModel.

Parameters:

dataModel
The ListModel that contains the data in the list displayed by JdbList.

JdbList properties

columnName

 public String getColumnName()
 public void setColumnName(String columnName)
Returns and sets the name of a Column in the DataSet from which the current list selection is read and to which the current list selection is written. Setting this property replaces the current ListModel from which the list is built.

dataSet

 public DataSet getDataSet()
 public void setDataSet(DataSet dataSet)
Returns and sets a DataSet from which the current list selection is read and to which the current list selection is written.

items

 public synchronized String[] getItems()
 public synchronized void setItems(String[] items)
 public synchronized void setItems(Object[] items)
Returns and sets the list of items to select from. Setting this property replaces the existing model from which the list is built.

preferredSize

 public Dimension getPreferredSize()
Returns the preferred size of the JdbList.

unknownDataValueMode

 public int getUnknownDataValueMode()
 public void setUnknownDataValueMode(int mode)
Returns and sets the policy for synchronizing a list selection with its DataSet value when the value can't be found in the list. The possible values are these:

The default value is DEFAULT.


JdbList methods

commonInit()

  protected void commonInit()
Used to initialize JdbList with the same defaults, regardless of the constructor used. A newly instantiated JdbList differs from a JList in that it always has SINGLE_SELECTION mode as its selectionMode.

JdbList event listeners

This component is a source for the following event sets.

ancestor

 public void addAncestorListener(javax.swing.event.AncestorListener )
 public void removeAncestorListener(javax.swing.event.AncestorListener )

component

 public synchronized void addComponentListener(java.awt.event.ComponentListener )
 public synchronized void removeComponentListener(java.awt.event.ComponentListener )

container

 public synchronized void addContainerListener(java.awt.event.ContainerListener )
 public synchronized void removeContainerListener(java.awt.event.ContainerListener )

focus

 public synchronized void addFocusListener(java.awt.event.FocusListener )
 public synchronized void removeFocusListener(java.awt.event.FocusListener )

inputMethod

 public synchronized void addInputMethodListener(java.awt.event.InputMethodListener )
 public synchronized void removeInputMethodListener(java.awt.event.InputMethodListener )

key

 public synchronized void addKeyListener(java.awt.event.KeyListener )
 public synchronized void removeKeyListener(java.awt.event.KeyListener )

listSelection

 public void addListSelectionListener(javax.swing.event.ListSelectionListener )
 public void removeListSelectionListener(javax.swing.event.ListSelectionListener )

mouse

 public synchronized void addMouseListener(java.awt.event.MouseListener )
 public synchronized void removeMouseListener(java.awt.event.MouseListener )

mouseMotion

 public synchronized void addMouseMotionListener(java.awt.event.MouseMotionListener )
 public synchronized void removeMouseMotionListener(java.awt.event.MouseMotionListener )

propertyChange

 public synchronized void addPropertyChangeListener(java.beans.PropertyChangeListener )
 public synchronized void removePropertyChangeListener(java.beans.PropertyChangeListener )

vetoableChange

 public synchronized void addVetoableChangeListener(java.beans.VetoableChangeListener )
 public synchronized void removeVetoableChangeListener(java.beans.VetoableChangeListener )