當前位置: 首頁>>代碼示例>>Java>>正文


Java CategoryAxis.getCategoryStart方法代碼示例

本文整理匯總了Java中org.jfree.chart.axis.CategoryAxis.getCategoryStart方法的典型用法代碼示例。如果您正苦於以下問題:Java CategoryAxis.getCategoryStart方法的具體用法?Java CategoryAxis.getCategoryStart怎麽用?Java CategoryAxis.getCategoryStart使用的例子?那麽, 這裏精選的方法代碼示例或許可以為您提供幫助。您也可以進一步了解該方法所在org.jfree.chart.axis.CategoryAxis的用法示例。


在下文中一共展示了CategoryAxis.getCategoryStart方法的6個代碼示例,這些例子默認根據受歡迎程度排序。您可以為喜歡或者感覺有用的代碼點讚,您的評價將有助於係統推薦出更棒的Java代碼示例。

示例1: calculateBarW0

import org.jfree.chart.axis.CategoryAxis; //導入方法依賴的package包/類
/**
 * Calculates the coordinate of the first "side" of a bar.  This will be the minimum 
 * x-coordinate for a vertical bar, and the minimum y-coordinate for a horizontal bar.
 * 
 * @param plot  the plot.
 * @param orientation  the plot orientation.
 * @param dataArea  the data area.
 * @param domainAxis  the domain axis.
 * @param state  the renderer state (has the bar width precalculated).
 * @param row  the row index.
 * @param column  the column index.
 * 
 * @return the coordinate.
 */
protected double calculateBarW0(CategoryPlot plot, 
                                PlotOrientation orientation, 
                                Rectangle2D dataArea,
                                CategoryAxis domainAxis,
                                CategoryItemRendererState state,
                                int row,
                                int column) {
    // calculate bar width...
    double space = 0.0;
    if (orientation == PlotOrientation.HORIZONTAL) {
        space = dataArea.getHeight();
    }
    else {
        space = dataArea.getWidth();
    }
    double barW0 = domainAxis.getCategoryStart(column, getColumnCount(), dataArea,
                                               plot.getDomainAxisEdge());
    int seriesCount = getRowCount();
    int categoryCount = getColumnCount();
    if (seriesCount > 1) {
        double seriesGap = space * getItemMargin() / (categoryCount * (seriesCount - 1));
        double seriesW = calculateSeriesWidth(space, domainAxis, categoryCount, seriesCount);
        barW0 = barW0 + row * (seriesW + seriesGap) 
                      + (seriesW / 2.0) - (state.getBarWidth() / 2.0);
    }
    else {
        barW0 = domainAxis.getCategoryMiddle(column, getColumnCount(), dataArea,
                                             plot.getDomainAxisEdge())
                - state.getBarWidth() / 2.0;
    }
    return barW0;
}
 
開發者ID:parabuild-ci,項目名稱:parabuild-ci,代碼行數:47,代碼來源:LevelRenderer.java

示例2: calculateBarW0

import org.jfree.chart.axis.CategoryAxis; //導入方法依賴的package包/類
/**
 * Calculates the coordinate of the first "side" of a bar.  This will be the minimum 
 * x-coordinate for a vertical bar, and the minimum y-coordinate for a horizontal bar.
 * 
 * @param plot  the plot.
 * @param orientation  the plot orientation.
 * @param dataArea  the data area.
 * @param domainAxis  the domain axis.
 * @param state  the renderer state (has the bar width precalculated).
 * @param row  the row index.
 * @param column  the column index.
 * 
 * @return the coordinate.
 */
protected double calculateBarW0(CategoryPlot plot, 
                                PlotOrientation orientation, 
                                Rectangle2D dataArea,
                                CategoryAxis domainAxis,
                                CategoryItemRendererState state,
                                int row,
                                int column) {
    // calculate bar width...
    double space = 0.0;
    if (orientation == PlotOrientation.HORIZONTAL) {
        space = dataArea.getHeight();
    }
    else {
        space = dataArea.getWidth();
    }
    double barW0 = domainAxis.getCategoryStart(
        column, getColumnCount(), dataArea, plot.getDomainAxisEdge()
    );
    int seriesCount = getRowCount();
    int categoryCount = getColumnCount();
    if (seriesCount > 1) {
        double seriesGap = space * getItemMargin() / (categoryCount * (seriesCount - 1));
        double seriesW = calculateSeriesWidth(space, domainAxis, categoryCount, seriesCount);
        barW0 = barW0 + row * (seriesW + seriesGap) 
                      + (seriesW / 2.0) - (state.getBarWidth() / 2.0);
    }
    else {
        barW0 = domainAxis.getCategoryMiddle(
            column, getColumnCount(), dataArea, plot.getDomainAxisEdge()
        ) - state.getBarWidth() / 2.0;
    }
    return barW0;
}
 
開發者ID:parabuild-ci,項目名稱:parabuild-ci,代碼行數:48,代碼來源:BarRenderer.java

示例3: calculateBarW0

import org.jfree.chart.axis.CategoryAxis; //導入方法依賴的package包/類
/**
 * Calculates the coordinate of the first "side" of a bar.  This will be the minimum 
 * x-coordinate for a vertical bar, and the minimum y-coordinate for a horizontal bar.
 * 
 * @param plot  the plot.
 * @param orientation  the plot orientation.
 * @param dataArea  the data area.
 * @param domainAxis  the domain axis.
 * @param state  the renderer state (has the bar width precalculated).
 * @param row  the row index.
 * @param column  the column index.
 * 
 * @return the coordinate.
 */
protected double calculateBarW0(CategoryPlot plot, 
                                PlotOrientation orientation, 
                                Rectangle2D dataArea,
                                CategoryAxis domainAxis,
                                CategoryItemRendererState state,
                                int row,
                                int column) {
    // calculate bar width...
    double space = 0.0;
    if (orientation == PlotOrientation.HORIZONTAL) {
        space = dataArea.getHeight();
    }
    else {
        space = dataArea.getWidth();
    }
    double barW0 = domainAxis.getCategoryStart(
        column, getColumnCount(), dataArea, plot.getDomainAxisEdge()
    );
    int groupCount = this.seriesToGroupMap.getGroupCount();
    int groupIndex = this.seriesToGroupMap.getGroupIndex(
        this.seriesToGroupMap.getGroup(plot.getDataset().getRowKey(row))
    );
    int categoryCount = getColumnCount();
    if (groupCount > 1) {
        double groupGap = space * getItemMargin() / (categoryCount * (groupCount - 1));
        double groupW = calculateSeriesWidth(space, domainAxis, categoryCount, groupCount);
        barW0 = barW0 + groupIndex * (groupW + groupGap) 
                      + (groupW / 2.0) - (state.getBarWidth() / 2.0);
    }
    else {
        barW0 = domainAxis.getCategoryMiddle(
            column, getColumnCount(), dataArea, plot.getDomainAxisEdge()
        ) - state.getBarWidth() / 2.0;
    }
    return barW0;
}
 
開發者ID:parabuild-ci,項目名稱:parabuild-ci,代碼行數:51,代碼來源:GroupedStackedBarRenderer.java

示例4: calculateBarW0

import org.jfree.chart.axis.CategoryAxis; //導入方法依賴的package包/類
/**
 * Calculates the coordinate of the first "side" of a bar.  This will be 
 * the minimum x-coordinate for a vertical bar, and the minimum 
 * y-coordinate for a horizontal bar.
 * 
 * @param plot  the plot.
 * @param orientation  the plot orientation.
 * @param dataArea  the data area.
 * @param domainAxis  the domain axis.
 * @param state  the renderer state (has the bar width precalculated).
 * @param row  the row index.
 * @param column  the column index.
 * 
 * @return The coordinate.
 */
protected double calculateBarW0(CategoryPlot plot, 
                                PlotOrientation orientation, 
                                Rectangle2D dataArea,
                                CategoryAxis domainAxis,
                                CategoryItemRendererState state,
                                int row,
                                int column) {
    // calculate bar width...
    double space = 0.0;
    if (orientation == PlotOrientation.HORIZONTAL) {
        space = dataArea.getHeight();
    }
    else {
        space = dataArea.getWidth();
    }
    double barW0 = domainAxis.getCategoryStart(column, getColumnCount(), 
            dataArea, plot.getDomainAxisEdge());
    int seriesCount = getRowCount();
    int categoryCount = getColumnCount();
    if (seriesCount > 1) {
        double seriesGap = space * getItemMargin() 
                / (categoryCount * (seriesCount - 1));
        double seriesW = calculateSeriesWidth(space, domainAxis, 
                categoryCount, seriesCount);
        barW0 = barW0 + row * (seriesW + seriesGap) 
                      + (seriesW / 2.0) - (state.getBarWidth() / 2.0);
    }
    else {
        barW0 = domainAxis.getCategoryMiddle(column, getColumnCount(), 
                dataArea, plot.getDomainAxisEdge()) - state.getBarWidth() 
                / 2.0;
    }
    return barW0;
}
 
開發者ID:parabuild-ci,項目名稱:parabuild-ci,代碼行數:50,代碼來源:LevelRenderer.java

示例5: calculateBarW0

import org.jfree.chart.axis.CategoryAxis; //導入方法依賴的package包/類
/**
 * Calculates the coordinate of the first "side" of a bar.  This will be 
 * the minimum x-coordinate for a vertical bar, and the minimum 
 * y-coordinate for a horizontal bar.
 *
 * @param plot  the plot.
 * @param orientation  the plot orientation.
 * @param dataArea  the data area.
 * @param domainAxis  the domain axis.
 * @param state  the renderer state (has the bar width precalculated).
 * @param row  the row index.
 * @param column  the column index.
 * 
 * @return The coordinate.
 */
protected double calculateBarW0(CategoryPlot plot, 
                                PlotOrientation orientation, 
                                Rectangle2D dataArea,
                                CategoryAxis domainAxis,
                                CategoryItemRendererState state,
                                int row,
                                int column) {
    // calculate bar width...
    double space = 0.0;
    if (orientation == PlotOrientation.HORIZONTAL) {
        space = dataArea.getHeight();
    }
    else {
        space = dataArea.getWidth();
    }
    double barW0 = domainAxis.getCategoryStart(column, getColumnCount(), 
            dataArea, plot.getDomainAxisEdge());
    int seriesCount = getRowCount();
    int categoryCount = getColumnCount();
    if (seriesCount > 1) {
        double seriesGap = space * getItemMargin() 
                           / (categoryCount * (seriesCount - 1));
        double seriesW = calculateSeriesWidth(space, domainAxis, 
                categoryCount, seriesCount);
        barW0 = barW0 + row * (seriesW + seriesGap) 
                      + (seriesW / 2.0) - (state.getBarWidth() / 2.0);
    }
    else {
        barW0 = domainAxis.getCategoryMiddle(column, getColumnCount(), 
                dataArea, plot.getDomainAxisEdge()) - state.getBarWidth() 
                / 2.0;
    }
    return barW0;
}
 
開發者ID:parabuild-ci,項目名稱:parabuild-ci,代碼行數:50,代碼來源:BarRenderer.java

示例6: calculateBarW0

import org.jfree.chart.axis.CategoryAxis; //導入方法依賴的package包/類
/**
 * Calculates the coordinate of the first "side" of a bar.  This will be 
 * the minimum x-coordinate for a vertical bar, and the minimum 
 * y-coordinate for a horizontal bar.
 * 
 * @param plot  the plot.
 * @param orientation  the plot orientation.
 * @param dataArea  the data area.
 * @param domainAxis  the domain axis.
 * @param state  the renderer state (has the bar width precalculated).
 * @param row  the row index.
 * @param column  the column index.
 * 
 * @return The coordinate.
 */
protected double calculateBarW0(CategoryPlot plot, 
                                PlotOrientation orientation, 
                                Rectangle2D dataArea,
                                CategoryAxis domainAxis,
                                CategoryItemRendererState state,
                                int row,
                                int column) {
    // calculate bar width...
    double space = 0.0;
    if (orientation == PlotOrientation.HORIZONTAL) {
        space = dataArea.getHeight();
    }
    else {
        space = dataArea.getWidth();
    }
    double barW0 = domainAxis.getCategoryStart(
        column, getColumnCount(), dataArea, plot.getDomainAxisEdge()
    );
    int groupCount = this.seriesToGroupMap.getGroupCount();
    int groupIndex = this.seriesToGroupMap.getGroupIndex(
        this.seriesToGroupMap.getGroup(plot.getDataset().getRowKey(row))
    );
    int categoryCount = getColumnCount();
    if (groupCount > 1) {
        double groupGap = space * getItemMargin() 
                          / (categoryCount * (groupCount - 1));
        double groupW = calculateSeriesWidth(
            space, domainAxis, categoryCount, groupCount
        );
        barW0 = barW0 + groupIndex * (groupW + groupGap) 
                      + (groupW / 2.0) - (state.getBarWidth() / 2.0);
    }
    else {
        barW0 = domainAxis.getCategoryMiddle(
            column, getColumnCount(), dataArea, plot.getDomainAxisEdge()
        ) - state.getBarWidth() / 2.0;
    }
    return barW0;
}
 
開發者ID:parabuild-ci,項目名稱:parabuild-ci,代碼行數:55,代碼來源:GroupedStackedBarRenderer.java


注:本文中的org.jfree.chart.axis.CategoryAxis.getCategoryStart方法示例由純淨天空整理自Github/MSDocs等開源代碼及文檔管理平台,相關代碼片段篩選自各路編程大神貢獻的開源項目,源碼版權歸原作者所有,傳播和使用請參考對應項目的License;未經允許,請勿轉載。