Fwd: Re: API Review request for ColorPicker control : RT-19312
parvathi.somashekar at oracle.com
Fri Apr 27 10:20:19 PDT 2012
forgot to do reply-all..
I have updated the API and the JIRA attachment too. ColorPicker extends
Removed the colorProperty and ColorPicker uses value property to set and
Also removed colorLabelVisible and have added support to style the
button via CSS instead. (-fx-color-label-visible).
One thing I forgot to add in my previous email in response to your
question on whether ColorPicker is editable. ColorPicker is not
editable now - but I think it would be a nice feature to have in a
future release. Would be nice to type in the hexadecimal value of the
color in the textfield to set the color on the ColorPicker.
On 4/26/12 3:06 PM, Richard Bair wrote:
> Good catch, seems like getValue() is what we should use instead of getColor(). Since ComboBoxBase is generic you should be able to do ColorPicker extends ComboBoxBase<Color>?
> On Apr 26, 2012, at 1:12 PM, Paru Somashekar wrote:
>> 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?
>> 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.
>>>> 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.
More information about the openjfx-dev