[Schmitzm-commits] r618 - in branches/2.0-RC1/src: schmitzm/geotools/styling skrueger/geotools skrueger/swing

scm-commit@wald.intevation.org scm-commit at wald.intevation.org
Sun Dec 27 20:32:09 CET 2009


Author: alfonx
Date: 2009-12-27 20:32:08 +0100 (Sun, 27 Dec 2009)
New Revision: 618

Modified:
   branches/2.0-RC1/src/schmitzm/geotools/styling/StylingUtil.java
   branches/2.0-RC1/src/skrueger/geotools/XMapPane.java
   branches/2.0-RC1/src/skrueger/swing/AtlasDialog.java
   branches/2.0-RC1/src/skrueger/swing/DialogManager.java
Log:


Modified: branches/2.0-RC1/src/schmitzm/geotools/styling/StylingUtil.java
===================================================================
--- branches/2.0-RC1/src/schmitzm/geotools/styling/StylingUtil.java	2009-12-14 19:53:20 UTC (rev 617)
+++ branches/2.0-RC1/src/schmitzm/geotools/styling/StylingUtil.java	2009-12-27 19:32:08 UTC (rev 618)
@@ -162,6 +162,9 @@
 
 	/** Standard-Instanz eines {@link SLDTransformer}. */
 	public final static SLDTransformer SLDTRANSFORMER = new SLDTransformer();
+	static {
+		SLDTRANSFORMER.setEncoding(Charset.defaultCharset());
+	}
 
 	// /**
 	// * Standard-Instanz eines {@link StyleBuilder}.
@@ -1082,6 +1085,8 @@
 			File exportFile, Charset charset) throws TransformerException,
 			IOException {
 		SLDTRANSFORMER.setIndentation(2);
+//		LOGGER.debug("default charset = "+ Charset.defaultCharset());
+//		SLDTRANSFORMER.setEncoding(Charset.forName("UTF-8"));
 
 		Style exportStyle = removeSelectionFeatureTypeStyle(origStyle);
 
@@ -1168,7 +1173,7 @@
 	 */
 	public static boolean isStyleDifferent(Style style1, File style2file) {
 		SLDTRANSFORMER.setIndentation(2);
-
+		
 		try {
 
 			if (!style2file.exists())
@@ -1197,6 +1202,7 @@
 	 */
 	public static boolean isStyleDifferent(Style style1, Style style2) {
 		try {
+//			SLDTRANSFORMER.setEncoding(Charset.forName("UTF-8"));
 			// Transforming style2 to an XML String
 			String style1string = SLDTRANSFORMER.transform(style1);
 			String style2string = SLDTRANSFORMER.transform(style2);

Modified: branches/2.0-RC1/src/skrueger/geotools/XMapPane.java
===================================================================
--- branches/2.0-RC1/src/skrueger/geotools/XMapPane.java	2009-12-14 19:53:20 UTC (rev 617)
+++ branches/2.0-RC1/src/skrueger/geotools/XMapPane.java	2009-12-27 19:32:08 UTC (rev 618)
@@ -1131,7 +1131,7 @@
 			ReferencedEnvelope mapArea_ = null;
 			try {
 				mapArea_ = localContext.getLayerBounds();
-			} catch (final IOException e) {
+			} catch (final Exception e) {
 				LOGGER.warn("localContext.getLayerBounds()", e);
 			}
 

Modified: branches/2.0-RC1/src/skrueger/swing/AtlasDialog.java
===================================================================
--- branches/2.0-RC1/src/skrueger/swing/AtlasDialog.java	2009-12-14 19:53:20 UTC (rev 617)
+++ branches/2.0-RC1/src/skrueger/swing/AtlasDialog.java	2009-12-27 19:32:08 UTC (rev 618)
@@ -20,7 +20,11 @@
 		super(SwingUtil.getParentWindow(owner), title);
 		initDialog();
 	}
+	
+	/** A flag checking that we just get disposed once **/
+	protected boolean isDisposed = false;
 
+
 	public AtlasDialog(final Component parentWindowComponent) {
 		this(parentWindowComponent, null);
 	}
@@ -71,4 +75,10 @@
 
 		return rootPane;
 	}
+	
+	@Override
+	public void dispose() {
+		super.dispose();
+		isDisposed = true;
+	}
 }

Modified: branches/2.0-RC1/src/skrueger/swing/DialogManager.java
===================================================================
--- branches/2.0-RC1/src/skrueger/swing/DialogManager.java	2009-12-14 19:53:20 UTC (rev 617)
+++ branches/2.0-RC1/src/skrueger/swing/DialogManager.java	2009-12-27 19:32:08 UTC (rev 618)
@@ -122,10 +122,13 @@
 			dialog.addWindowListener(new WindowAdapter() {
 				@Override
 				public void windowClosed(final WindowEvent e) {
-					dialog.setVisible(false);
+					dialogCache.remove(key);
 					factory.beforeDispose(dialog);
-					disposeInstanceFor(key);
 				}
+
+				@Override
+				public void windowClosing(final WindowEvent e) {
+				}
 			});
 			
 			factory.afterCreation(dialog);



More information about the Schmitzm-commits mailing list