Mercurial > dive4elements > river
comparison flys-artifacts/src/main/java/de/intevation/flys/exports/CrossSectionGenerator.java @ 2006:5aecebcc4698
Add area dataseries when facet delivers one.
flys-artifacts/trunk@3448 c6561f87-3c4e-4783-a992-168aeb5c3f6f
author | Felix Wolfsteller <felix.wolfsteller@intevation.de> |
---|---|
date | Fri, 16 Dec 2011 14:48:14 +0000 |
parents | 156304542edf |
children | 4f7f781e4481 |
comparison
equal
deleted
inserted
replaced
2005:79b15491177a | 2006:5aecebcc4698 |
---|---|
146 artifactFacet.getData(context), | 146 artifactFacet.getData(context), |
147 artifactFacet.getFacetDescription(), | 147 artifactFacet.getFacetDescription(), |
148 attr, | 148 attr, |
149 visible); | 149 visible); |
150 } | 150 } |
151 else if (name.equals(AREA)) { | |
152 doArea(artifactFacet.getData(context), | |
153 artifactFacet.getFacetDescription(), | |
154 attr, | |
155 visible); | |
156 } | |
151 else { | 157 else { |
152 logger.warn("CrossSection.doOut: Unknown facet name: " + name); | 158 logger.warn("CrossSection.doOut: Unknown facet name: " + name); |
153 return; | 159 return; |
154 } | 160 } |
155 } | 161 } |
156 | 162 |
163 /** | |
164 * Do Area out. | |
165 */ | |
166 protected void doArea( | |
167 Object o, | |
168 String seriesName, | |
169 Document theme, | |
170 boolean visible | |
171 ) { | |
172 logger.debug("CrossSectionGenerator.doArea"); | |
173 | |
174 // TODO make this more stable. | |
175 Object[] doubles = (Object[]) o; | |
176 XYSeries up = new StyledXYSeries("up", false, theme); | |
177 XYSeries down = new StyledXYSeries("down", false, theme); | |
178 StyledSeriesBuilder.addPoints(up, (double [][]) doubles[0]); | |
179 StyledSeriesBuilder.addPoints(down, (double [][]) doubles[1]); | |
180 addAreaSeries(up, down, 0, visible); | |
181 } | |
157 | 182 |
158 /** | 183 /** |
159 * Do cross sections waterline out. | 184 * Do cross sections waterline out. |
160 * | 185 * |
161 * @param seriesName name of the data (line) to display in legend. | 186 * @param seriesName name of the data (line) to display in legend. |