[cp-patches] RFC: Combo box mouseclick

Roman Kennke roman at kennke.org
Tue Jun 13 19:43:38 UTC 2006

Hi Francis,

> After talking to rkennke, here is an alternate implementation to fix the
> same bug, which does not involve removing and re-adding listeners, nor
> consuming the mouseclick event (since this breaks other functionality).

What I meant was something along the line of the attached patch. This
has the advantage that we can also flag other components that shouldn't
close the popup (I'm thinking of the editor of a ComboBox editor for

This also reverts my previous fix for this, which was obviously wrong.

2006-06-13  Roman Kennke  <kennke at aicas.com>

        * java/awt/Component.java
        (dispatchEvent): Handle events even when consumed (this might be
        picked up later in the dispatching chain).
        * javax/swing/plaf/basic/BasicLookAndFeel.java
        (PopupHelper.mousePressed): Don't consume event. Only close
        when target component isn't flagged as DONT_CANCEL_POPUP.
        (DONT_CANCEL_POPUP): New package private constant for flagging
        special components that don't trigger popup closing.
        * javax/swing/plaf/basic/BasicArrowButton.java
        (BasicArrowButton): Set client property for not triggering
        of popups.


-------------- next part --------------
A non-text attachment was scrubbed...
Name: patch.diff
Type: text/x-patch
Size: 2402 bytes
Desc: not available
Url : http://developer.classpath.org/pipermail/classpath-patches/attachments/20060613/cc36b666/patch.bin

More information about the Classpath-patches mailing list