United StatesChange Country, Oracle Worldwide Web Sites Communities I am a... I want to...
JDK-4287690 : JComboBox should send a drop down event

Details
Type:
Enhancement
Submit Date:
1999-11-03
Status:
Resolved
Updated Date:
2000-10-26
Project Name:
JDK
Resolved Date:
2000-10-26
Component:
client-libs
OS:
generic
Sub-Component:
javax.swing
CPU:
generic
Priority:
P4
Resolution:
Fixed
Affected Versions:
1.2.0,1.2.2
Fixed Versions:
1.4.0 (beta)

Related Reports
Duplicate:
Duplicate:

Sub Tasks

Description

Name: krT82822			Date: 11/03/99


java version "1.2.2"
Classic VM (build JDK-1.2.2-W, native threads, symcjit)

I want JComboBox to send an event just before the popup (drop down) list is
displayed. This would allow me to use an editable JComboBox in the following
way:

  1) The user enters a simple search criteria in the text field, e g "Cis*".

  2) The user presses the drop down button or down key.

  3) The application detects the drop down event, recognizes that the current
     selection is a String (the criteria) and populates the list model
     with entries matching that criteria.

  4) The user selects one of the entries.

  5) The user changes her mind and drops down the list again.

  6) The application detects the drop down event, recognizes that the current
     selection is an XxxEntry, not a String and does not repopulates the list
     model.

  7) The user selects a new entry from the current set.
(Review ID: 97391) 


======================================================================
Name: bk70084			Date: 05/28/98


Is there a way to capture when a user presses
the arrow on a combobox?  If not, could there be? 
I have a bit of processing to do to fill a combo
box and I would like to not load it until if and 
when it is wanted.

I want to capture a press
on the arrow and not just in the combobox itself.  In other words, if a
user drops the box down, I want to make sure that the list is
populated.  However, if the user just wants to type text in that field,
without loading the list first, they should be able to.
(Review ID: 29985)
======================================================================

                                    

Comments
CONVERTED DATA

BugTraq+ Release Management Values

COMMIT TO FIX:
generic

FIXED IN:
merlin-beta

INTEGRATED IN:
merlin-beta


                                     
2004-06-14
WORK AROUND

	

Name: krT82822			Date: 11/03/99


By detecting Item events, most of the above functionality can be achieved, but
the user must press enter or leave the field before dropping down the list, or
no Item event is fired. This is especially annoying when using this combo box
as editor for a JTable column.
======================================================================
                                     
2004-06-11
PUBLIC COMMENTS

Will be implemented for Merlin
                                     
2004-06-10
EVALUATION

This requires some additional API but it has been completed for the next major release of the JDK (1.4).

The PopupMenuEvent will from the JPopupMenu will be forwarded to the JComboBox. A client of the JComboBox can register itself as a PopupMenuListener to recieve the notification.

mark.davidson@Eng 2000-10-25
                                     
2000-10-25



Hardware and Software, Engineered to Work Together