Mercurial > dive4elements > river
changeset 1042:8873c43119ca
Fix rendering of Annotations/lines under certain zooming conditions, ChangeLog.
flys-artifacts/trunk@2503 c6561f87-3c4e-4783-a992-168aeb5c3f6f
author | Felix Wolfsteller <felix.wolfsteller@intevation.de> |
---|---|
date | Thu, 18 Aug 2011 14:09:54 +0000 |
parents | c3902ff2d3bd |
children | 9c0f981cd22d |
files | flys-artifacts/ChangeLog flys-artifacts/src/main/java/de/intevation/flys/jfree/StickyAxisAnnotation.java |
diffstat | 2 files changed, 25 insertions(+), 3 deletions(-) [+] |
line wrap: on
line diff
--- a/flys-artifacts/ChangeLog Thu Aug 18 13:46:10 2011 +0000 +++ b/flys-artifacts/ChangeLog Thu Aug 18 14:09:54 2011 +0000 @@ -1,3 +1,22 @@ +2011-08-18 Felix Wolfsteller <felix.wolfsteller@intevation.de> + + * src/main/java/de/intevation/flys/jfree/StickyAxisAnnotation.java: + Fix issues with lines of annotation when zoomed (wrong scale used). + +2011-08-18 Felix Wolfsteller <felix.wolfsteller@intevation.de> + + Added legend for annotations to LongitudinalSectionDiagram. + + * src/main/java/de/intevation/flys/exports/LongitudinalSectionGenerator.java: + Added a pseudo-dataseries/collection to employ existing infrastructure for + displaying localized label for Annotations (yet unthemed). + + * src/main/resources/messages.properties, + src/main/resources/messages_de_DE.properties, + src/main/resources/messages_en.properties, + src/main/resources/messages_de.properties: + Made label-string available for localization. + 2011-08-17 Felix Wolfsteller <felix.wolfsteller@intevation.de> Moved StickyAxisAnnotation into new package de.intevation.flys.jfree .
--- a/flys-artifacts/src/main/java/de/intevation/flys/jfree/StickyAxisAnnotation.java Thu Aug 18 13:46:10 2011 +0000 +++ b/flys-artifacts/src/main/java/de/intevation/flys/jfree/StickyAxisAnnotation.java Thu Aug 18 14:09:54 2011 +0000 @@ -118,9 +118,12 @@ g2.setStroke(this.stroke); */ j2DY1 = (float) RectangleEdge.coordinate(dataArea, domainEdge); - j2DY2 = j2DY1 - 0.10f * (float) - (rangeAxis.getRange().getUpperBound() - - rangeAxis.getRange().getLowerBound()); + double rangeLow = rangeAxis.getRange().getLowerBound(); + // Line ends at 1.5% of full distance. + j2DY2 = (float) rangeAxis.valueToJava2D( + (1f - 0.015f) * rangeLow + 0.015f * + rangeAxis.getRange().getUpperBound(), + dataArea, rangeEdge); j2DX1 = (float) domainAxis.valueToJava2D(x, dataArea, domainEdge); j2DX2 = j2DX1;