[Schmitzm-commits] r884 - in trunk/src/schmitzm/swing: . resource/locales

scm-commit@wald.intevation.org scm-commit at wald.intevation.org
Thu Jun 3 11:19:09 CEST 2010


Author: mojays
Date: 2010-06-03 11:19:08 +0200 (Thu, 03 Jun 2010)
New Revision: 884

Modified:
   trunk/src/schmitzm/swing/ResourceProviderManagerFrame.java
   trunk/src/schmitzm/swing/resource/locales/SwingResourceBundle.properties
   trunk/src/schmitzm/swing/resource/locales/SwingResourceBundle_de.properties
Log:
Changed JTextPane to JLabel for info text in ResourceProviderManagerFrame to support HTML.
Changed button "Cancel" to "Close" in ResourceProviderManagerFrame.

Modified: trunk/src/schmitzm/swing/ResourceProviderManagerFrame.java
===================================================================
--- trunk/src/schmitzm/swing/ResourceProviderManagerFrame.java	2010-06-03 09:00:24 UTC (rev 883)
+++ trunk/src/schmitzm/swing/ResourceProviderManagerFrame.java	2010-06-03 09:19:08 UTC (rev 884)
@@ -25,8 +25,10 @@
 import java.util.Set;
 import java.util.TreeSet;
 
+import javax.swing.BorderFactory;
 import javax.swing.JButton;
 import javax.swing.JDialog;
+import javax.swing.JLabel;
 import javax.swing.JOptionPane;
 import javax.swing.JScrollPane;
 import javax.swing.JTable;
@@ -51,7 +53,7 @@
  * @version 1.0
  */
 public class ResourceProviderManagerFrame extends JDialog implements ActionListener {
-  private JTextPane infoText      = null;
+  private JLabel    infoText      = null; // use JLabel to interpret HTML
   private JButton   cancelButton  = null;
   private JButton   newLangButton = null;
   private JTable    bundleTable   = null;
@@ -110,15 +112,18 @@
     this.getContentPane().setLayout(new BorderLayout());
     
     if (infoMess != null) {
-      infoText = new JTextPane();
+      infoText = new JLabel(); // use JLabel to interpret HTML
+      if ( !infoMess.toLowerCase().startsWith("<html>") )
+        infoMess = "<html>"+infoMess+"<html>";
       infoText.setText( infoMess );
+      infoText.setBorder( BorderFactory.createEmptyBorder(5, 5, 5, 5) );
       infoText.setBackground( this.getContentPane().getBackground() );
     } else
       infoText = null;
     
     bundleTable = new JTable( new BundleTableModel() );
 
-    cancelButton = new JButton(SwingUtil.R("Cancel"));
+    cancelButton = new JButton(SwingUtil.R("Close"));
     cancelButton.addActionListener(this);
     newLangButton = new JButton(getResource("NewLang"));
     newLangButton.addActionListener(this);

Modified: trunk/src/schmitzm/swing/resource/locales/SwingResourceBundle.properties
===================================================================
--- trunk/src/schmitzm/swing/resource/locales/SwingResourceBundle.properties	2010-06-03 09:00:24 UTC (rev 883)
+++ trunk/src/schmitzm/swing/resource/locales/SwingResourceBundle.properties	2010-06-03 09:19:08 UTC (rev 884)
@@ -211,12 +211,12 @@
 CQLFitlerParser.OpTooltip.gt=Greater
 CQLFitlerParser.OpTooltip.ge=Greater or equal
 
-ResourceProviderManagerFrame.Title=Xulu language packs
+ResourceProviderManagerFrame.Title=Language packs
 ResourceProviderManagerFrame.Bundle=Language bundle
-ResourceProviderManagerFrame.ExtentionOf=Extention of...
+ResourceProviderManagerFrame.ExtentionOf=Extension of...
 ResourceProviderManagerFrame.RootLang=Root language
 ResourceProviderManagerFrame.AdditionalLang=Additional languages
-ResourceProviderManagerFrame.NewLang=Create new language...
+ResourceProviderManagerFrame.NewLang=Create new language files...
 ResourceProviderManagerFrame.OtherLang=<other language>
 ResourceProviderManagerFrame.Language=Language
 ResourceProviderManagerFrame.LanguageCode=Language code

Modified: trunk/src/schmitzm/swing/resource/locales/SwingResourceBundle_de.properties
===================================================================
--- trunk/src/schmitzm/swing/resource/locales/SwingResourceBundle_de.properties	2010-06-03 09:00:24 UTC (rev 883)
+++ trunk/src/schmitzm/swing/resource/locales/SwingResourceBundle_de.properties	2010-06-03 09:19:08 UTC (rev 884)
@@ -202,7 +202,7 @@
 ResourceProviderManagerFrame.ExtentionOf=Erweiterung von...
 ResourceProviderManagerFrame.RootLang=Standard Sprache
 ResourceProviderManagerFrame.AdditionalLang=Weitere Sprachen
-ResourceProviderManagerFrame.NewLang=Neue Sprache anlegen...
+ResourceProviderManagerFrame.NewLang=Neue Sprachdateien anlegen...
 ResourceProviderManagerFrame.OtherLang=<andere Sprache>
 ResourceProviderManagerFrame.Language=Sprache
 ResourceProviderManagerFrame.LanguageCode=Sprachcode



More information about the Schmitzm-commits mailing list