Add getEditor() method to ComboBox
Tom Schindl
tom.schindl at bestsolution.at
Wed Mar 14 02:55:09 PDT 2012
Agreed - that you use a TextField internally to represent the text-info
is an implementation detail of the Control and should not be leaked
outside the control.
Tom
Am 14.03.12 10:45, schrieb Tom Eugelink:
>
> Exposing a text property which is then internally linked to a TextField
> seems ok, directly exposing the TextField not. It circumvents IMHO the
> composition concept of the skin. Extending that, yes, exposing
> additional API would feel better.
>
> Repeating myself: I'm curious how much of the underlying skin we will be
> exposing in controls in the future.
>
> Tom
>
>
> On 14-3-2012 10:27, Jonathan Giles wrote:
>> To clarify to the two Tom's, the ComboBox control is a specialisation
>> of the ComboBoxBase control. The ComboBox control is the
>> ListView-based specialisation.
>>
>> If the gut feeling for this approach is not good, would you feel more
>> comfortable in the future exposing more TextField-esque API for
>> setting formatting options, etc (as we have already done for
>> promptText and text properties)?
>>
>> -- Jonathan
>>
>>
>> On 14/03/2012 9:48 p.m., Tom Eugelink wrote:
>>>
>>> Gut feeling... Exposing the skin like this does not sit well. Do we
>>> always use a TextField as the editor in every possible skin? Probably.
>>> But I have no hard arguments against it.
>>>
>>> Tom
>>>
>>>
>>>
>>>
>>> On 2012-03-14 08:53, Jonathan Giles wrote:
>>>> After reading Toms email, perhaps I misinterpreted Tadashi's
>>>> suggestion. I interpreted as suggesting an additional API as well as
>>>> the text property. Perhaps instead the suggestion was to add the
>>>> editor property in its place?
>>>>
>>>> Certainly this approach is nicer in the sense that it is one less
>>>> property API (so three less methods on ComboBox), but it also
>>>> impacts the discoverability of the text property.
>>>>
>>>> Opinions? Gut feelings? For me the editor property may be enough,
>>>> without the need for having a text property.
>>>>
>>>> -- Jonathan
>>>>
>>>>
>>>> On 14/03/2012 8:44 p.m., Tadashi Ohmura wrote:
>>>>> What about to add getEditor() method to ComboBox and also to
>>>>> JFXtras' spinner
>>>>>
>>>>> If we want to set any input filter for a combobox
>>>>> we get a text input control and set change listener onto text
>>>>> property of the text input control
>>>>>
>>>>> public TextInputControl getEditor()
>>>>> get a text input control if the combobox is editable
>>>>>
>>>>>
>>>>> Best regards
>>>>> Tadashi Ohmura
>>>>>
>>>>> (2012/03/14 15:19), Jonathan Giles wrote:
>>>>>> Yes, the text value would be set on every keystroke - it would be
>>>>>> bound to the text property on TextField, which works in precisely
>>>>>> this manner.
>>>>>>
>>>>>> Also, you're correct, the text property would only be useful in
>>>>>> edit mode. In non-edit mode the property will never change.
>>>>>>
>>>>>> -- Jonathan
>>>>>>
>>>>>>
>>>>>> On 14/03/2012 7:17 p.m., Tom Eugelink wrote:
>>>>>>>
>>>>>>> So this is a feature for edit mode only. When would the property
>>>>>>> be set? On every keystroke?
>>>>>>>
>>>>>>> Tom
>>>>>>>
>>>>>>>
>>>>>>> On 2012-03-14 01:53, Jonathan Giles wrote:
>>>>>>>> Hi all (yet again),
>>>>>>>>
>>>>>>>> A quick one this time: http://javafx-jira.kenai.com/browse/RT-19589
>>>>>>>>
>>>>>>>> I'm wanting to add a text property to ComboBox, to allow for
>>>>>>>> people to easily set the text in the ComboBox without committing
>>>>>>>> it to being a value. More importantly, this also allows for
>>>>>>>> developers to extract the content of the ComboBox TextField
>>>>>>>> without having to have end-users press the Enter key to commit
>>>>>>>> the text into the value property.
>>>>>>>>
>>>>>>>> Without this end users who want to support Enter-less committing
>>>>>>>> of content have to reach into the ComboBox skin, which is not
>>>>>>>> particularly pleasant.
>>>>>>>>
>>>>>>>> Any thoughts?
>>>>>>>>
>>>>>>>
>>>>>>>
>>>>>>
>>>>>>
>>>>>
>>>>
>>>
>>>
>>
>
>
--
B e s t S o l u t i o n . a t EDV Systemhaus GmbH
------------------------------------------------------------------------
tom schindl geschäftsführer/CEO
------------------------------------------------------------------------
eduard-bodem-gasse 5-7/1 A-6020 innsbruck fax ++43 512 935833
http://www.BestSolution.at phone ++43 512 935834
More information about the openjfx-dev
mailing list