comparison src/java/de/intevation/mxd/reader/ClassBreakRendererReader.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 b41fcf268827
children 7eba97e8201b
comparison
equal deleted inserted replaced
72:2cbe423b1fda 73:acbe36fb45e0
89 } 89 }
90 rendererElement.setAttribute( 90 rendererElement.setAttribute(
91 "min_value", 91 "min_value",
92 String.valueOf(renderer.getMinimumBreak())); 92 String.valueOf(renderer.getMinimumBreak()));
93 rendererElement.setAttribute("expression_operator", "<="); 93 rendererElement.setAttribute("expression_operator", "<=");
94
94 ISymbol sym = renderer.getSymbol(i); 95 ISymbol sym = renderer.getSymbol(i);
95 ISymbolReader symReader; 96 MarkerSymbolReader markerReader = new MarkerSymbolReader();
96 if(sym instanceof SimpleFillSymbol) { 97 LineSymbolReader lineReader = new LineSymbolReader();
97 symReader = new SimpleFillSymbolReader(renderer.getSymbol(i)); 98 FillSymbolReader fillReader = new FillSymbolReader();
98 symReader.setUtil(util); 99 if(markerReader.canRead(sym)) {
99 symReader.setParent(rendererElement); 100 markerReader.setSymbol(sym);
100 symReader.read(); 101 markerReader.setUtil(util);
102 markerReader.setParent(rendererElement);
103 markerReader.read();
101 } 104 }
102 else if(sym instanceof SimpleMarkerSymbol) { 105 else if(lineReader.canRead(sym)) {
103 symReader = new SimpleMarkerSymbolReader(renderer.getSymbol(i)); 106 lineReader.setSymbol(sym);
104 symReader.setUtil(util); 107 lineReader.setUtil(util);
105 symReader.setParent(rendererElement); 108 lineReader.setParent(rendererElement);
106 symReader.read(); 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();
107 } 116 }
108 else { 117 else {
109 logger.debug("Not a known symbol type: " + 118 logger.debug("Not a known symbol type: " +
110 sym.getClass().toString()); 119 sym.getClass().toString());
111 } 120 }
This site is hosted by Intevation GmbH (Datenschutzerklärung und Impressum | Privacy Policy and Imprint)