borland Packages  Class Hierarchy  jbcl.control Package  Index 

PopupPickListItemEditor component

java.lang.Object
   +----borland.jbcl.control.PopupPickListItemEditor

About the PopupPickListItemEditor component

Constructors  Properties  Methods  Event Listeners

Implements ItemEditor, Serializable

The PopupPickListItemEditor is a custom JBCL model-view ItemEditor that is specifically designed for use with DataSet Column components.

When this class is assigned as the ItemEditor for a Column that has a PickListDescriptor bound to a data-aware JBCL control (for example, a FieldControl), the PopupPickListItemEditor presents the user with a multi-column table (GridControl) of values stored in a DataSet from which to make a selection. When a selection is made, PopupPickListItemEditor copies one or more column values from a row of the "picklist" DataSet into columns of the DataSet to which the PopupPickListItemEditor is attached.

For example, a PickListDescriptor is 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 columns are the Last_Name and Social_Security_Number 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 table of last names and social security numbers from the Customer data set is presented in a GridControl, from which the user makes a selection. If the user selects a row, the Customer_ID and Phone_Number values for that customer is copied into the Customer_ID and Contact_Phone columns, respectively, of the Orders data set.

Users can select the currently highlighted row from the picklist dialog by either double-clicking the row, or pressing Enter. To cancel the edit without making a selection, click the close icon of the dialog box or press the Esc key.

The PopupPickListItemEditor is available from the JBCL tab of the Component Palette. When working with this component in the JBuilder UI Designer, a PickListDescriptor is automatically created that specifies the columns of a DataSet to display, as well as the names of source and target columns for copying. Note that the columns displayed can be different in name and number from the columns transferred between data sets.


PopupPickListItemEditor constructors

PopupPickListItemEditor properties

*Read-only properties **Write-only properties

Properties implemented in this class

Properties implemented in java.lang.Object

PopupPickListItemEditor methods

Methods implemented in this class

Methods implemented in java.lang.Object

PopupPickListItemEditor event listeners


PopupPickListItemEditor constructors

PopupPickListItemEditor()

  public PopupPickListItemEditor()
Constructs a PopupPickListItemEditor object.

PopupPickListItemEditor properties

allowSearch

 public final boolean isAllowSearch()
 public final void setAllowSearch(boolean allowSearch)
Specifies whether or not an incremental search control should be provided at the top of the window.

alwaysCenter

 public final boolean isAlwaysCenter()
 public final void setAlwaysCenter(boolean alwaysCenter)
Specifies whether or not the picklist window should always be centered when displayed, or the most recent size and position should be maintained.

component

 public Component getComponent()
This method is implemented from an interface but not applicable to this component and therefore, it simply returns null.

displayOKCancel

 public final boolean isDisplayOKCancel()
 public final void setDisplayOKCancel(boolean displayOKCancel)
Specifies whether or not an OK/Cancel button bar should appear at the bottom of the popup window. This property defaults to false.

title

 public final String getTitle()
 public final void setTitle(java.lang.String windowTitle)
Specifies an optional string to display in the title area of the window. By default, no title is displayed. To clear the title after setting one, pass an empty string to the setTitle() method.

value

 public Object getValue()
This method returns the value in the current column if the current column is one of the picklist target columns. Otherwise, this method returns the original value.

PopupPickListItemEditor methods

loadPickList(borland.jbcl.dataset.PickListDescriptor, java.awt.Component)

  protected void loadPickList(borland.jbcl.dataset.PickListDescriptor pickList, java.awt.Component component)
Protected method that constructs a DataSetView containing only those columns specified in the pickListDisplayColumns property of the PickListDescriptor then creates a modal dialog box with a GridControl displaying with these columns.

PopupPickListItemEditor event listeners

This component is a source for the following event sets. For information on the standard AWT event sets, see Standard Java events. For information on the JBCL event sets, see Events in JBCL.

key

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

rowFilter

 public final void addRowFilterListener(borland.jbcl.dataset.RowFilterListener listener)
 public final void removeRowFilterListener(borland.jbcl.dataset.RowFilterListener listener)