diff src/java/de/intevation/mxd/reader/PictureLineSymbolReader.java @ 135:a4ab239509f1

Updated the default values and reader error handling.
author Raimund Renkert <rrenkert@intevation.de>
date Wed, 22 Jun 2011 13:55:22 +0200
parents fb93f20478cc
children df4e0946ef02
line wrap: on
line diff
--- a/src/java/de/intevation/mxd/reader/PictureLineSymbolReader.java	Wed Jun 22 12:01:28 2011 +0200
+++ b/src/java/de/intevation/mxd/reader/PictureLineSymbolReader.java	Wed Jun 22 13:55:22 2011 +0200
@@ -71,7 +71,7 @@
             symbolElement.setAttribute("name", symbol.getNameString());
         }
         catch(IOException ioe) {
-            logger.warn("Could not read name. Setting name ti \"default\"");
+            logger.warn("Could not read name. Setting name to \"default\"");
             symbolElement.setAttribute("name", "default");
         }
 
@@ -95,12 +95,7 @@
             }
         }
         catch(IOException ioe) {
-            logger.warn(
-                "Could not read color." +
-                " Setting color to black with no transparency");
-            Color black = new Color (0, 0, 0);
-            symbolElement.setAttribute("color", String.valueOf(black.getRGB()));
-            symbolElement.setAttribute("transparency", "-1");
+            logger.warn("Could not read color.");
         }
 
         try {
@@ -109,8 +104,7 @@
                 String.valueOf(symbol.getOffset()));
         }
         catch(IOException ioe) {
-            logger.warn("Could not read offset. Setting offset to 0.");
-            symbolElement.setAttribute("offset", "0");
+            logger.warn("Could not read offset.");
         }
 
         try {
@@ -119,8 +113,7 @@
                 String.valueOf(symbol.getXScale()));
         }
         catch(IOException ioe) {
-            logger.warn("Could not read x-scale. Setting x-scale to 0");
-            symbolElement.setAttribute("x_scale", "0");
+            logger.warn("Could not read x-scale.");
         }
 
         try {
@@ -129,8 +122,7 @@
                 String.valueOf(symbol.getYScale()));
         }
         catch(IOException ioe) {
-            logger.warn("Could not read y-scale. Setting y-scale to 0.");
-            symbolElement.setAttribute("y_scale", "0");
+            logger.warn("Could not read y-scale.");
         }
 
         try {
@@ -139,8 +131,7 @@
                 String.valueOf(symbol.getWidth()));
         }
         catch(IOException ioe) {
-            logger.warn("Could not read width. Setting width to 1.");
-            symbolElement.setAttribute("width", "1");
+            logger.warn("Could not read width.");
         }
 
         symbolElement.setAttribute("type", "line");
This site is hosted by Intevation GmbH (Datenschutzerklärung und Impressum | Privacy Policy and Imprint)