comparison src/java/de/intevation/mxd/reader/SimpleLineSymbolReader.java @ 62:e468cf8701ea

Prepared the converter to handle and write line symbols.
author Raimund Renkert <rrenkert@intevation.de>
date Tue, 24 May 2011 14:16:25 +0200
parents e00deee347a5
children 5ed9e720b6cd
comparison
equal deleted inserted replaced
61:e00deee347a5 62:e468cf8701ea
81 e.printStackTrace(); 81 e.printStackTrace();
82 return null; 82 return null;
83 } 83 }
84 84
85 symbolElement.setAttribute("name", symbol.getNameString()); 85 symbolElement.setAttribute("name", symbol.getNameString());
86 symbolElement.setAttribute("style", "line");
86 symbolElement.setAttribute("type", "simple"); 87 symbolElement.setAttribute("type", "simple");
87 if(symbol.getColor() instanceof IRgbColor) { 88 if(symbol.getColor() instanceof IRgbColor) {
88 IRgbColor color = (IRgbColor)symbol.getColor(); 89 IRgbColor color = (IRgbColor)symbol.getColor();
89 Color c = new Color ( 90 Color c = new Color (
90 color.getRed(), 91 color.getRed(),
105 symbolElement.setAttribute("width", String.valueOf(symbol.getWidth())); 106 symbolElement.setAttribute("width", String.valueOf(symbol.getWidth()));
106 107
107 int style = symbol.getStyle(); 108 int style = symbol.getStyle();
108 switch(style) { 109 switch(style) {
109 case esriSimpleLineStyle.esriSLSSolid: 110 case esriSimpleLineStyle.esriSLSSolid:
110 symbolElement.setAttribute("style", "solid"); break; 111 symbolElement.setAttribute("linestyle", "solid"); break;
111 case esriSimpleLineStyle.esriSLSDash: 112 case esriSimpleLineStyle.esriSLSDash:
112 symbolElement.setAttribute("style", "dash"); break; 113 symbolElement.setAttribute("linestyle", "dash"); break;
113 case esriSimpleLineStyle.esriSLSDot: 114 case esriSimpleLineStyle.esriSLSDot:
114 symbolElement.setAttribute("style", "dot"); break; 115 symbolElement.setAttribute("linestyle", "dot"); break;
115 case esriSimpleLineStyle.esriSLSDashDot: 116 case esriSimpleLineStyle.esriSLSDashDot:
116 symbolElement.setAttribute("style", "dashdot"); break; 117 symbolElement.setAttribute("linestyle", "dashdot"); break;
117 case esriSimpleLineStyle.esriSLSDashDotDot: 118 case esriSimpleLineStyle.esriSLSDashDotDot:
118 symbolElement.setAttribute("style", "dashdotdot"); break; 119 symbolElement.setAttribute("linestyle", "dashdotdot"); break;
119 default: symbolElement.setAttribute ("style", "none"); 120 default: symbolElement.setAttribute ("linestyle", "none");
120 } 121 }
121 return symbolElement; 122 return symbolElement;
122 } 123 }
123 } 124 }
124 // vim:set ts=4 sw=4 si et sta sts=4 fenc=utf8 : 125 // vim:set ts=4 sw=4 si et sta sts=4 fenc=utf8 :
This site is hosted by Intevation GmbH (Datenschutzerklärung und Impressum | Privacy Policy and Imprint)