>Excuse me but i hadn't shown the validation stuff at the moment, so a question:
>this Validation framework is able to fire events so that someone like
>an (application) listener can ask the skin to change the color or
>other attribute ?
>And is it possible to activate this for example at a key press event ?

The current intention is to leave the definition of the invalid state to the 
skin. We could potentially make this styleable (e.g. define a showInvalidState 
flag on TextInputSkin) in which case your application code could listen for 
validChanged() events and handle the valid state accordingly.

>And last, on the change of the color:
>should i ask to the skin something like an HILIGHT color or WARNING,
>ERROR, etc ?

Looks like Noel added an "invalidTextBackgroundColor" style to TextInputSkin, 
though it sounds like this may change to an overlay icon. Alternatively, both 
could be supported - for when you really want to get your user's attention!  ;-)

>This is on Themes (in general, not only the Terra skin):
>is it possible to ask the theme for example to have a variant of the
>given color, like return a color that is lighter/darker by x% of the
>dark color ? Or have a different % of hue or saturation but keeping
>the same saturation or value ?

TerraTheme defines brighten() and darken() method for this purpose. Since this 
concept does not necessarily apply to all themes, it doesn't make sense to 
define them in Theme itself. We could potentially put them in a utility class 
somewhere (ideally, Sun would have done this for us in java.awt.Color, but they 
didn't).

>And last, given two colors, tell me the contrast between them, for
>accessibility this is important, but useful mainly in theme creation
>phase.

I don't think we have a method for this yet, but Todd can confirm.


Reply via email to