< prev index next >

modules/javafx.controls/src/main/java/javafx/scene/chart/StackedAreaChart.java

Print this page
rev 10014 : 8134315: [LineChart] Blurry elements since 8u60


 673             } // end of inner for loop
 674 
 675             // Draw the SeriesLine and Series fill
 676             if (!currentSeriesData.isEmpty()) {
 677                 seriesLine.getElements().add(new MoveTo(currentSeriesData.get(0).displayX, currentSeriesData.get(0).displayY));
 678                 fillPath.getElements().add(new MoveTo(currentSeriesData.get(0).displayX, currentSeriesData.get(0).displayY));
 679             }
 680             for (DataPointInfo<X, Y> point : currentSeriesData) {
 681                 if (point.lineTo) {
 682                     seriesLine.getElements().add(new LineTo(point.displayX, point.displayY));
 683                 } else {
 684                     seriesLine.getElements().add(new MoveTo(point.displayX, point.displayY));
 685                 }
 686                 fillPath.getElements().add(new  LineTo(point.displayX, point.displayY));
 687                 // draw symbols only for actual data points and skip for interpolated points.
 688                 if (!point.skipSymbol) {
 689                     Node symbol = point.dataItem.getNode();
 690                     if (symbol != null) {
 691                         final double w = symbol.prefWidth(-1);
 692                         final double h = symbol.prefHeight(-1);
 693                         symbol.resizeRelocate(point.displayX-(w/2), point.displayY-(h/2),w,h);
 694                     }
 695                 }
 696             }
 697             for(int i = aggregateData.size()-1; i > 0; i--) {
 698                 DataPointInfo<X, Y> point = aggregateData.get(i);
 699                 if (PartOf.PREVIOUS.equals(point.partOf)) {
 700                     fillPath.getElements().add(new  LineTo(point.displayX, point.displayY));
 701                 }
 702             }
 703             if (!fillPath.getElements().isEmpty()) {
 704                 fillPath.getElements().add(new ClosePath());
 705             }
 706 
 707         }  // end of out for loop
 708      }
 709 
 710     private void addDropDown(ArrayList<DataPointInfo<X, Y>> currentSeriesData, Data<X, Y> item, X xValue, Y yValue, double x, double y) {
 711         DataPointInfo<X, Y> dropDownDataPoint = new DataPointInfo<>(true);
 712         dropDownDataPoint.setValues(item, xValue, yValue, x, y, PartOf.CURRENT, true, false);
 713         currentSeriesData.add(dropDownDataPoint);




 673             } // end of inner for loop
 674 
 675             // Draw the SeriesLine and Series fill
 676             if (!currentSeriesData.isEmpty()) {
 677                 seriesLine.getElements().add(new MoveTo(currentSeriesData.get(0).displayX, currentSeriesData.get(0).displayY));
 678                 fillPath.getElements().add(new MoveTo(currentSeriesData.get(0).displayX, currentSeriesData.get(0).displayY));
 679             }
 680             for (DataPointInfo<X, Y> point : currentSeriesData) {
 681                 if (point.lineTo) {
 682                     seriesLine.getElements().add(new LineTo(point.displayX, point.displayY));
 683                 } else {
 684                     seriesLine.getElements().add(new MoveTo(point.displayX, point.displayY));
 685                 }
 686                 fillPath.getElements().add(new  LineTo(point.displayX, point.displayY));
 687                 // draw symbols only for actual data points and skip for interpolated points.
 688                 if (!point.skipSymbol) {
 689                     Node symbol = point.dataItem.getNode();
 690                     if (symbol != null) {
 691                         final double w = symbol.prefWidth(-1);
 692                         final double h = symbol.prefHeight(-1);
 693                         symbol.resizeRelocate(snapPositionX(point.displayX)-(w/2), snapPositionY(point.displayY)-(h/2),w,h);
 694                     }
 695                 }
 696             }
 697             for(int i = aggregateData.size()-1; i > 0; i--) {
 698                 DataPointInfo<X, Y> point = aggregateData.get(i);
 699                 if (PartOf.PREVIOUS.equals(point.partOf)) {
 700                     fillPath.getElements().add(new  LineTo(point.displayX, point.displayY));
 701                 }
 702             }
 703             if (!fillPath.getElements().isEmpty()) {
 704                 fillPath.getElements().add(new ClosePath());
 705             }
 706 
 707         }  // end of out for loop
 708      }
 709 
 710     private void addDropDown(ArrayList<DataPointInfo<X, Y>> currentSeriesData, Data<X, Y> item, X xValue, Y yValue, double x, double y) {
 711         DataPointInfo<X, Y> dropDownDataPoint = new DataPointInfo<>(true);
 712         dropDownDataPoint.setValues(item, xValue, yValue, x, y, PartOf.CURRENT, true, false);
 713         currentSeriesData.add(dropDownDataPoint);


< prev index next >