List of usage examples for org.jfree.chart.renderer.category CategoryItemRenderer getPassCount
public int getPassCount();
From source file:org.openfaces.component.chart.impl.plots.GridCategoryPlotAdapter.java
private void renderColumns(Graphics2D g2, CategoryItemRendererState state, Rectangle2D dataArea, CategoryItemRenderer renderer, CategoryDataset currentDataSet, int index, int row) { boolean isAscendingColumnOrder = getColumnRenderingOrder() == SortOrder.ASCENDING; CategoryAxis categoryAxis = getDomainAxisForDataset(index); ValueAxis valueAxis = getRangeAxisForDataset(index); int totalRendererPasses = renderer.getPassCount(); int totalColumns = currentDataSet.getColumnCount(); for (int currentPassIndex = 0; currentPassIndex < totalRendererPasses; currentPassIndex++) { if (isAscendingColumnOrder) { for (int columnIndex = 0; columnIndex < totalColumns; columnIndex++) { final boolean isLastColumn = columnIndex == totalColumns - 1; renderColumn(g2, state, dataArea, renderer, currentDataSet, categoryAxis, valueAxis, row, currentPassIndex, columnIndex, isLastColumn); }/*from w w w.j av a2 s. co m*/ } else { for (int columnIndex = totalColumns - 1; columnIndex >= 0; columnIndex--) { final boolean isLastColumn = columnIndex == 0; renderColumn(g2, state, dataArea, renderer, currentDataSet, categoryAxis, valueAxis, row, currentPassIndex, columnIndex, isLastColumn); } } } }