jbcl.control Package
java.lang.Object +----java.awt.Component +----java.awt.Container +----java.awt.Panel +----com.borland.jbcl.control.PickListItemEditor
Variables Constructors Properties Methods Event Listeners
Implements ItemEditor, BlackBox, ItemListener, KeyListener, ImageObserver, MenuContainer, Serializable, EventListener
The PickListItemEditor
is a custom model-view item editor that is specifically designed for use with DataSet
column components. It
is the default ItemEditor
for a column on which a
PickListDescriptor
property has been set (through the UI Designer).
When editing a control that is attached to a Column
with a
PickListDescriptor
, the user is presented with a drop-down list of
values from a single display column of a "picklist" data set from
which to make a selection. When a user makes a selection, the
PickListItemEditor
copies one or more column values from a row of
the "picklist" data set into columns of the data set being edited.
For example, a PickListDescriptor
has been specified for the
Customer_ID column of the Orders data set. It specifies that the "picklist" data
set is the Customer data set, the display column
is the Last_Name field, and that the Customer_ID and Phone_Number
columns from the Customer data set should be copied into the
Customer_ID and Contact_Phone columns of the Orders data set. When
the user edits the control containing the Customer_ID column, a
drop-down list of last names from the Customer data set is presented
in a ChoiceControl
, from which the user can make a selection. If
the user selects a last name, the Customer_ID and Phone_Number
values for that customer are copied into the Customer_ID and
Contact_Phone columns, respectively, of the Orders data set.
The PickListItemEditor
is only able to display values from a single
column of the "picklist" data set. To display values from multiple
columns of a data set, assign the PopupPickListItemEditor
as the itemEditor
for the Column
. The PickListItemEditor
does not make use of the enforceIntegrity
property of the PickListDescriptor
.
If your pick list displays its items from a column of a DataSet
that is subject to frequent change, set the cachePickList
property to false. This ensures that the most recent data is displayed when the PickListItemEditor
is invoked. (This property defaults to true for performance reasons.)
public PickListItemEditor()Creates a
PickListItemEditor
.
public final boolean isCachePickList() public final void setCachePickList(boolean cache)Determines whether or not values from the display ("picklist")
DataSet
are cached. If the column of display items to choose from is subject to frequent change, setting this property to false ensures that the most recent list of choices is displayed when the PickListItemEditor
is invoked. For performance reasons, this property is true by default.
public Component getComponent()Read-only property that returns this instance of a
PickListItemEditor
as a Component
.
public Object getValue()Read-only property that copies the
PickList
columns of the user-selected row to the corresponding destination columns.
protected void loadPickList(PickListDescriptor pickList)This method is called when a user begins editing a control associated with this
PickListItemEditor
It has the side effect of extracting the pickListDescriptor
information into class variables.
public synchronized void addComponentListener(java.awt.event.ComponentListener ) public synchronized void removeComponentListener(java.awt.event.ComponentListener )
public synchronized void addContainerListener(java.awt.event.ContainerListener ) public synchronized void removeContainerListener(java.awt.event.ContainerListener )
public void addFocusListener(FocusListener l) public void removeFocusListener(FocusListener l)
public synchronized void addInputMethodListener(java.awt.event.InputMethodListener ) public synchronized void removeInputMethodListener(java.awt.event.InputMethodListener )
public void addKeyListener(KeyListener l) public void removeKeyListener(KeyListener l)
public synchronized void addMouseListener(java.awt.event.MouseListener ) public synchronized void removeMouseListener(java.awt.event.MouseListener )
public synchronized void addMouseMotionListener(java.awt.event.MouseMotionListener ) public synchronized void removeMouseMotionListener(java.awt.event.MouseMotionListener )
public synchronized void addPropertyChangeListener(java.beans.PropertyChangeListener ) public synchronized void removePropertyChangeListener(java.beans.PropertyChangeListener )
public final void addRowFilterListener(RowFilterListener listener) public final void removeRowFilterListener(RowFilterListener listener)