From: <mu...@us...> - 2007-11-13 11:01:52
|
Revision: 520 http://jfreechart.svn.sourceforge.net/jfreechart/?rev=520&view=rev Author: mungady Date: 2007-11-13 03:01:26 -0800 (Tue, 13 Nov 2007) Log Message: ----------- Fixed Checkstyle warning. Modified Paths: -------------- branches/jfreechart-1.0.x-branch/source/org/jfree/chart/renderer/category/StackedAreaRenderer.java Modified: branches/jfreechart-1.0.x-branch/source/org/jfree/chart/renderer/category/StackedAreaRenderer.java =================================================================== --- branches/jfreechart-1.0.x-branch/source/org/jfree/chart/renderer/category/StackedAreaRenderer.java 2007-11-13 10:56:36 UTC (rev 519) +++ branches/jfreechart-1.0.x-branch/source/org/jfree/chart/renderer/category/StackedAreaRenderer.java 2007-11-13 11:01:26 UTC (rev 520) @@ -366,143 +366,6 @@ } -// /** -// * Draw a single data item. -// * -// * @param g2 the graphics device. -// * @param state the renderer state. -// * @param dataArea the data plot area. -// * @param plot the plot. -// * @param domainAxis the domain axis. -// * @param rangeAxis the range axis. -// * @param dataset the data. -// * @param row the row index (zero-based). -// * @param column the column index (zero-based). -// * @param pass the pass index. -// */ -// public void drawItem(Graphics2D g2, -// CategoryItemRendererState state, -// Rectangle2D dataArea, -// CategoryPlot plot, -// CategoryAxis domainAxis, -// ValueAxis rangeAxis, -// CategoryDataset dataset, -// int row, -// int column, -// int pass) { -// -// // plot non-null values... -// Number dataValue = dataset.getValue(row, column); -// if (dataValue == null) { -// return; -// } -// -// double value = dataValue.doubleValue(); -// double total = 0.0; // only needed if calculating percentages -// if (this.renderAsPercentages) { -// total = DataUtilities.calculateColumnTotal(dataset, column); -// value = value / total; -// } -// -// // leave the y values (y1, y0) untranslated as it is going to be be -// // stacked up later by previous series values, after this it will be -// // translated. -// double xx1 = domainAxis.getCategoryMiddle(column, getColumnCount(), -// dataArea, plot.getDomainAxisEdge()); -// -// double previousHeightx1 = getPreviousHeight(dataset, row, column); -// double y1 = value + previousHeightx1; -// RectangleEdge location = plot.getRangeAxisEdge(); -// double yy1 = rangeAxis.valueToJava2D(y1, dataArea, location); -// -// g2.setPaint(getItemPaint(row, column)); -// g2.setStroke(getItemStroke(row, column)); -// -// // in column zero, the only job to do is draw any visible item labels -// // and this is done in the second pass... -// if (column == 0) { -// if (pass == 1) { -// // draw item labels, if visible -// if (isItemLabelVisible(row, column)) { -// drawItemLabel(g2, plot.getOrientation(), dataset, row, column, -// xx1, yy1, (y1 < 0.0)); -// } -// } -// } -// else { -// Number previousValue = dataset.getValue(row, column - 1); -// if (previousValue != null) { -// -// double xx0 = domainAxis.getCategoryMiddle(column - 1, -// getColumnCount(), dataArea, plot.getDomainAxisEdge()); -// double y0 = previousValue.doubleValue(); -// if (this.renderAsPercentages) { -// total = DataUtilities.calculateColumnTotal(dataset, -// column - 1); -// y0 = y0 / total; -// } -// -// -// // Get the previous height, but this will be different for both -// // y0 and y1 as the previous series values could differ. -// double previousHeightx0 = getPreviousHeight(dataset, row, -// column - 1); -// -// // Now stack the current y values on top of the previous values. -// y0 += previousHeightx0; -// -// // Now translate the previous heights -// double previousHeightxx0 = rangeAxis.valueToJava2D( -// previousHeightx0, dataArea, location); -// double previousHeightxx1 = rangeAxis.valueToJava2D( -// previousHeightx1, dataArea, location); -// -// // Now translate the current y values. -// double yy0 = rangeAxis.valueToJava2D(y0, dataArea, location); -// -// if (pass == 0) { -// // FIXME: this doesn't handle negative values properly -// Polygon p = null; -// PlotOrientation orientation = plot.getOrientation(); -// if (orientation == PlotOrientation.HORIZONTAL) { -// p = new Polygon(); -// p.addPoint((int) yy0, (int) xx0); -// p.addPoint((int) yy1, (int) xx1); -// p.addPoint((int) previousHeightxx1, (int) xx1); -// p.addPoint((int) previousHeightxx0, (int) xx0); -// } -// else if (orientation == PlotOrientation.VERTICAL) { -// p = new Polygon(); -// p.addPoint((int) xx0, (int) yy0); -// p.addPoint((int) xx1, (int) yy1); -// p.addPoint((int) xx1, (int) previousHeightxx1); -// p.addPoint((int) xx0, (int) previousHeightxx0); -// } -// g2.setPaint(getItemPaint(row, column)); -// g2.setStroke(getItemStroke(row, column)); -// g2.fill(p); -// -// // add an item entity, if this information is being -// // collected... -// EntityCollection entities = state.getEntityCollection(); -// if (entities != null) { -// addItemEntity(entities, dataset, row, column, p); -// } -// -// } -// else { -// if (isItemLabelVisible(row, column)) { -// drawItemLabel(g2, plot.getOrientation(), dataset, row, -// column, xx1, yy1, (y1 < 0.0)); -// } -// } -// } -// -// -// } -// -// } - /** * Calculates the stacked value of the all series up to, but not including * <code>series</code> for the specified category, <code>category</code>. This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |