Mercurial > dive4elements > river
comparison artifacts/src/main/java/org/dive4elements/river/exports/fixings/FixWQCurveGenerator.java @ 7259:a36e26abcf54
issue1490: Translate other points as well, when at gauge.
author | Felix Wolfsteller <felix.wolfsteller@intevation.de> |
---|---|
date | Tue, 08 Oct 2013 11:49:28 +0200 |
parents | 0e6b399e72f9 |
children | 0b32f8980fed |
comparison
equal
deleted
inserted
replaced
7258:0e6b399e72f9 | 7259:a36e26abcf54 |
---|---|
644 new ArrayList<XYTextAnnotation>(qws.length); | 644 new ArrayList<XYTextAnnotation>(qws.length); |
645 | 645 |
646 DateFormat dateFormat = DateFormat.getDateInstance( | 646 DateFormat dateFormat = DateFormat.getDateInstance( |
647 DateFormat.SHORT); | 647 DateFormat.SHORT); |
648 | 648 |
649 double gaugeDatum = getCurrentGaugeDatum(); | |
650 double factor = (gaugeDatum == 0d) ? 1d : 100d; | |
649 for (QWI qw: qws) { | 651 for (QWI qw: qws) { |
650 series.add(qw.getQ(), qw.getW(), false); | 652 series.add(qw.getQ(), factor*(qw.getW()-gaugeDatum), false); |
651 | 653 |
652 XYTextAnnotation anno = new CollisionFreeXYTextAnnotation( | 654 XYTextAnnotation anno = new CollisionFreeXYTextAnnotation( |
653 dateFormat.format(qw.getDate()), | 655 dateFormat.format(qw.getDate()), |
654 qw.getQ(), | 656 qw.getQ(), |
655 qw.getW()); | 657 factor*(qw.getW()-gaugeDatum)); |
656 textAnnos.add(anno); | 658 textAnnos.add(anno); |
657 } | 659 } |
658 | 660 |
659 addAxisSeries(series, YAXIS.W.idx, visible); | 661 if (gaugeDatum == 0d) { |
662 addAxisSeries(series, YAXIS.W.idx, visible); | |
663 } | |
664 else { | |
665 addAxisSeries(series, YAXIS.WCm.idx, visible); | |
666 } | |
660 if (visible && theme.parseShowPointLabel()) { | 667 if (visible && theme.parseShowPointLabel()) { |
661 RiverAnnotation flysAnno = | 668 RiverAnnotation flysAnno = |
662 new RiverAnnotation(null, null, null, theme); | 669 new RiverAnnotation(null, null, null, theme); |
663 flysAnno.setTextAnnotations(textAnnos); | 670 flysAnno.setTextAnnotations(textAnnos); |
664 addAnnotations(flysAnno); | 671 addAnnotations(flysAnno); |