[prev in list] [next in list] [prev in thread] [next in thread] 

List:       openjdk-openjfx-dev
Subject:    API Review request for ColorPicker control : RT-19312
From:       richard.bair () oracle ! com (Richard Bair)
Date:       2012-04-30 20:08:14
Message-ID: 0BB1FD17-8C4C-4A34-91C2-C0B089A17614 () oracle ! com
[Download RAW message or body]

Hi Paru, although there are additional API I'd like to see (such as being able to \
specify all colors, not just custom ones), the API looks good and we can add the \
other pieces in the future.

+1

Richard

On Apr 27, 2012, at 10:20 AM, Paru Somashekar wrote:

> forgot to do reply-all..
> 
> Hi Rich,
> 
> I have updated the API and the JIRA attachment too. ColorPicker extends
> ComboBoxBase<Color>.
> Removed the colorProperty and ColorPicker uses value property to set and
> get Color.
> 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.
> 
> thanks,
> Paru.
> 
> 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>? 
> > Richard
> > 
> > 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? 
> > > 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.
> 
> 


[prev in list] [next in list] [prev in thread] [next in thread] 

Configure | About | News | Add a list | Sponsored by KoreLogic