|
19 | 19 | import org.jfree.chart.plot.*; |
20 | 20 | import org.jfree.chart.axis.ValueAxis; |
21 | 21 | import org.jfree.chart.axis.ColorBar; |
22 | | -import org.jfree.chart.axis.NumberAxis; |
23 | 22 | import org.jfree.chart.entity.EntityCollection; |
24 | 23 | import org.jfree.chart.entity.ContourEntity; |
25 | 24 | import org.jfree.ui.RectangleEdge; |
@@ -50,7 +49,7 @@ public PolygonData(String label, Polygon poly) |
50 | 49 | Polygon _poly; |
51 | 50 | } |
52 | 51 |
|
53 | | - List _polyDatas = new ArrayList(); |
| 52 | + List<PolygonData> _polyDatas = new ArrayList<>(); |
54 | 53 |
|
55 | 54 | public DensityPlot(DensityDataset dataset, ValueAxis domainAxis, ValueAxis rangeAxis, ColorBar colorBar) |
56 | 55 | { |
@@ -157,9 +156,8 @@ public void render(Graphics2D g2, Rectangle2D dataArea, PlotRenderingInfo info, |
157 | 156 | { |
158 | 157 | super.render(g2, dataArea, info, crosshairState); |
159 | 158 | g2.setColor(PlotFactory.COLOR_GATE); |
160 | | - for (Iterator it = _polyDatas.iterator(); it.hasNext();) |
| 159 | + for (PolygonData data : _polyDatas) |
161 | 160 | { |
162 | | - PolygonData data = (PolygonData) it.next(); |
163 | 161 | drawPolygon(g2, dataArea, data); |
164 | 162 | } |
165 | 163 | } |
@@ -248,14 +246,6 @@ public void contourRenderer(Graphics2D g2, |
248 | 246 | Object antiAlias = g2.getRenderingHint(RenderingHints.KEY_ANTIALIASING); |
249 | 247 | g2.setRenderingHint(RenderingHints.KEY_ANTIALIASING, RenderingHints.VALUE_ANTIALIAS_OFF); |
250 | 248 |
|
251 | | - int[] xIndex = data.indexX(); |
252 | | - int[] indexX = data.getXIndices(); |
253 | | - boolean vertInverted = verticalAxis.isInverted(); |
254 | | - boolean horizInverted = false; |
255 | | - if (horizontalAxis instanceof NumberAxis) |
256 | | - { |
257 | | - horizontalAxis.isInverted(); |
258 | | - } |
259 | 249 | double[] arrX = data.getPossibleXValues(); |
260 | 250 | double[] arrY = data.getPossibleYValues(); |
261 | 251 | double[] arrTransX = getTranslatedValues(arrX, horizontalAxis, dataArea, RectangleEdge.BOTTOM); |
@@ -338,8 +328,6 @@ else if (this.getMissingPaint() != null) |
338 | 328 |
|
339 | 329 | g2.setRenderingHint(RenderingHints.KEY_ANTIALIASING, antiAlias); |
340 | 330 |
|
341 | | - return; |
342 | | - |
343 | 331 | } |
344 | 332 |
|
345 | 333 | public void addPolygon(String label, Polygon poly) |
|
0 commit comments