Focus on image icons are not visible in javaws cache with high contrast mode (original) (raw)

Neil Richards neil.richards at ngmr.net
Thu Sep 15 11:39:00 UTC 2011


On Wed, 2011-09-14 at 14:14 +0800, Sean Chou wrote:

Hi Pavel,

I reported a bug there yesterday, http://bugs.sun.com/bugdatabase/viewbug.do?bugid=7089914 So far, I'm not sure if Windows use ControlTextColor, I'll check it.

For ease of review, I've uploaded Sean's change as a webrev [1].

With the change, I see the following focus-related color settings in the WindowsLookAndFeel:

Button.focus: ControlTextColor Checkbox.focus: ControlTextColor RadioButton.focus: ControlTextColor Slider.focus: ControlDarkShadowColor TabbedPane.focus: ControlTextColor ToggleButton.focus: ControlTextColor

So the change of setting for Button, Checkbox and RadioButton conforms to what is already used for TabbedPane and ToggleButton.

From it's name, it's not entirely obvious to me that 'ControlTextColor' is really the ideal setting to use here, but it's also clear that it's a far better setting to use than the current hard-coded 'black'.

So unless there are any suggestions as to a better value to use in this context, I'll look to commit the change (with your blessing, Pavel).

Regards, Neil

[1] http://cr.openjdk.java.net/~ngmr/7089914/webrev.00

2011/9/9 Pavel Porvatov <pavel.porvatov at oracle.com> Hi Sean, > Hi, > > Thanks for your suggestion, I thought it was simple and > clear to use diff file in mail, I'll try next time. > > About your question, I remember the focus color is different > from the background color of > the control, so that the focus can always be visible. I > think this is guaranteed by theme or > L&F. > > > If there is no big problem, would there be any commiter > like to help take a look at this patch ? > I have a couple questions: 1. Is there bug in http://bugs.sun.com/ for the problem? 2. How did you choose new colors in the patch? Does Windows use ControlTextColor for focus rectangle color? Regards, Pavel

> > 2011/9/5 neugens.limasoftware at gmail.com > <neugens.limasoftware at gmail.com> > Hi! > > The patch looks good to me, although I don't have > the context at hand now to check about the control > text colour, for this reason I think it would be > better to send patch requests with a webrew next > time. > > What I wonder is what happens when one selects a > different colours for the control text in windows > (if this is possible) then this would be reflected > as focus colour, which I don't know if it's what > windows original laf does. > > Btw, It seems to me that this bug could be > reproducible also without caching an app in the > first place. > > Cheers, > Mario > -- > Sent from HTC Desire... > > pgp key: http://subkeys.pgp.net/ PGP Key ID: > 80F240CF > Fingerprint: BA39 9666 94EC 8B73 27FA FC7C 4086 > 63E3 80F2 40CF > > http://www.icedrobot.org > > Proud GNU Classpath developer: > http://www.classpath.org/ > Read About us at: http://planet.classpath.org > OpenJDK: > http://openjdk.java.net/projects/caciocavallo/ > > Please, support open standards: > http://endsoftpatents.org/ > > > > ----- Reply message ----- > Da: "Sean Chou" <zhouyx at linux.vnet.ibm.com> > Data: lun, set 5, 2011 09:03 > Oggetto: Focus on image icons are not > visible in javaws cache with high contrast mode > A: <swing-dev at openjdk.java.net> > > Hi all, > The WindowsLookAndFeel uses hard coded focus > color(black) which makes the > focus > not visible within High Contrast Mode on windows. > > The problem can be reproduced as follows: > 1. Run one javaws application. > 2. Go to "Control panel -->Accessibility options --> > the Display tab" . > 3. Select "Use high Contrast". Click on "Settings" > button and ensure that > "High contrast black(extra language)" in the color > scheme. > 4. Make sure that you have one jnlp imported in java > cache viewer.(The 1st > step did.) > 5. Run the following command to invoke java cache > viewer > >>javaws -viewer > 6. Select "Applications" in show combo box. > 7. Select the any application present in java cache > viewer. > 8. Now, using Tab key to go to icons present in java > cache viewer.(i.e Run > icon, Show icon etc..) > > Observed result: > Focus will not be visible on focused image icons. > Expected result: > Focus should be visible on focused image icons. > > > The solution is Changing the hard coded focus color > to proper loaded color > in WindowsLookAndFeel.java . > The attachment is a patch for it. > > Any comment please ? > > -- > Best Regards, > Sean Chou > > > > > > > > > > > > -- > Best Regards, > Sean Chou > >

-- Best Regards, Sean Chou



More information about the swing-dev mailing list