[Schmitzm-commits] r300 - in trunk/src/skrueger: i8n swing

scm-commit@wald.intevation.org scm-commit at wald.intevation.org
Sat Aug 15 12:33:44 CEST 2009


Author: alfonx
Date: 2009-08-15 12:33:43 +0200 (Sat, 15 Aug 2009)
New Revision: 300

Modified:
   trunk/src/skrueger/i8n/Translation.java
   trunk/src/skrueger/swing/TranslationJTextField.java
Log:
* AS-Feature: Added a button to open the attribute table to the AtlasStyler QuantitiesClassification-GUI.
* GP-Bugfix: Entering translations with tailing spaces lead to strange behavioure. Fixed.

Modified: trunk/src/skrueger/i8n/Translation.java
===================================================================
--- trunk/src/skrueger/i8n/Translation.java	2009-08-12 15:12:16 UTC (rev 299)
+++ trunk/src/skrueger/i8n/Translation.java	2009-08-15 10:33:43 UTC (rev 300)
@@ -315,8 +315,8 @@
 		return actionListeners.remove(actionListener);
 	}
 
-	public void fireTranslationChangedEvents() {
-		ActionEvent ae = new ActionEvent(this, new Random().nextInt(),  "");
+	public void fireTranslationChangedEvents(String lang) {
+		ActionEvent ae = new ActionEvent(this, new Random().nextInt(), lang);
 		
 		for (ActionListener al : actionListeners) {
 			al.actionPerformed( ae);
@@ -324,9 +324,9 @@
 	}
 	
 	@Override
-	public String put(String key, String value) {
-		String result = super.put(key, value);
-		fireTranslationChangedEvents();
+	public String put(String lang, String value) {
+		String result = super.put(lang, value);
+		fireTranslationChangedEvents(lang);
 		return result;
 	}
 	

Modified: trunk/src/skrueger/swing/TranslationJTextField.java
===================================================================
--- trunk/src/skrueger/swing/TranslationJTextField.java	2009-08-12 15:12:16 UTC (rev 299)
+++ trunk/src/skrueger/swing/TranslationJTextField.java	2009-08-15 10:33:43 UTC (rev 300)
@@ -120,7 +120,14 @@
 
 			@Override
 			public void actionPerformed(ActionEvent e) {
-//				LOGGER.debug("ActionListener called ");
+				LOGGER.debug("ActionListener called ");
+
+				if (e.getSource() == trans
+						&& langCode.equals(e.getActionCommand())) {
+					LOGGER.debug(" and omittet!\n");
+					return;
+				}
+				LOGGER.debug(" and performed!\n");
 				String newString = trans.get(langCode);
 				if (newString == null)
 					newString = "";



More information about the Schmitzm-commits mailing list