[ 
https://issues.apache.org/jira/browse/PIVOT-607?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
 ]

Chris Bartlett resolved PIVOT-607.
----------------------------------

    Resolution: Fixed

ApplicationContext now checks for a 'org.apache.pivot.wtk.debugfocuscolor'  
system property specifying one of 3 colors by name for use with a 
ShadeDecorator.
Color names are case insensitive.

-Dorg.apache.pivot.wtk.debugfocuscolor=red
-Dorg.apache.pivot.wtk.debugfocuscolor=green
-Dorg.apache.pivot.wtk.debugfocuscolor=blue

Setting a focus decorator as follows will add/remove a focus listener which 
will in turn apply the decorator when focus changes
Component.setFocusDecorator(new ShadeDecorator(0.2f, focusColor));
Component.setFocusDecorator(new BorderDecorator());
Component.setFocusDecorator(null);  // Disable



> 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