Mercurial > mxd2map
comparison src/java/de/intevation/mxd/reader/SimpleFillSymbolReader.java @ 43:ef7ca23c4233
Added comments, done some code styling and removed typos.
author | Raimund Renkert <rrenkert@intevation.de> |
---|---|
date | Fri, 15 Apr 2011 15:44:54 +0200 |
parents | 472aa36d0e01 |
children | 686a88eb531d |
comparison
equal
deleted
inserted
replaced
42:395307e8b7ee | 43:ef7ca23c4233 |
---|---|
17 /** | 17 /** |
18 * Reads simple marker symbol information. | 18 * Reads simple marker symbol information. |
19 * | 19 * |
20 * @author <a href="mailto:raimund.renkert@intevation.de">Raimund Renkert</a> | 20 * @author <a href="mailto:raimund.renkert@intevation.de">Raimund Renkert</a> |
21 */ | 21 */ |
22 public class SimpleFillSymbolReader implements ISymbolReader{ | 22 public class SimpleFillSymbolReader |
23 implements ISymbolReader { | |
23 | 24 |
24 /** | 25 /** |
25 * The logger. | 26 * The logger. |
26 */ | 27 */ |
27 private static final Logger logger = | 28 private static final Logger logger = |
35 private MapToXMLUtils util; | 36 private MapToXMLUtils util; |
36 | 37 |
37 | 38 |
38 public SimpleFillSymbolReader(ISymbol symbol) throws Exception{ | 39 public SimpleFillSymbolReader(ISymbol symbol) throws Exception{ |
39 logger.debug("contructor()"); | 40 logger.debug("contructor()"); |
40 if(symbol instanceof SimpleFillSymbol) | 41 if(symbol instanceof SimpleFillSymbol) { |
41 this.symbol = (SimpleFillSymbol)symbol; | 42 this.symbol = (SimpleFillSymbol)symbol; |
42 else | 43 } |
44 else { | |
43 throw new Exception("Not a SimpleFillSymbol!"); | 45 throw new Exception("Not a SimpleFillSymbol!"); |
46 } | |
44 } | 47 } |
45 | 48 |
46 /** | 49 /** |
47 * Setter for the parent XML element. | 50 * Setter for the parent XML element. |
48 * | 51 * |
77 e.printStackTrace(); | 80 e.printStackTrace(); |
78 return null; | 81 return null; |
79 } | 82 } |
80 | 83 |
81 symbolElement.setAttribute("name", symbol.getNameString()); | 84 symbolElement.setAttribute("name", symbol.getNameString()); |
82 if(symbol.getStyle() == esriSimpleMarkerStyle.esriSMSCircle) | 85 if(symbol.getStyle() == esriSimpleMarkerStyle.esriSMSCircle) { |
83 symbolElement.setAttribute("style", "point"); | 86 symbolElement.setAttribute("style", "point"); |
87 } | |
84 | 88 |
85 if(symbol.getColor() instanceof IRgbColor) { | 89 if(symbol.getColor() instanceof IRgbColor) { |
86 IRgbColor color = (IRgbColor)symbol.getColor(); | 90 IRgbColor color = (IRgbColor)symbol.getColor(); |
87 symbolElement.setAttribute("color", "(" + color.getRed() + | 91 symbolElement.setAttribute("color", "(" + color.getRed() + |
88 "," + color.getGreen() + | 92 "," + color.getGreen() + |