Mercurial > dive4elements > river
comparison artifacts/src/main/java/org/dive4elements/river/exports/LongitudinalSectionGenerator2.java @ 7877:43f18dc56c5a
Fixed subtitle handling and added flowvelocity subtitle.
author | Raimund Renkert <rrenkert@intevation.de> |
---|---|
date | Fri, 16 May 2014 10:55:59 +0200 |
parents | ad4a3980092f |
children | cfb3a4d0c637 |
comparison
equal
deleted
inserted
replaced
7876:5951d6430ade | 7877:43f18dc56c5a |
---|---|
61 * done so difficult and if it really must be done for every | 61 * done so difficult and if it really must be done for every |
62 * facet. At least it has to be done _before_ the super class | 62 * facet. At least it has to be done _before_ the super class |
63 * actually does the output and accesses the facet data. | 63 * actually does the output and accesses the facet data. |
64 */ | 64 */ |
65 D4EArtifact artifact = (D4EArtifact)bundle.getArtifact(); | 65 D4EArtifact artifact = (D4EArtifact)bundle.getArtifact(); |
66 | 66 if (context.getContextValue("bounds_defined") != null && |
67 (Boolean)context.getContextValue("bounds_defined")) { | |
68 super.doOut(bundle, theme, visible); | |
69 return; | |
70 } | |
67 if (getXBounds(0) != null && getDomainAxisRange() != null) { | 71 if (getXBounds(0) != null && getDomainAxisRange() != null) { |
68 Bounds bounds = | 72 Bounds bounds = |
69 calculateZoom(getXBounds(0), getDomainAxisRange()); | 73 calculateZoom(getXBounds(0), getDomainAxisRange()); |
70 context.putContextValue("startkm", bounds.getLower()); | 74 context.putContextValue("startkm", bounds.getLower()); |
71 context.putContextValue("endkm", bounds.getUpper()); | 75 context.putContextValue("endkm", bounds.getUpper()); |
76 context.putContextValue("bounds_defined", true); | |
72 } | 77 } |
73 else if (getXBounds(0) != null && getDomainAxisRange() == null) { | 78 else if (getXBounds(0) != null && getDomainAxisRange() == null) { |
74 context.putContextValue("startkm", getXBounds(0).getLower()); | 79 context.putContextValue("startkm", getXBounds(0).getLower()); |
75 context.putContextValue("endkm", getXBounds(0).getUpper()); | 80 context.putContextValue("endkm", getXBounds(0).getUpper()); |
81 context.putContextValue("bounds_defined", true); | |
76 } | 82 } |
77 else if (getXBounds(0) == null && getDomainAxisRange() == null) { | 83 else if (getXBounds(0) == null && getDomainAxisRange() == null) { |
78 RangeAccess access = new RangeAccess(artifact); | 84 RangeAccess access = new RangeAccess(artifact); |
79 if (access.hasFrom() && access.hasTo()) { | 85 if (access.hasFrom() && access.hasTo()) { |
80 context.putContextValue("startkm", access.getFrom()); | 86 context.putContextValue("startkm", access.getFrom()); |
81 context.putContextValue("endkm", access.getTo()); | 87 context.putContextValue("endkm", access.getTo()); |
88 context.putContextValue("bounds_defined", true); | |
82 } | 89 } |
83 } | 90 } |
84 else if (getXBounds(0) == null && getDomainAxisRange() != null){ | 91 else if (getXBounds(0) == null && getDomainAxisRange() != null){ |
85 RangeAccess access = new RangeAccess(artifact); | 92 RangeAccess access = new RangeAccess(artifact); |
86 if (access.hasFrom() && access.hasTo()) { | 93 if (access.hasFrom() && access.hasTo()) { |
87 Bounds b = new DoubleBounds(access.getFrom(), access.getTo()); | 94 Bounds b = new DoubleBounds(access.getFrom(), access.getTo()); |
88 Bounds bounds = | 95 Bounds bounds = |
89 calculateZoom(b, getDomainAxisRange()); | 96 calculateZoom(b, getDomainAxisRange()); |
90 context.putContextValue("startkm", bounds.getLower()); | 97 context.putContextValue("startkm", bounds.getLower()); |
91 context.putContextValue("endkm", bounds.getUpper()); | 98 context.putContextValue("endkm", bounds.getUpper()); |
99 context.putContextValue("bounds_defined", true); | |
92 } | 100 } |
93 } | 101 } |
94 super.doOut(bundle, theme, visible); | 102 super.doOut(bundle, theme, visible); |
95 } | 103 } |
96 } | 104 } |