[Schmitzm-commits] r497 - in branches/1.0-gt2-2.6/src: gtmig/org/geotools/swing schmitzm/geotools/gui/resource/locales skrueger/swing

scm-commit@wald.intevation.org scm-commit at wald.intevation.org
Fri Oct 23 20:43:59 CEST 2009


Author: alfonx
Date: 2009-10-23 20:43:58 +0200 (Fri, 23 Oct 2009)
New Revision: 497

Modified:
   branches/1.0-gt2-2.6/src/gtmig/org/geotools/swing/JMapPane.java
   branches/1.0-gt2-2.6/src/schmitzm/geotools/gui/resource/locales/GTResourceBundle.properties
   branches/1.0-gt2-2.6/src/schmitzm/geotools/gui/resource/locales/GTResourceBundle_de.properties
   branches/1.0-gt2-2.6/src/skrueger/swing/CancellableDialogAdapter.java
   branches/1.0-gt2-2.6/src/skrueger/swing/CancellableTabbedDialogAdapter.java
Log:
i8n fuer cancellableAtlasDialogdpter

Modified: branches/1.0-gt2-2.6/src/gtmig/org/geotools/swing/JMapPane.java
===================================================================
--- branches/1.0-gt2-2.6/src/gtmig/org/geotools/swing/JMapPane.java	2009-10-23 16:56:03 UTC (rev 496)
+++ branches/1.0-gt2-2.6/src/gtmig/org/geotools/swing/JMapPane.java	2009-10-23 18:43:58 UTC (rev 497)
@@ -866,9 +866,9 @@
 
 		/**
 		 * Correct the aspect Ratio before we check the rest. Otherwise we might
-		 * easily fail.
+		 * easily fail. We allow to grow here, because we don't check against the maxExtend
 		 */
-		env = JTSUtil.fixAspectRatio(this.getBounds(), env, false);
+		env = JTSUtil.fixAspectRatio(this.getBounds(), env, true);
 
 		final double scale = env.getWidth() / getWidth();
 		final double centerX = env.getMinX() + env.getWidth() / 2.;

Modified: branches/1.0-gt2-2.6/src/schmitzm/geotools/gui/resource/locales/GTResourceBundle.properties
===================================================================
--- branches/1.0-gt2-2.6/src/schmitzm/geotools/gui/resource/locales/GTResourceBundle.properties	2009-10-23 16:56:03 UTC (rev 496)
+++ branches/1.0-gt2-2.6/src/schmitzm/geotools/gui/resource/locales/GTResourceBundle.properties	2009-10-23 18:43:58 UTC (rev 497)
@@ -25,7 +25,7 @@
 #
 #Contributors:
 #    Martin O. J. Schmitz - initial API and implementation
-#    Stefan A. Krüger - additional utility classes
+#    Stefan A. Kr\ufffdger - additional utility classes
 ##########
 
 # ---------------------------------------------------------------
@@ -152,5 +152,9 @@
 schmitzm.geotools.gui.SelectableFeatureTablePane.selectionStatus.lines=lines
 
 schmitzm.geotools.gui.GridPanelFormatter_DHDN.title=1,234,567 (H|R)
-schmitzm.geotools.gui.GridPanelFormatter_LatLon1.title=deegree° minute' (N|E|S|W)
-schmitzm.geotools.gui.GridPanelFormatter.ToolTipTemplate=${0} in unit ${1}
\ No newline at end of file
+schmitzm.geotools.gui.GridPanelFormatter_LatLon1.title=deegree\u00b0 minute' (N|E|S|W)
+schmitzm.geotools.gui.GridPanelFormatter.ToolTipTemplate=${0} in unit ${1}
+
+CancellableDialogAdapter.close.save.title=Save?
+CancellableDialogAdapter.close.save.msg=<html>Shall any changes in <center><b><i>${0}</i></b></center> be saved?</html>
+CancellableDialogAdapter.forceClose.save.msg=<html>The window <center><b><i>${0}</i></b></center> has be be closed now.<br>Do you want to save any changes?</html>

Modified: branches/1.0-gt2-2.6/src/schmitzm/geotools/gui/resource/locales/GTResourceBundle_de.properties
===================================================================
--- branches/1.0-gt2-2.6/src/schmitzm/geotools/gui/resource/locales/GTResourceBundle_de.properties	2009-10-23 16:56:03 UTC (rev 496)
+++ branches/1.0-gt2-2.6/src/schmitzm/geotools/gui/resource/locales/GTResourceBundle_de.properties	2009-10-23 18:43:58 UTC (rev 497)
@@ -1,63 +1,3 @@
-##########
-#Copyright (c) 2009 Martin O. J. Schmitz.
-#
-#This file is part of the SCHMITZM library - a collection of utility 
-#classes based on Java 1.6, focusing (not only) on Java Swing 
-#and the Geotools library.
-#
-#The SCHMITZM project is hosted at:
-#http://wald.intevation.org/projects/schmitzm/
-#
-#This program is free software; you can redistribute it and/or
-#modify it under the terms of the GNU Lesser General Public License
-#as published by the Free Software Foundation; either version 3
-#of the License, or (at your option) any later version.
-#
-#This program is distributed in the hope that it will be useful,
-#but WITHOUT ANY WARRANTY; without even the implied warranty of
-#MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
-#GNU General Public License for more details.
-#
-#You should have received a copy of the GNU Lesser General Public License (license.txt)
-#along with this program; if not, write to the Free Software
-#Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA  02110-1301, USA.
-#or try this link: http://www.gnu.org/licenses/lgpl.html
-#
-#Contributors:
-#    Martin O. J. Schmitz - initial API and implementation
-#    Stefan A. Krüger - additional utility classes
-##########
-#This file is part of the SCHMITZM library - a collection of utility 
-#classes based on Java 1.6, focussing (not only) on Java Swing 
-#and the Geotools library.
-#
-#The SCHMITZM project is hosted at:
-#http://wald.intevation.org/projects/schmitzm/
-#
-#This program is free software; you can redistribute it and/or
-#modify it under the terms of the GNU Lesser General Public License
-#as published by the Free Software Foundation; either version 3
-#of the License, or (at your option) any later version.
-#
-#This program is distributed in the hope that it will be useful,
-#but WITHOUT ANY WARRANTY; without even the implied warranty of
-#MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
-#GNU General Public License for more details.
-#
-#You should have received a copy of the GNU Lesser General Public License (license.txt)
-#along with this program; if not, write to the Free Software
-#Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA  02110-1301, USA.
-#or try this link: http://www.gnu.org/licenses/lgpl.html
-#
-#Contributors:
-#    Martin O. J. Schmitz - initial API and implementation
-#    Stefan A. Krüger - additional utility classes
-##########
-# ----------------------------------------------------
-# ------ German Translations for GUI components ------
-# ------ in Package schmitz.geotools.gui        ------
-# ----------------------------------------------------
-
 Attributes=Attribute
 
 org.geotools.styling.StyleBuilder.MARK_ARROW=Pfeil
@@ -85,13 +25,13 @@
 
 schmitzm.geotools.gui.MapActionControlPane.ZOOM_IN=Heran zoomen
 schmitzm.geotools.gui.MapActionControlPane.ZOOM_OUT=Heraus zoomen
-schmitzm.geotools.gui.MapActionControlPane.SELECT_TOP=Auswählen aus oberstem Layer
-schmitzm.geotools.gui.MapActionControlPane.SELECT_ALL=Auswählen aus allen Layern
+schmitzm.geotools.gui.MapActionControlPane.SELECT_TOP=Ausw\ufffdhlen aus oberstem Layer
+schmitzm.geotools.gui.MapActionControlPane.SELECT_ALL=Ausw\ufffdhlen aus allen Layern
 schmitzm.geotools.gui.MapContextControlPane.Menu.MOVE_UP=Nach OBEN schieben
 schmitzm.geotools.gui.MapContextControlPane.Menu.MOVE_DOWN=Nach UNTEN schieben
 schmitzm.geotools.gui.MapContextControlPane.Menu.ZOOM_TO=Zu Layer zoomen
 schmitzm.geotools.gui.MapContextControlPane.Menu.FILTER=Layer filtern...
-schmitzm.geotools.gui.MapContextControlPane.Menu.RECOLOR=Färbung ändern
+schmitzm.geotools.gui.MapContextControlPane.Menu.RECOLOR=F\ufffdrbung \ufffdndern
 schmitzm.geotools.gui.MapContextControlPane.Menu.REMOVE=Layer entfernen
 schmitzm.geotools.gui.MapContextControlPane.Menu.SHOWALL=Alle Layer anzeigen
 schmitzm.geotools.gui.MapContextControlPane.Menu.HIDEALL=Alle Layer verbergen
@@ -99,7 +39,7 @@
 schmitzm.geotools.gui.MapContextControlPane.Menu.CUSTOMIZE=Anpassen...
 schmitzm.geotools.gui.MapContextControlPane.ColorMapDialog.TITLE=Farbpalette
 schmitzm.geotools.gui.MapContextControlPane.SaveColorMapDialog.TITLE=Farbpalette speichern
-schmitzm.geotools.gui.MapContextControlPane.SaveColorMapDialog.QUESTION=Name für neue Farbpalette...
+schmitzm.geotools.gui.MapContextControlPane.SaveColorMapDialog.QUESTION=Name f\ufffdr neue Farbpalette...
 schmitzm.geotools.gui.ColorMapTable.Header.QUANTITY=Raster-Wert
 schmitzm.geotools.gui.ColorMapTable.Header.COLOR=Farbe
 schmitzm.geotools.gui.ColorMapTable.Header.LABEL=Label
@@ -111,11 +51,11 @@
 schmitzm.geotools.gui.GeotoolsGUIUtil.SaveRaster=Raster speichern
 schmitzm.geotools.gui.GeotoolsGUIUtil.SaveFeature=Shape speichern
 schmitzm.geotools.gui.GeotoolsGUIUtil.NORTH=Nord
-schmitzm.geotools.gui.GeotoolsGUIUtil.SOUTH=Süd
+schmitzm.geotools.gui.GeotoolsGUIUtil.SOUTH=S\ufffdd
 schmitzm.geotools.gui.GeotoolsGUIUtil.WEST=West
 schmitzm.geotools.gui.GeotoolsGUIUtil.EAST=Ost
 schmitzm.geotools.gui.GeotoolsGUIUtil.North=Norden
-schmitzm.geotools.gui.GeotoolsGUIUtil.South=Süden
+schmitzm.geotools.gui.GeotoolsGUIUtil.South=S\ufffdden
 schmitzm.geotools.gui.GeotoolsGUIUtil.West=Westen
 schmitzm.geotools.gui.GeotoolsGUIUtil.East=Osten
 schmitzm.geotools.gui.GeotoolsGUIUtil.NORTH.Abb=N
@@ -124,20 +64,20 @@
 schmitzm.geotools.gui.GeotoolsGUIUtil.EAST.Abb=O
 schmitzm.geotools.gui.CRSSelectionDialog.init.crs.title=CRS datenbank
 schmitzm.geotools.gui.CRSSelectionDialog.init.crs.mess=CRS-Datenbank wird initialisiert. Bitte warten...
-schmitzm.geotools.gui.CRSSelectionDialog.title=Koordinaten-System (CRS) auswählen
+schmitzm.geotools.gui.CRSSelectionDialog.title=Koordinaten-System (CRS) ausw\ufffdhlen
 schmitzm.geotools.gui.CRSSelectionDialog.mandatory=CRS must be specified!
 schmitzm.geotools.gui.CRSSelectionDialog.button.wgs84=WGS-84 CRS
 schmitzm.geotools.gui.CRSSelectionDialog.button.default=Standard CRS (${0})
 schmitzm.geotools.gui.CRSSelectionDialog.button.predefined=Vordefiniert
 schmitzm.geotools.gui.CRSSelectionDialog.button.userDefined=Benutzerdefiniert:
 schmitzm.geotools.gui.JEditorPane.Err.MissingMap=Bevor ein neues Layer erstellt werden kann, muss ein Layer angezeigt werden (um CRS und geogr. Lage zu definieren).
-schmitzm.geotools.gui.JEditorPane.Err.Line.LessPoints=Für ein Line-Feature müssen mind. 2 Punkte definiert werden!
-schmitzm.geotools.gui.JEditorPane.Err.Polygon.LessPoints=Für ein Polygon-Feature müssen mind. 3 Punkte definiert werden!
+schmitzm.geotools.gui.JEditorPane.Err.Line.LessPoints=F\u00fcr ein Line-Feature m\u00fcssen mind. 2 Punkte definiert werden!
+schmitzm.geotools.gui.JEditorPane.Err.Polygon.LessPoints=F\u00fcr ein Polygon-Feature m\u00fcssen mind. 3 Punkte definiert werden!
 schmitzm.geotools.gui.JEditorToolBar.button.layer.new=Neues Layer erstellen
 schmitzm.geotools.gui.JEditorToolBar.button.layer.save=Layer abschliessen
 schmitzm.geotools.gui.JEditorToolBar.button.layer.cancel=Layer abbrechen
-schmitzm.geotools.gui.JEditorToolBar.button.edit.undo=Letzte Operation zurücknehmen
-schmitzm.geotools.gui.JEditorToolBar.button.edit.redo=Letzte zurückgenommene Operation wiederholen
+schmitzm.geotools.gui.JEditorToolBar.button.edit.undo=Letzte Operation zur\u00fccknehmen
+schmitzm.geotools.gui.JEditorToolBar.button.edit.redo=Letzte zur\u00fcckgenommene Operation wiederholen
 schmitzm.geotools.gui.JEditorToolBar.button.edit.clear=Layer leeren
 schmitzm.geotools.gui.JEditorToolBar.button.edit.finish=Neues Feature starten
 schmitzm.geotools.gui.JEditorToolBar.NewLayer.dialog.title=Neues Layer erzeugen
@@ -148,10 +88,10 @@
 schmitzm.geotools.gui.JEditorToolBar.NewLayer.layer.type.line=Linien-Layer
 schmitzm.geotools.gui.JEditorToolBar.NewLayer.layer.type.polygon=Polygon-Layer
 schmitzm.geotools.gui.JEditorToolBar.NewLayer.ftype.title=Weitere Attribute
-schmitzm.geotools.gui.JEditorToolBar.NewLayer.Err.GeomAttr=Attribut-Name '${0}' reserviert für das Default-Geometrie-Attribut.
-schmitzm.geotools.gui.JEditorToolBar.NewLayer.Err.AutoVal=Auto-Wert für Attribut-Typ '${0}' nicht möglich.
+schmitzm.geotools.gui.JEditorToolBar.NewLayer.Err.GeomAttr=Attribut-Name '${0}' reserviert f\u00fcr das Default-Geometrie-Attribut.
+schmitzm.geotools.gui.JEditorToolBar.NewLayer.Err.AutoVal=Auto-Wert f\u00fcr Attribut-Typ '${0}' nicht m\u00f6glich.
 schmitzm.geotools.gui.JEditorToolBar.NewFeature.title=Neues Feature
-schmitzm.geotools.gui.StyleToolBar.FillColor=Füllfarbe
+schmitzm.geotools.gui.StyleToolBar.FillColor=F\u00fcllfarbe
 schmitzm.geotools.gui.StyleToolBar.BorderColor=Randfarbe
 schmitzm.geotools.gui.StyleToolBar.BorderWidth=Randbreite
 schmitzm.geotools.gui.StyleToolBar.PointMark=Punkt-Style
@@ -163,9 +103,9 @@
 schmitzm.geotools.gui.FeatureTypeBuilderTableModel.NewAttr=Attribut_${0}
 
 schmitzm.geotools.gui.SelectableFeatureTablePane.button.clearSelection.tt=Auswahl aufheben
-schmitzm.geotools.gui.SelectableFeatureTablePane.button.selectionToTop.tt=Ausgewählte Zeilen in der Tabelle nach oben verschieben 
+schmitzm.geotools.gui.SelectableFeatureTablePane.button.selectionToTop.tt=Ausgew\u00e4hlte Zeilen in der Tabelle nach oben verschieben 
 schmitzm.geotools.gui.SelectableFeatureTablePane.button.invertSelection.tt=Auswahl umkehren
-schmitzm.geotools.gui.SelectableFeatureTablePane.button.zoomToSelection.tt=Zoomt zu den ausgewählten Geoobjekten 
+schmitzm.geotools.gui.SelectableFeatureTablePane.button.zoomToSelection.tt=Zoomt zu den ausgew\u00e4hlten Geoobjekten 
 schmitzm.geotools.gui.SelectableFeatureTablePane.selectionStatus=${0} von ${1} ${2} selektiert.
 schmitzm.geotools.gui.SelectableFeatureTablePane.selectionStatus.polygons=Polygonen
 schmitzm.geotools.gui.SelectableFeatureTablePane.selectionStatus.points=Punkten
@@ -173,8 +113,12 @@
 
 
 schmitzm.geotools.gui.GridPanelFormatter_DHDN.title=DHDN - 1,234,567 (H|R)
-schmitzm.geotools.gui.GridPanelFormatter_LatLon1.title=Grad° Minute' (N|O|S|W)
-#nice to have: schmitzm.geotools.gui.GridPanelFormatter_LatLon2.title=Grad° Minute' Sek.'' (N|O|S|W)
-#nice to have: schmitzm.geotools.gui.GridPanelFormatter_LatLon3.title=Grad° Minute' Hundertstel (N|O|S|W)
+schmitzm.geotools.gui.GridPanelFormatter_LatLon1.title=Grad\u00b0 Minute' (N|O|S|W)
+#nice to have: schmitzm.geotools.gui.GridPanelFormatter_LatLon2.title=Grad\u00b0 Minute' Sek.'' (N|O|S|W)
+#nice to have: schmitzm.geotools.gui.GridPanelFormatter_LatLon3.title=Grad\u00b0 Minute' Hundertstel (N|O|S|W)
 
-schmitzm.geotools.gui.GridPanelFormatter.ToolTipTemplate=${0} in Einheit ${1}
\ No newline at end of file
+schmitzm.geotools.gui.GridPanelFormatter.ToolTipTemplate=${0} in Einheit ${1}
+
+CancellableDialogAdapter.close.save.title=Speichern?
+CancellableDialogAdapter.close.save.msg=<html>Wollen Sie eventuelle \u00c4nderungen an <center><b><i>${0}</i></b></center> speichern?</html>
+CancellableDialogAdapter.forceClose.save.msg=<html>Das Fenster <center><b><i>${0}</i></b></center> muss nun gesclossen werden. Wollen Sie eventuelle \u00c4nderungen speichern?</html>

Modified: branches/1.0-gt2-2.6/src/skrueger/swing/CancellableDialogAdapter.java
===================================================================
--- branches/1.0-gt2-2.6/src/skrueger/swing/CancellableDialogAdapter.java	2009-10-23 16:56:03 UTC (rev 496)
+++ branches/1.0-gt2-2.6/src/skrueger/swing/CancellableDialogAdapter.java	2009-10-23 18:43:58 UTC (rev 497)
@@ -2,10 +2,15 @@
 
 import java.awt.Component;
 import java.awt.Dialog;
+import java.util.Locale;
 
 import javax.swing.JDialog;
 import javax.swing.JOptionPane;
 
+import schmitzm.geotools.gui.GeotoolsGUIUtil;
+import schmitzm.lang.LangUtil;
+import schmitzm.lang.ResourceProvider;
+
 /**
  * An abstract {@link JDialog} that implements a basic structure of how
  * cancellable {@link JDialog}s work. The {@link JDialog} is designed to work on
@@ -16,7 +21,12 @@
  */
 public abstract class CancellableDialogAdapter extends AtlasDialog implements
 		CancellableDialog {
+	
 
+	protected static ResourceProvider RESOURCE = new ResourceProvider(LangUtil
+			.extendPackagePath(GeotoolsGUIUtil.class,
+					"resource.locales.GTResourceBundle"), Locale.ENGLISH);
+
 	/** Has this dialog been canceled ?**/
 	protected boolean cancelled = false;
 	
@@ -39,8 +49,8 @@
 	 */
 	public boolean close() {
 		int showConfirmDialog = JOptionPane.showConfirmDialog(
-				CancellableDialogAdapter.this, "Speichern?",
-				"Änderungen speichern?", JOptionPane.YES_NO_CANCEL_OPTION); // i8n
+				CancellableDialogAdapter.this, 
+				RESOURCE.getString("CancellableDialogAdapter.close.save.msg",getTitle()), RESOURCE.getString("CancellableDialogAdapter.close.save.title"), JOptionPane.YES_NO_CANCEL_OPTION);
 
 		if (showConfirmDialog == JOptionPane.YES_OPTION) {
 			return okClose();
@@ -62,8 +72,8 @@
 	public void forceClose() {
 
 		int res = JOptionPane.showConfirmDialog(
-				CancellableDialogAdapter.this, "Speichern?",
-				"Der Dialog muss nu gesclossen werden. Änderungen speichern?", JOptionPane.YES_NO_OPTION); // i8n
+				CancellableDialogAdapter.this,
+				RESOURCE.getString("CancellableDialogAdapter.forceClose.save.msg",getTitle()), RESOURCE.getString("CancellableDialogAdapter.close.save.title"), JOptionPane.YES_NO_OPTION); 
 		
 		if (res == JOptionPane.YES_OPTION) {
 			okClose();

Modified: branches/1.0-gt2-2.6/src/skrueger/swing/CancellableTabbedDialogAdapter.java
===================================================================
--- branches/1.0-gt2-2.6/src/skrueger/swing/CancellableTabbedDialogAdapter.java	2009-10-23 16:56:03 UTC (rev 496)
+++ branches/1.0-gt2-2.6/src/skrueger/swing/CancellableTabbedDialogAdapter.java	2009-10-23 18:43:58 UTC (rev 497)
@@ -43,18 +43,15 @@
 		contentPane.add(buttons);
 
 		setContentPane(contentPane);
-		SwingUtil.centerFrameOnScreen(this);
 
 	}
 
 	/**
 	 * Is only called once! Doesn't use lazy initialization. Use
 	 * <code>super.createButtons.add( newButton )</code> to add buttons.
-	 * 
-	 * @return
 	 */
 	protected JPanel createButtons() {
-		final JPanel buttonsJPanel = new JPanel(new MigLayout("width 100%"));
+		final JPanel buttonsJPanel = new JPanel(new MigLayout());
 
 		final OkButton okButton = new OkButton(new AbstractAction() {
 			{



More information about the Schmitzm-commits mailing list