[Schmitzm-commits] r615 - in branches/2.0-RC1/src: schmitzm/geotools/styling skrueger/geotools skrueger/i8n skrueger/swing
scm-commit@wald.intevation.org
scm-commit at wald.intevation.org
Mon Dec 14 18:31:43 CET 2009
Author: alfonx
Date: 2009-12-14 18:31:41 +0100 (Mon, 14 Dec 2009)
New Revision: 615
Modified:
branches/2.0-RC1/src/schmitzm/geotools/styling/StylingUtil.java
branches/2.0-RC1/src/skrueger/geotools/StyledLayerInterface.java
branches/2.0-RC1/src/skrueger/geotools/XMapPane.java
branches/2.0-RC1/src/skrueger/i8n/Translation.java
branches/2.0-RC1/src/skrueger/swing/CancellableDialogManager.java
Log:
DialogManager didn't always remove instances from the cache.
Translation constructor List<String>, defaultTranslaiton only set the default for the active langage
Modified: branches/2.0-RC1/src/schmitzm/geotools/styling/StylingUtil.java
===================================================================
--- branches/2.0-RC1/src/schmitzm/geotools/styling/StylingUtil.java 2009-12-12 21:01:55 UTC (rev 614)
+++ branches/2.0-RC1/src/schmitzm/geotools/styling/StylingUtil.java 2009-12-14 17:31:41 UTC (rev 615)
@@ -1032,12 +1032,10 @@
styles = stylereader.readXML();
return styles;
} catch (Exception e) {
+ LOGGER.warn(" ... no styles recognized. Return 'new Style[] { null }' ",e);
+ return new Style[] { null };
}
- LOGGER
- .warn(" ... no styles recognized. Return 'new Style[] { null }' ");
- return new Style[] { null };
-
}
/**
Modified: branches/2.0-RC1/src/skrueger/geotools/StyledLayerInterface.java
===================================================================
--- branches/2.0-RC1/src/skrueger/geotools/StyledLayerInterface.java 2009-12-12 21:01:55 UTC (rev 614)
+++ branches/2.0-RC1/src/skrueger/geotools/StyledLayerInterface.java 2009-12-14 17:31:41 UTC (rev 615)
@@ -142,7 +142,7 @@
* @return null or an {@link URL}
*/
public URL getInfoURL();
-
+
/**
* Should be called when this Object is not needed anymore.
*/
Modified: branches/2.0-RC1/src/skrueger/geotools/XMapPane.java
===================================================================
--- branches/2.0-RC1/src/skrueger/geotools/XMapPane.java 2009-12-12 21:01:55 UTC (rev 614)
+++ branches/2.0-RC1/src/skrueger/geotools/XMapPane.java 2009-12-14 17:31:41 UTC (rev 615)
@@ -2380,11 +2380,11 @@
* @param center
* position in window coordinates
* @param zoomFaktor
- * > 1 for zoom in, < 1 for zoom out. Default is 1.33.
+ * > 1 for zoom out, < 1 for zoom in. Default is .5
*/
public void zoomTo(Point center, Double zoomFaktor) {
if (zoomFaktor == null || zoomFaktor == 0.)
- zoomFaktor = 2.;
+ zoomFaktor = .5;
final Point2D gcenter = getScreenToWorld().transform(center, null);
center = null;
@@ -2406,11 +2406,9 @@
.getHeight()) / 2.);
// // Move the newMapArea above the new center if we zoom in:
- if (zoomFaktor >= 1) {
- newMapArea.translate(gcenter.getX() - mapArea.centre().x, gcenter
- .getY()
- - mapArea.centre().y);
- }
+ newMapArea.translate(gcenter.getX() - mapArea.centre().x, gcenter
+ .getY()
+ - mapArea.centre().y);
setMapArea(newMapArea);
}
Modified: branches/2.0-RC1/src/skrueger/i8n/Translation.java
===================================================================
--- branches/2.0-RC1/src/skrueger/i8n/Translation.java 2009-12-12 21:01:55 UTC (rev 614)
+++ branches/2.0-RC1/src/skrueger/i8n/Translation.java 2009-12-14 17:31:41 UTC (rev 615)
@@ -178,9 +178,9 @@
put(DEFAULT_KEY, defaultTranslation);
} else
for (String code : languages) {
- if (code.equals(getActiveLang())) {
+// if (code.equals(getActiveLang())) {
put(code, defaultTranslation);
- }
+// }
}
}
Modified: branches/2.0-RC1/src/skrueger/swing/CancellableDialogManager.java
===================================================================
--- branches/2.0-RC1/src/skrueger/swing/CancellableDialogManager.java 2009-12-12 21:01:55 UTC (rev 614)
+++ branches/2.0-RC1/src/skrueger/swing/CancellableDialogManager.java 2009-12-14 17:31:41 UTC (rev 615)
@@ -12,6 +12,7 @@
for (DIALOG d : getAllInstances()) {
d.forceClose();
}
+ dialogCache.clear();
}
/**
@@ -23,6 +24,8 @@
if (!d.close())
return false;
}
+
+ dialogCache.clear();
return true;
}
@@ -33,9 +36,11 @@
*/
public boolean close(KEY key) {
if (isVisibleFor(key)) {
- return getInstanceFor(key, null).close();
+ boolean closeResult = getInstanceFor(key, null).close();
+ if (closeResult) dialogCache.remove(key);
+ return closeResult;
}
-
+ dialogCache.remove(key);
return true;
}
More information about the Schmitzm-commits
mailing list