-
Enhancement
-
Resolution: Unresolved
-
P4
-
None
-
5.0
-
x86
-
windows_xp
A DESCRIPTION OF THE REQUEST :
When you internationalize a portion of Swing UI you tend to set more than one property on each component. It would be much better if this could be automated and integrated with ResourceBundles.
What I propose is to the the "Name" property that each swing component has to use as a key to look up required values in a provided resource bundle.
For example I would create a JButton:
JButton myButton = new JButton();
myButton.setName("Ok");
and I would have the following entries in my resource bundle:
Ok.text = OK
Ok.mnemonic = O
Ok.tooltip = Press okay to do something
Ok.icon = .../images/ok.png
I provide here details of implementation of this system using jython although I have at various times implemented this sytem in Java. The Java versions are under copyright so I can't reproduce them here.
http://www.orablogs.com/gdavison/archives/000164.html
JUSTIFICATION :
Internationalizing Swing UI can be needlessly complex and not tool friendly. This ResourcePicker system can help automate this process and make it IDE friendly.
As a side benefit setting the "name" property makes it easier to automate testing of UI elements. It is quite easy to modify the resource picker code in order to build up a table of UI elements.
When you internationalize a portion of Swing UI you tend to set more than one property on each component. It would be much better if this could be automated and integrated with ResourceBundles.
What I propose is to the the "Name" property that each swing component has to use as a key to look up required values in a provided resource bundle.
For example I would create a JButton:
JButton myButton = new JButton();
myButton.setName("Ok");
and I would have the following entries in my resource bundle:
Ok.text = OK
Ok.mnemonic = O
Ok.tooltip = Press okay to do something
Ok.icon = .../images/ok.png
I provide here details of implementation of this system using jython although I have at various times implemented this sytem in Java. The Java versions are under copyright so I can't reproduce them here.
http://www.orablogs.com/gdavison/archives/000164.html
JUSTIFICATION :
Internationalizing Swing UI can be needlessly complex and not tool friendly. This ResourcePicker system can help automate this process and make it IDE friendly.
As a side benefit setting the "name" property makes it easier to automate testing of UI elements. It is quite easy to modify the resource picker code in order to build up a table of UI elements.