Mercurial > dive4elements > river
changeset 2136:3a5ef4ac8e0f
'New Chart' for w-differences curve.
flys-artifacts/trunk@3712 c6561f87-3c4e-4783-a992-168aeb5c3f6f
author | Raimund Renkert <raimund.renkert@intevation.de> |
---|---|
date | Wed, 18 Jan 2012 16:54:09 +0000 |
parents | 77cdc344ef77 |
children | 04b6b6a4564d |
files | flys-artifacts/ChangeLog flys-artifacts/doc/conf/artifacts/chart.xml flys-artifacts/src/main/java/de/intevation/flys/artifacts/states/WDifferencesState.java |
diffstat | 3 files changed, 18 insertions(+), 0 deletions(-) [+] |
line wrap: on
line diff
--- a/flys-artifacts/ChangeLog Wed Jan 18 16:21:30 2012 +0000 +++ b/flys-artifacts/ChangeLog Wed Jan 18 16:54:09 2012 +0000 @@ -1,3 +1,12 @@ +2012-01-18 Raimund Renkert <raimund.renkert@intevation.de> + + 'New Chart' for w-differences curve. + + * doc/conf/artifacts/chart.xml: Added empty facet to output mode. + + * src/main/java/de/intevation/flys/artifacts/states/WDifferencesState.java: + Add an empty facet if the artifact is a ChartArtifact. + 2012-01-18 Raimund Renkert <raimund.renkert@intevation.de> 'New Chart' for discharge longitudinal section curve.
--- a/flys-artifacts/doc/conf/artifacts/chart.xml Wed Jan 18 16:21:30 2012 +0000 +++ b/flys-artifacts/doc/conf/artifacts/chart.xml Wed Jan 18 16:54:09 2012 +0000 @@ -52,6 +52,7 @@ <outputmodes> <outputmode name="w_differences" description="output.w_differences" mime-type="image/png" type="chart"> <facets> + <facet name="empty.facet" description="Empty"/> <facet name="longitudinal_section.q" description="facet.longitudinal_section.q"/> <facet name="longitudinal_section.w" description="facet.longitudinal_section.w"/> <facet name="w_differences" description="facet.w_differences"/>
--- a/flys-artifacts/src/main/java/de/intevation/flys/artifacts/states/WDifferencesState.java Wed Jan 18 16:21:30 2012 +0000 +++ b/flys-artifacts/src/main/java/de/intevation/flys/artifacts/states/WDifferencesState.java Wed Jan 18 16:54:09 2012 +0000 @@ -13,12 +13,15 @@ import de.intevation.flys.artifacts.FLYSArtifact; import de.intevation.flys.artifacts.StaticWKmsArtifact; import de.intevation.flys.artifacts.WINFOArtifact; +import de.intevation.flys.artifacts.ChartArtifact; import de.intevation.flys.artifacts.math.WKmsOperation; import de.intevation.flys.artifacts.model.CalculationResult; import de.intevation.flys.artifacts.model.DataFacet; import de.intevation.flys.artifacts.model.DifferenceCurveFacet; +import de.intevation.flys.artifacts.model.EmptyFacet; + import de.intevation.flys.artifacts.model.FacetTypes; import de.intevation.flys.artifacts.model.WKms; import de.intevation.flys.artifacts.model.WQKms; @@ -114,6 +117,11 @@ List<Facet> facets, Object old ) { + if (artifact instanceof ChartArtifact) { + ChartArtifact chart = (ChartArtifact)artifact; + facets.add(new EmptyFacet()); + return null; + } WINFOArtifact winfo = (WINFOArtifact) artifact; String id = getID();