Mercurial > dive4elements > river
changeset 1719:62983d0ced51
Fix missing annotations ('Streckenfavoriten') style.
flys-artifacts/trunk@3000 c6561f87-3c4e-4783-a992-168aeb5c3f6f
author | Felix Wolfsteller <felix.wolfsteller@intevation.de> |
---|---|
date | Tue, 18 Oct 2011 10:26:27 +0000 |
parents | defe2cfeefa5 |
children | fa932d618989 |
files | flys-artifacts/ChangeLog flys-artifacts/doc/conf/themes.xml flys-artifacts/src/main/java/de/intevation/flys/exports/LongitudinalSectionGenerator.java |
diffstat | 3 files changed, 28 insertions(+), 3 deletions(-) [+] |
line wrap: on
line diff
--- a/flys-artifacts/ChangeLog Mon Oct 17 16:04:14 2011 +0000 +++ b/flys-artifacts/ChangeLog Tue Oct 18 10:26:27 2011 +0000 @@ -1,3 +1,12 @@ +2011-10-18 Felix Wolfsteller <felix.wolfsteller@intevation.de> + + Fix issue that Annotations do not come with theme/style. + + * doc/conf/themes.xml: Added "Annotations" default style. + + * src/main/java/de/intevation/flys/exports/LongitudinalSectionGenerator.java: + Set style of annotations, minor cosmetics. + 2011-10-17 Sascha L. Teichmann <sascha.teichmann@intevation.de> * src/main/java/de/intevation/flys/collections/FLYSArtifactCollection.java:
--- a/flys-artifacts/doc/conf/themes.xml Mon Oct 17 16:04:14 2011 +0000 +++ b/flys-artifacts/doc/conf/themes.xml Tue Oct 18 10:26:27 2011 +0000 @@ -144,6 +144,17 @@ </theme> + <!-- Annotations --> + <theme name="Annotations"> + <inherits> + <inherit from="HiddenColorLines"/> + </inherits> + <fields> + <field name="linecolor" type="Color" display="Linienfarbe" default="0, 0, 0"/> + </fields> + </theme> + + <!-- Virtual themes are following now! --> <theme name="Lines" type="virtual"> <fields> @@ -174,7 +185,6 @@ </theme> - <!-- Mappings are following now. A mapping maps between a name of a facet and a theme. --> <mappings> @@ -191,5 +201,6 @@ <mapping from="discharge_longitudinal_section.q" to="DischargeLongitudinalSectionQ"/> <mapping from="computed_discharge_curve.mainvalues.q" to="ComputedDischargeCurveQ"/> <mapping from="computed_discharge_curve.mainvalues.w" to="ComputedDischargeCurveW"/> + <mapping from="longitudinal_section.annotations" to="Annotations"/> </mappings> </themes>
--- a/flys-artifacts/src/main/java/de/intevation/flys/exports/LongitudinalSectionGenerator.java Mon Oct 17 16:04:14 2011 +0000 +++ b/flys-artifacts/src/main/java/de/intevation/flys/exports/LongitudinalSectionGenerator.java Tue Oct 18 10:26:27 2011 +0000 @@ -6,9 +6,9 @@ import org.jfree.chart.JFreeChart; import org.jfree.chart.axis.NumberAxis; +import org.jfree.chart.title.TextTitle; import org.jfree.chart.axis.ValueAxis; import org.jfree.chart.plot.XYPlot; -import org.jfree.chart.title.TextTitle; import org.jfree.data.Range; import org.jfree.data.xy.XYSeries; @@ -117,9 +117,12 @@ @Override protected void addSubtitles(JFreeChart chart) { double[] dist = getRange(); + Object[] args = new Object[] { getRiverName(), + dist[0], + dist[1] }; @@ -265,7 +268,7 @@ doQOut((WQKms) f.getData(artifact, context), facet, attr, visible); } else if (name.equals(LONGITUDINAL_ANNOTATION)) { - doAnnotationsOut(f.getData(artifact, context), facet, attr,visible); + doAnnotationsOut(f.getData(artifact, context), facet, attr, visible); } else { logger.warn("Unknown facet name: " + name); @@ -293,7 +296,9 @@ logger.debug("LongitudinalSectionGenerator.doAnnotationsOut"); // Add all annotations in list o to our annotation pool. + // TODO Duplicate in ComputedDischartgeCurveGenerator, merge FLYSAnnotation fa = (FLYSAnnotation) o; + fa.setTheme(theme); fa.setLabel(facet.getDescription()); addAnnotations(fa, visible); }