Mercurial > dive4elements > river
comparison flys-artifacts/src/main/java/de/intevation/flys/artifacts/QSectorArtifact.java @ 3576:6442f317a0c7
i18n and renderering of qsectors in w/q diag.
flys-artifacts/trunk@5191 c6561f87-3c4e-4783-a992-168aeb5c3f6f
author | Felix Wolfsteller <felix.wolfsteller@intevation.de> |
---|---|
date | Fri, 10 Aug 2012 12:30:39 +0000 |
parents | 374c2d70b982 |
children | a66df8e8d3df |
comparison
equal
deleted
inserted
replaced
3575:e9c3285f2ee2 | 3576:6442f317a0c7 |
---|---|
10 import de.intevation.artifactdatabase.state.Facet; | 10 import de.intevation.artifactdatabase.state.Facet; |
11 | 11 |
12 import de.intevation.artifacts.Artifact; | 12 import de.intevation.artifacts.Artifact; |
13 import de.intevation.artifacts.ArtifactFactory; | 13 import de.intevation.artifacts.ArtifactFactory; |
14 import de.intevation.artifacts.CallMeta; | 14 import de.intevation.artifacts.CallMeta; |
15 import de.intevation.artifacts.CallContext; | |
15 | 16 |
16 import de.intevation.flys.artifacts.model.FacetTypes; | 17 import de.intevation.flys.artifacts.model.FacetTypes; |
17 import de.intevation.flys.artifacts.model.GaugeFinder; | 18 import de.intevation.flys.artifacts.model.GaugeFinder; |
18 import de.intevation.flys.artifacts.model.GaugeFinderFactory; | 19 import de.intevation.flys.artifacts.model.GaugeFinderFactory; |
19 import de.intevation.flys.artifacts.model.GaugeRange; | 20 import de.intevation.flys.artifacts.model.GaugeRange; |
21 | 22 |
22 import de.intevation.flys.artifacts.services.FixingsKMChartService; | 23 import de.intevation.flys.artifacts.services.FixingsKMChartService; |
23 | 24 |
24 import de.intevation.flys.artifacts.states.DefaultState; | 25 import de.intevation.flys.artifacts.states.DefaultState; |
25 | 26 |
27 import de.intevation.flys.artifacts.resources.Resources; | |
26 | 28 |
27 | 29 |
28 /** | 30 /** |
29 * Artifact to produce sector markers. | 31 * Artifact to produce sector markers. |
30 */ | 32 */ |
69 return ARTIFACT_NAME; | 71 return ARTIFACT_NAME; |
70 } | 72 } |
71 | 73 |
72 | 74 |
73 /** Get list of NamedDouble s (QSectors). */ | 75 /** Get list of NamedDouble s (QSectors). */ |
74 public Object getQSectors(double km) { | 76 public Object getQSectors(double km, CallContext context) { |
75 | 77 |
76 String river = getDataAsString("river"); | 78 String river = getDataAsString("river"); |
77 List<NamedDouble> qsectors = new ArrayList<NamedDouble>(); | 79 List<NamedDouble> qsectors = new ArrayList<NamedDouble>(); |
78 | 80 |
79 GaugeFinderFactory ggf = GaugeFinderFactory.getInstance(); | 81 GaugeFinderFactory ggf = GaugeFinderFactory.getInstance(); |
96 } | 98 } |
97 | 99 |
98 for (int i = 0; i < FixingsKMChartService.I18N_Q_SECTOR_BOARDERS.length; ++i) { | 100 for (int i = 0; i < FixingsKMChartService.I18N_Q_SECTOR_BOARDERS.length; ++i) { |
99 String key = FixingsKMChartService.I18N_Q_SECTOR_BOARDERS[i]; | 101 String key = FixingsKMChartService.I18N_Q_SECTOR_BOARDERS[i]; |
100 String def = FixingsKMChartService.DEFAULT_Q_SECTOR_BORDERS[i]; | 102 String def = FixingsKMChartService.DEFAULT_Q_SECTOR_BORDERS[i]; |
101 String label = "label";//Resources.getMsg(meta, key, def); | 103 String label = Resources.getMsg(context.getMeta(), key, def); |
102 | 104 |
103 qsectors.add(new NamedDouble(label, gr.getSectorBorder(i))); | 105 qsectors.add(new NamedDouble(label, gr.getSectorBorder(i))); |
104 } | 106 } |
105 | 107 |
106 return qsectors; | 108 return qsectors; |