#85 Chinese Swing GUI adaption

open
nobody
5
2007-12-16
2007-12-16
Chen Zhiyuan
No

Hello,

I like this tool very much, it is really a great tool. So I have translated latest version into Simplified Chinese and found something to improve:

1. the GUI in Windows are very poor due to Java Swing default font settings, so I make a change on 1 files:
FreeMind.java
static void setUIFont() {
System.out.println("setting Chinese Font...");
final Font myFont = new Font("宋体", 9, 12);
final javax.swing.plaf.FontUIResource fontRes = new javax.swing.plaf.FontUIResource(
myFont);
final java.util.Enumeration keys = UIManager.getDefaults().keys();
while (keys.hasMoreElements()) {
final Object key = keys.nextElement();
final Object value = UIManager.get(key);
if (value instanceof javax.swing.plaf.FontUIResource) {
UIManager.put(key, fontRes);
}
}
}
and call this function on each of the thread:
1) EventQueue.invokeLater(new Runnable(){
public void run() {
setUIFont();
2) public static void main(final String[] args) {
setUIFont();
final FreeMind frame = new FreeMind();

the GUI then looks much better!

2. the Swing IME input window is annoying for Chinese input. to avoid this, we need to add commnadline parameter of java: -Djava.awt.im.style=on-the-spot. thus I changed windows-launcher freemind.c to add this parameters. It works also fine.

3. the new Resources_zh_CN.properties updated with 0.9.0 beta 15

Discussion

  • Chen Zhiyuan
    Chen Zhiyuan
    2007-12-16

    Chinse adaptation and zh_CN translation

     
    Attachments
  • netsking
    netsking
    2007-12-16

    Logged In: YES
    user_id=1918517
    Originator: NO

    I will try it out.