[Schmitzm-commits] r166 - trunk/src/schmitzm/geotools/gui

scm-commit@wald.intevation.org scm-commit at wald.intevation.org
Wed Jun 24 16:48:58 CEST 2009


Author: alfonx
Date: 2009-06-24 16:48:57 +0200 (Wed, 24 Jun 2009)
New Revision: 166

Modified:
   trunk/src/schmitzm/geotools/gui/JMapPane.java
Log:
* b29 released
* More changes concerning the position of the JSplitPane Divider.
* The MapLegend now has a "valuesAdjusting" mode, that doesn't trigger GUI or map updates.
* The Map is now only rendered once when a map is opened and also the Divider doesn't "jump" when a map is opened.

Please test in ISDSS! 


Modified: trunk/src/schmitzm/geotools/gui/JMapPane.java
===================================================================
--- trunk/src/schmitzm/geotools/gui/JMapPane.java	2009-06-23 16:31:32 UTC (rev 165)
+++ trunk/src/schmitzm/geotools/gui/JMapPane.java	2009-06-24 14:48:57 UTC (rev 166)
@@ -514,7 +514,7 @@
                                 LOGGER.debug("MapContext-CRS set to: "+crs);
                             } catch (Exception err) {
                                 LOGGER
-                                        .error("CRS could not be assigned to map context.");
+                                        .error("CRS could not be assigned to map context.", err);
                             }
                         }
                     }
@@ -1340,9 +1340,12 @@
      *         Kr&uuml;ger</a>
      */
     protected void paintComponent(Graphics g) {
+    	
+//    	if (!reset) return; // TEST TEST TETS ONLY REMOVE!!
+    	
         Cursor oldCursor = null;
         boolean seriouseChange = false;
-
+        
         if (!getBounds().equals(oldRect) || reset)
             seriouseChange = true;
         else if (!mapArea.equals(oldMapArea))
@@ -1364,14 +1367,16 @@
         }
 
         try {
+//        	if (!seriouseChange) {
+//        		LOGGER.info("No seriouse Change => reset = false");
+//        		reset= false;
+//        	}
             super.paintComponent(g);
         } catch (Exception e) {
             /**
              * I only need to catch UnknownHostException.. well...
              */
-            LOGGER.info(e);
-            LOGGER
-                    .info("Probably we are offline and reference some online SVGs? ");
+            LOGGER.info("Error during JMapPane printComponent. Probably we are offline and reference some online SVGs?", e);
         }
         if (seriouseChange) {
             resetTransform();
@@ -1636,8 +1641,7 @@
                         break;
                 }
             } catch (Exception err) {
-                err.printStackTrace();
-                LOGGER.error(err);
+                LOGGER.error("Looking for features:", err);
             }
 
             // for ( FeatureCollection fc1 : result.values() )
@@ -1888,7 +1892,7 @@
                     sourceGrid = (GridCoverage2D) reader
                             .read(new GeneralParameterValue[] { readGG });
                 } catch (Exception e) {
-                    LOGGER.error(e);
+                    LOGGER.error("read(new GeneralParameterValue[] { readGG })", e);
                     continue;
                 }
             } else {
@@ -1910,7 +1914,7 @@
                 // z.B. Punkt ausserhalb des Rasters --> Layer uebergehen
                 continue;
             } catch (Exception e) {
-                LOGGER.error(e);
+                LOGGER.error("sourceGrid.evaluate(point, values);", e);
                 continue;
             }
 
@@ -2371,9 +2375,9 @@
                     // centre is transformed to the mapCRS
                     centre = JTS.transform(centre, null, fToMap);
                 } catch (FactoryException e) {
-                    LOGGER.error(e);
+                    LOGGER.error("Looking for a Math transform", e);
                 } catch (TransformException e) {
-                    LOGGER.error(e);
+                    LOGGER.error("Looking for a Math transform", e);
                 }
             }
 



More information about the Schmitzm-commits mailing list