[Schmitzm-commits] r854 - in trunk: src/schmitzm/geotools/gui src_junit/schmitzm/jfree/feature/style

scm-commit@wald.intevation.org scm-commit at wald.intevation.org
Fri May 21 15:15:22 CEST 2010


Author: alfonx
Date: 2010-05-21 15:15:20 +0200 (Fri, 21 May 2010)
New Revision: 854

Modified:
   trunk/src/schmitzm/geotools/gui/ScalePane.java
   trunk/src/schmitzm/geotools/gui/SelectableXMapPane.java
   trunk/src_junit/schmitzm/jfree/feature/style/FeatureChartStyleTest.java
Log:


Modified: trunk/src/schmitzm/geotools/gui/ScalePane.java
===================================================================
--- trunk/src/schmitzm/geotools/gui/ScalePane.java	2010-05-21 11:34:52 UTC (rev 853)
+++ trunk/src/schmitzm/geotools/gui/ScalePane.java	2010-05-21 13:15:20 UTC (rev 854)
@@ -96,8 +96,7 @@
 	}
   
 	/**
-	 * Define the unit used in the scale. Not all possible Unit values are
-	 * allowed.
+	 * Define the unit used in the scale. 
 	 */
 	public void setUnits(ScalePanel.ScaleUnits unit) {
 	  scalePanel.setUnits(unit);

Modified: trunk/src/schmitzm/geotools/gui/SelectableXMapPane.java
===================================================================
--- trunk/src/schmitzm/geotools/gui/SelectableXMapPane.java	2010-05-21 11:34:52 UTC (rev 853)
+++ trunk/src/schmitzm/geotools/gui/SelectableXMapPane.java	2010-05-21 13:15:20 UTC (rev 854)
@@ -205,8 +205,15 @@
 
 		if (!isWellDefined())
 			return 0.0;
+		
+//		double scale = getMapArea().getWidth() / getWidth();
+//		
+//		LOGGER.debug("Scale in XMapPane = "+scale);
+		
+		double scale2 = 1. / getWorldToScreenTransform().getScaleX();
+//		LOGGER.debug("Alternativ = "+scale2);
 
-		return getMapArea().getWidth() / getWidth();
+		return scale2;
 	}
 
 	/**

Modified: trunk/src_junit/schmitzm/jfree/feature/style/FeatureChartStyleTest.java
===================================================================
--- trunk/src_junit/schmitzm/jfree/feature/style/FeatureChartStyleTest.java	2010-05-21 11:34:52 UTC (rev 853)
+++ trunk/src_junit/schmitzm/jfree/feature/style/FeatureChartStyleTest.java	2010-05-21 13:15:20 UTC (rev 854)
@@ -35,6 +35,7 @@
 	FeatureChartStyleXMLFactory xmlFactory = new FeatureChartStyleXMLFactory();
 
 	boolean INTERACTIVE = !GraphicsEnvironment.isHeadless();
+	
 	String resLocation = "/schmitzm/jfree/feature/style/testLineChartShape/testKreiseLineChart2.shp";
 	
 	@Test



More information about the Schmitzm-commits mailing list