[ 
https://issues.apache.org/jira/browse/PIVOT-607?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12914491#action_12914491
 ] 

Chris Bartlett commented on PIVOT-607:
--------------------------------------

Sandro,

In short,  I was just keeping things simple

Allowing    -Dorg.apache.pivot.wtk.debugfocuscolor=#ff0000   would be a trivial 
addition (just rely on Color.decode()) , but  I didn't want to over engineer 
this so kept things simple while still offering a little flexibility.   We 
could allow as many different encodings of color values as you want.

Someone might also want to use a decorator other than ShadeDecorator, or a 
different opacity setting than the default, but we can't  really cater for 
every possibility.
A user would be free to replicate this code inside of their own app and then 
call Component.setFocusDecorator(xxx) if they required more flexibility.


If the supplied color name is not one of the 3 'valid' values, then nothing 
happens (just as would happen if they mis-typed the property name)
Once again it would be trivial to add a warning but unnecessary IMHO.
Users would discover this feature through our documentation, and that would 
specify the valid color names.
If they specify a color but the focused component is not decorated once the app 
starts, then it should be fairly straighforward what has happened.

I am happy to add either or both of the above if they are wanted.


> Creation of an application wide 'focus decorator' which would be applied to 
> the focused Component
> -------------------------------------------------------------------------------------------------
>
>                 Key: PIVOT-607
>                 URL: https://issues.apache.org/jira/browse/PIVOT-607
>             Project: Pivot
>          Issue Type: New Feature
>          Components: wtk
>         Environment: n/a
>            Reporter: Chris Bartlett
>            Assignee: Chris Bartlett
>            Priority: Minor
>             Fix For: 2.0
>
>         Attachments: highlighed-listbutton.jpg, highlighed-listview.jpg
>
>
> Apply a user specified Decorator (such as a ShadeDecorator) to the currently 
> focused component to make it more visible.
> This would be useful when debugging focus traversal issues and possibly from 
> an accessibility perspective.
> By default the Decorator would be 'null' and therefore not added to the 
> focused component.
> It could be set through a static method on org.apache.pivot.wtk.Component 
> (allowing it to be changed at run time), and/or via a system property (like 
> org.apache.pivot.wtk.debugpaint) or startup argument.
> I have already developed this to satisfy my own requirement for the static 
> methods on Component, but can add the other code and submit if deemed useful.

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.

Reply via email to