comparison gnv-artifacts/src/main/java/de/intevation/gnv/state/timeseries/TimeSeriesOutputState.java @ 492:79e80c289018

Added labels and titles to 'Profilschnitt' charts. gnv-artifacts/trunk@569 c6561f87-3c4e-4783-a992-168aeb5c3f6f
author Ingo Weinzierl <ingo.weinzierl@intevation.de>
date Tue, 19 Jan 2010 10:06:03 +0000
parents 20dde2b6f1b5
children 4080b57dcb52
comparison
equal deleted inserted replaced
491:cbb6b592bc6f 492:79e80c289018
243 243
244 Collection parameters = this.getCleanedParameters(uuid); 244 Collection parameters = this.getCleanedParameters(uuid);
245 Collection measurements = this.getMeasurements(uuid); 245 Collection measurements = this.getMeasurements(uuid);
246 Collection dates = this.getDates(uuid); 246 Collection dates = this.getDates(uuid);
247 247
248 ChartLabels chartLables = new ChartLabels( 248 ChartLabels chartLables = createChartLabels(locale, uuid);
249 createChartTitle(locale, uuid),
250 createChartSubtitle(locale, uuid),
251 RessourceFactory.getInstance().getRessource(
252 locale,
253 domainLable,
254 domainLable
255 )
256 );
257 249
258 String exportFormat = getExportFormat(mimeType); 250 String exportFormat = getExportFormat(mimeType);
259 251
260 // TODO Remove this and parse input data 252 // TODO Remove this and parse input data
261 boolean linesVisible = true; 253 boolean linesVisible = true;
764 GNVArtifactContext.CHART_TEMPLATE_KEY); 756 GNVArtifactContext.CHART_TEMPLATE_KEY);
765 757
766 return theme; 758 return theme;
767 } 759 }
768 760
761 protected ChartLabels createChartLabels(Locale locale, String uuid) {
762 return new ChartLabels(
763 createChartTitle(locale, uuid),
764 createChartSubtitle(locale, uuid),
765 RessourceFactory.getInstance().getRessource(
766 locale,
767 domainLable,
768 domainLable
769 )
770 );
771 }
772
769 773
770 protected String createChartTitle(Locale locale, String uuid) { 774 protected String createChartTitle(Locale locale, String uuid) {
771 return getFisName(locale); 775 return getFisName(locale);
772 776
773 } 777 }
790 value, 794 value,
791 value 795 value
792 ); 796 );
793 } 797 }
794 return returnValue; 798 return returnValue;
799 }
800
801
802 protected String getSelectedInputDataName(String uuid, String key) {
803 Collection values = getCollection(key, uuid);
804
805 if (values != null) {
806 Iterator it = values.iterator();
807
808 while (it.hasNext()) {
809 KeyValueDescibeData data = (KeyValueDescibeData) it.next();
810
811 if (data.isSelected()) {
812 return data.getValue();
813 }
814 }
815 }
816 return null;
795 } 817 }
796 818
797 819
798 protected Collection<KeyValueDescibeData> getParameters(String uuid) { 820 protected Collection<KeyValueDescibeData> getParameters(String uuid) {
799 return this.getCollection(parameterValuesName, uuid); 821 return this.getCollection(parameterValuesName, uuid);

http://dive4elements.wald.intevation.org