comparison src/java/de/intevation/mxd/reader/MultiLayerMarkerSymbolReader.java @ 70:6d181c02efce

Added wrapper for marker symbol reader and extracted methods from symbol readers.
author Raimund Renkert <rrenkert@intevation.de>
date Thu, 26 May 2011 14:28:52 +0200
parents 5c5ef5768893
children 7eba97e8201b
comparison
equal deleted inserted replaced
69:b41fcf268827 70:6d181c02efce
1 package de.intevation.mxd.reader; 1 package de.intevation.mxd.reader;
2 2
3 import java.io.IOException; 3 import java.io.IOException;
4
5 import java.awt.Color;
6 4
7 import org.apache.log4j.Logger; 5 import org.apache.log4j.Logger;
8 6
9 import com.esri.arcgis.display.ISymbol; 7 import com.esri.arcgis.display.ISymbol;
10 import com.esri.arcgis.display.IMarkerSymbol; 8 import com.esri.arcgis.display.IMarkerSymbol;
11 import com.esri.arcgis.display.MultiLayerMarkerSymbol; 9 import com.esri.arcgis.display.MultiLayerMarkerSymbol;
12 import com.esri.arcgis.display.ArrowMarkerSymbol;
13 import com.esri.arcgis.display.CharacterMarkerSymbol;
14 import com.esri.arcgis.display.PictureMarkerSymbol;
15
16 import com.esri.arcgis.display.IColor;
17 import com.esri.arcgis.display.RgbColor;
18 10
19 import org.w3c.dom.Element; 11 import org.w3c.dom.Element;
20 import de.intevation.mxd.utils.MapToXMLUtils; 12 import de.intevation.mxd.utils.MapToXMLUtils;
21 13
22 /** 14 /**
90 throws IOException { 82 throws IOException {
91 logger.debug("read()"); 83 logger.debug("read()");
92 for(int i = 0; i < symbol.getLayerCount(); i++) { 84 for(int i = 0; i < symbol.getLayerCount(); i++) {
93 try { 85 try {
94 ISymbol sym = (ISymbol)symbol.getLayer(i); 86 ISymbol sym = (ISymbol)symbol.getLayer(i);
95 87 ISymbolReader sreader = new MarkerSymbolReader(sym);
96 if(sym instanceof ArrowMarkerSymbol) { 88 sreader.setParent(renderer);
97 ISymbolReader sreader = new ArrowMarkerSymbolReader(sym); 89 sreader.setUtil(util);
98 sreader.setParent(renderer); 90 sreader.read();
99 sreader.setUtil(util);
100 sreader.read();
101 }
102 else if(sym instanceof CharacterMarkerSymbol) {
103 ISymbolReader sreader = new CharacterMarkerSymbolReader(sym);
104 sreader.setParent(renderer);
105 sreader.setUtil(util);
106 sreader.read();
107 }
108 else if(sym instanceof PictureMarkerSymbol) {
109 ISymbolReader sreader = new PictureMarkerSymbolReader(sym);
110 sreader.setParent(renderer);
111 sreader.setUtil(util);
112 sreader.read();
113 }
114 else {
115 logger.debug("The type of " + sym.getClass().toString() +
116 " is not implemented!");
117 System.out.println(
118 "No known instance: " + sym.getClass().toString());
119 }
120 } 91 }
121 catch(Exception e) { 92 catch(Exception e) {
122 e.printStackTrace(); 93 e.printStackTrace();
123 } 94 }
124 } 95 }
This site is hosted by Intevation GmbH (Datenschutzerklärung und Impressum | Privacy Policy and Imprint)