Mercurial > mxd2map
comparison src/java/de/intevation/mxd/reader/UniqueValueRendererReader.java @ 73:acbe36fb45e0
Use the wrapper in the renderer reader to read symbols.
author | Raimund Renkert <rrenkert@intevation.de> |
---|---|
date | Thu, 26 May 2011 17:29:09 +0200 |
parents | 6d181c02efce |
children | 7eba97e8201b |
comparison
equal
deleted
inserted
replaced
72:2cbe423b1fda | 73:acbe36fb45e0 |
---|---|
89 rendererElement.setAttribute( | 89 rendererElement.setAttribute( |
90 "expression_field_" + j, | 90 "expression_field_" + j, |
91 renderer.getField(j)); | 91 renderer.getField(j)); |
92 } | 92 } |
93 rendererElement.setAttribute("expression_operator", "="); | 93 rendererElement.setAttribute("expression_operator", "="); |
94 ISymbol symbol = renderer.getSymbol(value); | 94 |
95 ISymbolReader symbolReader = new MarkerSymbolReader(symbol); | 95 ISymbol sym = renderer.getSymbol(value); |
96 symbolReader.setUtil(util); | 96 MarkerSymbolReader markerReader = new MarkerSymbolReader(); |
97 symbolReader.setParent(rendererElement); | 97 LineSymbolReader lineReader = new LineSymbolReader(); |
98 symbolReader.read (); | 98 FillSymbolReader fillReader = new FillSymbolReader(); |
99 if(markerReader.canRead(sym)) { | |
100 markerReader.setSymbol(sym); | |
101 markerReader.setUtil(util); | |
102 markerReader.setParent(rendererElement); | |
103 markerReader.read(); | |
104 } | |
105 else if(lineReader.canRead(sym)) { | |
106 lineReader.setSymbol(sym); | |
107 lineReader.setUtil(util); | |
108 lineReader.setParent(rendererElement); | |
109 lineReader.read(); | |
110 } | |
111 else if(fillReader.canRead(sym)) { | |
112 fillReader.setSymbol(sym); | |
113 fillReader.setUtil(util); | |
114 fillReader.setParent(rendererElement); | |
115 fillReader.read(); | |
116 } | |
117 else { | |
118 logger.debug("Not a known symbol type: " + | |
119 sym.getClass().toString()); | |
120 } | |
99 } | 121 } |
100 catch(Exception e) { | 122 catch(Exception e) { |
101 e.printStackTrace(); | 123 e.printStackTrace(); |
102 return null; | 124 return null; |
103 } | 125 } |