comparison flys-artifacts/src/main/java/de/intevation/flys/exports/CrossSectionGenerator.java @ 2152:2336927cb096

Add basic (text) styling for HYKS. flys-artifacts/trunk@3734 c6561f87-3c4e-4783-a992-168aeb5c3f6f
author Felix Wolfsteller <felix.wolfsteller@intevation.de>
date Fri, 20 Jan 2012 08:38:50 +0000
parents c5d24e0587ce
children e0add4b2d4bc
comparison
equal deleted inserted replaced
2151:eb1a676c0d6e 2152:2336927cb096
199 * 199 *
200 * @param seriesName name of the data (line) to display in legend. 200 * @param seriesName name of the data (line) to display in legend.
201 * @param theme Theme for the data series. 201 * @param theme Theme for the data series.
202 */ 202 */
203 protected void doCrossSectionWaterLineOut( 203 protected void doCrossSectionWaterLineOut(
204 Object o, 204 Object o,
205 String seriesName, 205 String seriesName,
206 Document theme, 206 Document theme,
207 boolean visible 207 boolean visible
208 ) { 208 ) {
209 logger.debug("CrossSectionGenerator.doCrossSectionWaterLineOut"); 209 logger.debug("CrossSectionGenerator.doCrossSectionWaterLineOut");
210 210
211 // DO NOT SORT DATA! This destroys the gaps indicated by NaNs 211 // DO NOT SORT DATA! This destroys the gaps indicated by NaNs
212 XYSeries series = new StyledXYSeries(seriesName, false, theme); 212 XYSeries series = new StyledXYSeries(seriesName, false, theme);
217 } 217 }
218 218
219 219
220 /** Add HYK-Annotations (colorize and label some areas, draw lines. */ 220 /** Add HYK-Annotations (colorize and label some areas, draw lines. */
221 protected void doHyk( 221 protected void doHyk(
222 Object o, 222 Object o,
223 String seriesName, 223 String seriesName,
224 Document theme, 224 Document theme,
225 boolean visible 225 boolean visible
226 ) { 226 ) {
227 logger.debug("CrossSectionGenerator.doHyk"); 227 logger.debug("CrossSectionGenerator.doHyk");
228
229 // TODO there is some style information for the text at least.
230 228
231 List<HYKFactory.Zone> zones = (List<HYKFactory.Zone>) o; 229 List<HYKFactory.Zone> zones = (List<HYKFactory.Zone>) o;
232 230
233 if (zones.size() == 0) { 231 if (zones.size() == 0) {
234 logger.debug("CrossSectionGenerator.doHYK: empty zone list received."); 232 logger.debug("CrossSectionGenerator.doHYK: empty zone list received.");
235 } 233 }
236 234
237 addAnnotations(new FLYSAnnotation("HYK Zones", null, zones), visible); 235 // Actual Styling is done in XYChartGenerator.
236 addAnnotations(new FLYSAnnotation(seriesName, null, zones, theme), visible);
238 } 237 }
239 238
240 239
241 /** 240 /**
242 * Do cross sections out. 241 * Do cross sections out.
243 * 242 *
244 * @param seriesName name of the data (line) to display in legend. 243 * @param seriesName name of the data (line) to display in legend.
245 * @param theme Theme for the data series. 244 * @param theme Theme for the data series.
246 */ 245 */
247 protected void doCrossSectionOut( 246 protected void doCrossSectionOut(
248 Object o, 247 Object o,
249 String seriesName, 248 String seriesName,
250 Document theme, 249 Document theme,
251 boolean visible 250 boolean visible
252 ) { 251 ) {
253 logger.debug("CrossSectionGenerator.doCrossSectionOut"); 252 logger.debug("CrossSectionGenerator.doCrossSectionOut");
254 253
255 XYSeries series = new StyledXYSeries(seriesName, theme); 254 XYSeries series = new StyledXYSeries(seriesName, theme);
256 255

http://dive4elements.wald.intevation.org