[REVIEW] ComboBox Control

Daniel Zwolenski zonski at googlemail.com
Thu Dec 15 00:06:44 PST 2011


Looks good from the quick look I've had. 

A couple of questions (if any of these are in the docco just tell me off):

* Any support for look-ahead-auto-completion? Ie when the user types it filters the list of options and/or selects the best match. 

* What happens if the stringconverter fails? I think you said the selected item goes to null? I assume the text stays the same? Any way for us to detect the failure with a property or some such (what about an 'error' CSS pseudo class as well)?

* maybe a tough one: lazy loaded items to select from. Is this do-able on the proposed API. Hardest bit might be showing a 'loading' indicator in the Popup while the items are being loaded, and possibly not 'committing' an edit of free-type text until the list has been loaded?

All advance features really. The core thing looks good I think. 

Oh, wasn't there a proposal for a binding-with-conversion. Just to check that your stringfornatter doesn't overlap with that? Possibly some consistency on that one could be nice if it makes sense. 

Sorry above is a bit jumpy. On my phone, on a train. Mind the gap. 



On 15/12/2011, at 10:51 AM, Jonathan Giles <jonathan.giles at oracle.com> wrote:

> Hi All,
> 
> This is a review request for RT-17956: http://javafx-jira.kenai.com/browse/RT-17956
> 
> The purpose of this feature request is to add a ComboBox control to JavaFX. The two public API classes can be found in the OpenJFX repo in the com.javafx.preview.control package, but I've also attached them to the Jira issue above for easier review. The intention is to move these classes to javafx.scene.control once approval is received.
> 
> We see a variety of implementations of ComboBoxBase in future releases of JavaFX (or created by members of the community). The most commonly required combo box, where a scrollable list appears within a popup, is what we provide in the ComboBox class. It supports both editable and non-editable modes, and provides a 'converter' property (which is a StringConverter) to allow for converting user text input into an Object, and vice versa to allow for an Object to be edited as a String. Richard intends to post separately about expanding the use of this API to other controls such as ChoiceBox.
> 
> All API is documented (although suggested improvements are always welcome), and there are 91 unit tests covering 100% of lines and 91% of branches.
> 
> If you find any problems with the API, or anything else, please let me know whilst there is still time to take action.
> 
> Thanks,
> -- Jonathan


More information about the openjfx-dev mailing list