API Review request for ColorPicker control : RT-19312

Paru Somashekar parvathi.somashekar at oracle.com
Thu Apr 26 13:12:14 PDT 2012


Hi Rich,

contentDisplay API is a nicer approach if we were to consider the 
ColorPicker a labeled-like control ( which is what it is today). But I 
think I it is better to remove colorLabelVisible property from public 
API, and instead expose it only via CSS as you have suggested in option 
(a). That way we can easily add support for a cell based approach in the 
future releases without worrying about the colorLabelVisible API while 
still being able to use it for default color picker cell.

I am tempted to try out supporting cell based approach for 2.2 - so I 
shall give that a shot.

One thing I wanted to point out is that ComboBoxBase has value property 
to indicate the selected “value” which is Color in the ColorPicker case. 
It seems like color property is then duplicating it. Hence even though 
get / set color is a better API - I think we should remove that and use 
the get /set value for the same. What do you think of that?

thanks,
Paru.

On 4/26/12 8:05 AM, Richard Bair wrote:
> Looks OK. I'm slightly bothered by the colorLabelVisible property and wondering if either (a) we should specify this via CSS instead or (b) we should add contentDisplay. With ContentDisplay you can not only choose TEXT_ONLY or GRAPHIC_ONLY (graphic in this case being the color swatch you show), but also specify how they are positioned relative to each other.
>
> I'm not sure I prefer the contentDisplay solution just because in the future I could imagine wanting to add a ColorPickerCell or something for completely customizing the editor area.
>
> Speaking of which, is the color picker editable? Do we need to expose the editor like we are thinking about for ComboBox?
>
> On Apr 25, 2012, at 5:23 PM, Paru Somashekar<parvathi.somashekar at oracle.com>  wrote:
>
>> A revised API for ColorPicker is attached to the JIRA now.
>>
>> thanks,
>> Paru.
>>
>> On 4/24/12 5:05 PM, Paru Somashekar wrote:
>>> The ColorPicker control allows the user to select a color from either a standard palette of colors with a simple one click selection OR define their own custom color.
>>>
>>> JIRA : http://javafx-jira.kenai.com/browse/RT-19312
>>>
>>> The proposed API for the ColorPicker control is attached to the JIRA above for review.
>>>
>>> thanks,
>>> Paru.



More information about the openjfx-dev mailing list