Mercurial > dive4elements > gnv-client
diff 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 |
line wrap: on
line diff
--- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/gnv-artifacts/src/main/java/de/intevation/gnv/state/profile/horizontal/HorizontalProfileMeshOutputState.java Fri Apr 23 12:11:18 2010 +0000 @@ -0,0 +1,55 @@ +package de.intevation.gnv.state.profile.horizontal; + +import java.util.Locale; + +import org.apache.log4j.Logger; + +public class HorizontalProfileMeshOutputState +extends HorizontalProfileOutputState +{ + private static Logger logger = + Logger.getLogger(HorizontalProfileMeshOutputState.class); + + + public HorizontalProfileMeshOutputState() { + super(); + } + + + /** + * Creates and returns the subtitle of a chart. + * + * @param locale The Locale used to adjust the language of the subtitle. + * @param uuid The UUID of the current artifact. + * @return the timeperiod of this chart and the start coordinate. + */ + @Override + protected String createChartSubtitle(Locale locale, String uuid) { + logger.debug("create chart subtitle."); + + StringBuilder sb = new StringBuilder(); + String time = getData(locale, "dateid"); + if (time != null) { + sb.append(time); + } + + String coordinate = getData(locale, "mesh_point"); + if (coordinate != null) { + if (time != null) + sb.append("\n"); + + sb.append(coordinate); + } + + String depth = getData(locale, "depthid"); + if (depth != null) { + if (coordinate != null) + sb.append("\n"); + + sb.append(depth); + } + + return sb.toString(); + } +} +// vim:set ts=4 sw=4 si et sta sts=4 fenc=utf8 :