Details
-
Type:
Bug
-
Status:
Resolved
-
Priority:
Major
-
Resolution: Fixed
-
Affects Version/s: FEST-Swing 1.2a3
-
Fix Version/s: FEST-Swing 1.2a4
-
Component/s: Swing
-
Labels:None
-
Environment:Windows XP professional
-
Number of attachments :
Description
Hi,
I have detected a bug with French keyboard when we use methods like enterText().
Indeed, for example, when we type enterText("1234"), the IHM display "&é"'(".
I have searched in the source code and found the problem.
It is caused by the KeyStrokeMappingProviderPicker class.
It always return the English map and the French map is not yet implemented.
But I have found as well that it was'nt useful to create a French map because when the map is empty, display is good.
(I have just test it on windows XP and not on Linux)
I propose those modifications :
In class KeyStrokeMappingProviderPicker:
if(locale.getDefault().equals(Locale.ENGLISH)){ return new KeyStrokeMappingProvider_en(); }else if(locale.equals(Locale.FRANCE)){ return new KeyStrokeMappingProvider_fr(); }else{ return new KeyStrokeMappingProvider_en(); }
Add a new class KeyStrokeMappingProvider_fr
public class KeyStrokeMappingProvider_fr implements KeyStrokeMappingProvider { /** * Returns the mapping between characters and <code>{@link KeyStroke} </code>s for locale * <code>{@link java.util.Locale#FRENCH FRENCH}</code>. * @return the mapping between characters and <code>KeyStroke</code>s for locale <code>FRENCH</code>. */ public Collection<KeyStrokeMapping> keyStrokeMappings() { List<KeyStrokeMapping> mappings = new ArrayList<KeyStrokeMapping>(0); return mappings; } }
Thanks for your reading.
Cheers
Florian
From Florian:
I have tested my solution on another pc and found that sometime the problem reappears.
I have made the following modifications :