[jsword-svn] r1952 - trunk/bibledesktop/src/main/java/org/crosswire/bibledesktop/display/basic

dmsmith at crosswire.org dmsmith at crosswire.org
Sat Oct 24 14:42:16 MST 2009


Author: dmsmith
Date: 2009-10-24 14:42:16 -0700 (Sat, 24 Oct 2009)
New Revision: 1952

Modified:
   trunk/bibledesktop/src/main/java/org/crosswire/bibledesktop/display/basic/TextPaneBookDataDisplay.java
Log:
BD-148 fixed word wrapping problem for Thai.

Modified: trunk/bibledesktop/src/main/java/org/crosswire/bibledesktop/display/basic/TextPaneBookDataDisplay.java
===================================================================
--- trunk/bibledesktop/src/main/java/org/crosswire/bibledesktop/display/basic/TextPaneBookDataDisplay.java	2009-10-24 20:43:07 UTC (rev 1951)
+++ trunk/bibledesktop/src/main/java/org/crosswire/bibledesktop/display/basic/TextPaneBookDataDisplay.java	2009-10-24 21:42:16 UTC (rev 1952)
@@ -29,6 +29,7 @@
 import java.net.URI;
 import java.text.MessageFormat;
 import java.util.Arrays;
+import java.util.Locale;
 
 import javax.swing.JTextPane;
 import javax.swing.event.EventListenerList;
@@ -147,8 +148,13 @@
             return;
         }
 
+        // The content of the module determines how the display
+        // should behave. It should not be the user's locale.
+        // Set the correct direction
         boolean direction = bmd.isLeftToRight();
         GuiUtil.applyOrientation(txtView, direction);
+        // Set the correct locale
+        txtView.setLocale(new Locale(bmd.getLanguage().getCode()));
 
         String fontSpec = GuiConvert.font2String(BookFont.instance().getFont(getFirstBook()));
         try




More information about the jsword-svn mailing list