diff src/java/de/intevation/mxd/reader/SimpleRendererReader.java @ 36:472aa36d0e01

Added a new layer reader and symbol reader.
author Raimund Renkert <rrenkert@intevation.de>
date Tue, 12 Apr 2011 14:43:58 +0200
parents 7a927921eb6c
children ef7ca23c4233
line wrap: on
line diff
--- a/src/java/de/intevation/mxd/reader/SimpleRendererReader.java	Tue Apr 12 14:30:59 2011 +0200
+++ b/src/java/de/intevation/mxd/reader/SimpleRendererReader.java	Tue Apr 12 14:43:58 2011 +0200
@@ -6,6 +6,8 @@
 
 import com.esri.arcgis.carto.IFeatureRenderer;
 import com.esri.arcgis.display.ISymbol;
+import com.esri.arcgis.display.SimpleMarkerSymbol;
+import com.esri.arcgis.display.SimpleFillSymbol;
 import com.esri.arcgis.carto.SimpleRenderer;
 
 import org.w3c.dom.Element;
@@ -24,7 +26,7 @@
      * The logger.
      */
     private static final Logger logger =
-        Logger.getLogger(FeatureLayerReader.class);
+        Logger.getLogger(SimpleRendererReader.class);
 
     /**
      * Private member.
@@ -85,10 +87,18 @@
         rendererElement.setAttribute("description", renderer.getDescription());
         symbol = renderer.getSymbol();
         try{
-            ISymbolReader isr= new SimpleMarkerSymbolReader(symbol);
-            isr.setParent(rendererElement);
-            isr.setUtil(util);
-            isr.read();
+            if(symbol instanceof SimpleMarkerSymbol){
+                ISymbolReader isr= new SimpleMarkerSymbolReader(symbol);
+                isr.setParent(rendererElement);
+                isr.setUtil(util);
+                isr.read();
+            }
+            else if(symbol instanceof SimpleFillSymbol){
+                ISymbolReader isr = new SimpleFillSymbolReader(symbol);
+                isr.setParent(rendererElement);
+                isr.setUtil(util);
+                isr.read();
+            }
             return rendererElement;
         }
         catch(Exception e){
This site is hosted by Intevation GmbH (Datenschutzerklärung und Impressum | Privacy Policy and Imprint)