Mercurial > dive4elements > gnv-client
comparison gnv-artifacts/src/main/java/de/intevation/gnv/state/profile/horizontal/HorizontalProfileMeshOutputState.java @ 855:e26935963871
Adjusted chart titles of different horizontalprofile charts.
gnv-artifacts/trunk@973 c6561f87-3c4e-4783-a992-168aeb5c3f6f
author | Ingo Weinzierl <ingo.weinzierl@intevation.de> |
---|---|
date | Fri, 23 Apr 2010 12:11:18 +0000 |
parents | |
children | c9996913ff4b |
comparison
equal
deleted
inserted
replaced
854:bb2175726c8a | 855:e26935963871 |
---|---|
1 package de.intevation.gnv.state.profile.horizontal; | |
2 | |
3 import java.util.Locale; | |
4 | |
5 import org.apache.log4j.Logger; | |
6 | |
7 public class HorizontalProfileMeshOutputState | |
8 extends HorizontalProfileOutputState | |
9 { | |
10 private static Logger logger = | |
11 Logger.getLogger(HorizontalProfileMeshOutputState.class); | |
12 | |
13 | |
14 public HorizontalProfileMeshOutputState() { | |
15 super(); | |
16 } | |
17 | |
18 | |
19 /** | |
20 * Creates and returns the subtitle of a chart. | |
21 * | |
22 * @param locale The Locale used to adjust the language of the subtitle. | |
23 * @param uuid The UUID of the current artifact. | |
24 * @return the timeperiod of this chart and the start coordinate. | |
25 */ | |
26 @Override | |
27 protected String createChartSubtitle(Locale locale, String uuid) { | |
28 logger.debug("create chart subtitle."); | |
29 | |
30 StringBuilder sb = new StringBuilder(); | |
31 String time = getData(locale, "dateid"); | |
32 if (time != null) { | |
33 sb.append(time); | |
34 } | |
35 | |
36 String coordinate = getData(locale, "mesh_point"); | |
37 if (coordinate != null) { | |
38 if (time != null) | |
39 sb.append("\n"); | |
40 | |
41 sb.append(coordinate); | |
42 } | |
43 | |
44 String depth = getData(locale, "depthid"); | |
45 if (depth != null) { | |
46 if (coordinate != null) | |
47 sb.append("\n"); | |
48 | |
49 sb.append(depth); | |
50 } | |
51 | |
52 return sb.toString(); | |
53 } | |
54 } | |
55 // vim:set ts=4 sw=4 si et sta sts=4 fenc=utf8 : |