Mercurial > dive4elements > river
comparison flys-artifacts/src/main/java/de/intevation/flys/jfree/StableXYDifferenceRenderer.java @ 3076:5642a83420f2
FLYS artifacts: Removed trailing whitespace.
flys-artifacts/trunk@4670 c6561f87-3c4e-4783-a992-168aeb5c3f6f
author | Sascha L. Teichmann <sascha.teichmann@intevation.de> |
---|---|
date | Fri, 15 Jun 2012 09:30:07 +0000 |
parents | b75681c09ef8 |
children | e3c70271d50f |
comparison
equal
deleted
inserted
replaced
3075:db9e2bb34707 | 3076:5642a83420f2 |
---|---|
278 /** Get font with which label is painted. */ | 278 /** Get font with which label is painted. */ |
279 public Font getLabelFont() { | 279 public Font getLabelFont() { |
280 return this.labelFont; | 280 return this.labelFont; |
281 } | 281 } |
282 | 282 |
283 | 283 |
284 /** Set color with which to paint label. */ | 284 /** Set color with which to paint label. */ |
285 public void setLabelColor(Color color) { | 285 public void setLabelColor(Color color) { |
286 this.labelColor = color; | 286 this.labelColor = color; |
287 } | 287 } |
288 | 288 |
635 if (ni == N && nj == M) { // no more splits | 635 if (ni == N && nj == M) { // no more splits |
636 log.debug("no more splits ...."); | 636 log.debug("no more splits ...."); |
637 for (; i < ni; ++i) { | 637 for (; i < ni; ++i) { |
638 double x = dataset.getXValue(0, i); | 638 double x = dataset.getXValue(0, i); |
639 double y = dataset.getYValue(0, i); | 639 double y = dataset.getYValue(0, i); |
640 if (!Double.isNaN(x) | 640 if (!Double.isNaN(x) |
641 && !Double.isNaN(y) | 641 && !Double.isNaN(y) |
642 && add(six, x)) { | 642 && add(six, x)) { |
643 siy.add(y); | 643 siy.add(y); |
644 } | 644 } |
645 } | 645 } |
706 } | 706 } |
707 int SIX = six.size(); | 707 int SIX = six.size(); |
708 if (SIX > 0) { // should always be true | 708 if (SIX > 0) { // should always be true |
709 double yns = Linear.linear( | 709 double yns = Linear.linear( |
710 xns, | 710 xns, |
711 six.getQuick(SIX-1), x, | 711 six.getQuick(SIX-1), x, |
712 siy.getQuick(SIX-1), y); | 712 siy.getQuick(SIX-1), y); |
713 if (debug) { | 713 if (debug) { |
714 log.debug("intersection at: " + yns); | 714 log.debug("intersection at: " + yns); |
715 } | 715 } |
716 if (add(six, xns)) { | 716 if (add(six, xns)) { |
784 | 784 |
785 // Copy the rest. | 785 // Copy the rest. |
786 for (; i < N; ++i) { | 786 for (; i < N; ++i) { |
787 double x = dataset.getXValue(0, i); | 787 double x = dataset.getXValue(0, i); |
788 double y = dataset.getXValue(0, i); | 788 double y = dataset.getXValue(0, i); |
789 if (!Double.isNaN(x) | 789 if (!Double.isNaN(x) |
790 && !Double.isNaN(y) | 790 && !Double.isNaN(y) |
791 && add(six, x)) { | 791 && add(six, x)) { |
792 siy.add(y); | 792 siy.add(y); |
793 } | 793 } |
794 } | 794 } |
819 } | 819 } |
820 | 820 |
821 public static List<XYDataset> splitByNaNs(XYDataset dataset) { | 821 public static List<XYDataset> splitByNaNs(XYDataset dataset) { |
822 | 822 |
823 switch (dataset.getSeriesCount()) { | 823 switch (dataset.getSeriesCount()) { |
824 case 0: | 824 case 0: |
825 return Collections.emptyList(); | 825 return Collections.emptyList(); |
826 case 1: | 826 case 1: |
827 return splitByNaNsOneSeries(dataset); | 827 return splitByNaNsOneSeries(dataset); |
828 default: // two or more | 828 default: // two or more |
829 return splitByNaNsTwoSeries(dataset); | 829 return splitByNaNsTwoSeries(dataset); |
861 CrosshairState crosshairState, | 861 CrosshairState crosshairState, |
862 int pass) { | 862 int pass) { |
863 switch (pass) { | 863 switch (pass) { |
864 case 0: | 864 case 0: |
865 for (XYDataset ds: splitByNaNs(dataset)) { | 865 for (XYDataset ds: splitByNaNs(dataset)) { |
866 drawItemPass0(g2, dataArea, info, | 866 drawItemPass0(g2, dataArea, info, |
867 plot, domainAxis, rangeAxis, | 867 plot, domainAxis, rangeAxis, |
868 ds, series, item, crosshairState); | 868 ds, series, item, crosshairState); |
869 } | 869 } |
870 break; | 870 break; |
871 case 1: | 871 case 1: |