[Schmitzm-commits] r575 - branches/1.0-gt2-2.6/src/skrueger/i8n

scm-commit@wald.intevation.org scm-commit at wald.intevation.org
Wed Nov 25 14:20:24 CET 2009


Author: alfonx
Date: 2009-11-25 14:20:23 +0100 (Wed, 25 Nov 2009)
New Revision: 575

Modified:
   branches/1.0-gt2-2.6/src/skrueger/i8n/Translation.java
Log:
Added a static method removeLocaleChangeListener to Translation

Modified: branches/1.0-gt2-2.6/src/skrueger/i8n/Translation.java
===================================================================
--- branches/1.0-gt2-2.6/src/skrueger/i8n/Translation.java	2009-11-25 08:09:42 UTC (rev 574)
+++ branches/1.0-gt2-2.6/src/skrueger/i8n/Translation.java	2009-11-25 13:20:23 UTC (rev 575)
@@ -301,6 +301,21 @@
 	}
 
 	/**
+	 * {@link PropertyChangeListener} can be registered to be informed when the
+	 * {@link Locale} changed.<br>
+	 * The listeners are kept in a {@link WeakHashMap}, so you have to keep a
+	 * reference to the listener or it will be removed!
+	 * 
+	 * @param propertyChangeListener
+	 *            A {@link PropertyChangeListener} that will be called when
+	 *            {@link #setActiveLang(String)} changes the language.
+	 */
+	public static boolean removeLocaleChangeListener(
+			PropertyChangeListener propertyChangeListener) {
+		return listeners.remove(propertyChangeListener);
+	}
+
+	/**
 	 * Informs all registered {@link PropertyChangeListener}s about a change of
 	 * the the {@link Locale}.
 	 */



More information about the Schmitzm-commits mailing list