Java Code Examples for org.jfree.chart.axis.CategoryAxis#getCategorySeriesMiddle()

The following examples show how to use org.jfree.chart.axis.CategoryAxis#getCategorySeriesMiddle() . You can vote up the ones you like or vote down the ones you don't like, and go to the original project or source file by following the links above each example. You may check out the related API usage on the sidebar.
Example 1
Source File: ScatterRenderer.java    From openstock with GNU General Public License v3.0 4 votes vote down vote up
/**
 * Draw a single data item.
 *
 * @param g2  the graphics device.
 * @param state  the renderer state.
 * @param dataArea  the area in which the data is drawn.
 * @param plot  the plot.
 * @param domainAxis  the domain axis.
 * @param rangeAxis  the range axis.
 * @param dataset  the dataset.
 * @param row  the row index (zero-based).
 * @param column  the column index (zero-based).
 * @param pass  the pass index.
 */
@Override
public void drawItem(Graphics2D g2, CategoryItemRendererState state,
        Rectangle2D dataArea, CategoryPlot plot, CategoryAxis domainAxis,
        ValueAxis rangeAxis, CategoryDataset dataset, int row, int column,
        int pass) {

    // do nothing if item is not visible
    if (!getItemVisible(row, column)) {
        return;
    }
    int visibleRow = state.getVisibleSeriesIndex(row);
    if (visibleRow < 0) {
        return;
    }
    int visibleRowCount = state.getVisibleSeriesCount();

    PlotOrientation orientation = plot.getOrientation();

    MultiValueCategoryDataset d = (MultiValueCategoryDataset) dataset;
    List values = d.getValues(row, column);
    if (values == null) {
        return;
    }
    int valueCount = values.size();
    for (int i = 0; i < valueCount; i++) {
        // current data point...
        double x1;
        if (this.useSeriesOffset) {
            x1 = domainAxis.getCategorySeriesMiddle(column, 
                    dataset.getColumnCount(), visibleRow, visibleRowCount,
                    this.itemMargin, dataArea, plot.getDomainAxisEdge());
        }
        else {
            x1 = domainAxis.getCategoryMiddle(column, getColumnCount(),
                    dataArea, plot.getDomainAxisEdge());
        }
        Number n = (Number) values.get(i);
        double value = n.doubleValue();
        double y1 = rangeAxis.valueToJava2D(value, dataArea,
                plot.getRangeAxisEdge());

        Shape shape = getItemShape(row, column);
        if (orientation == PlotOrientation.HORIZONTAL) {
            shape = ShapeUtilities.createTranslatedShape(shape, y1, x1);
        }
        else if (orientation == PlotOrientation.VERTICAL) {
            shape = ShapeUtilities.createTranslatedShape(shape, x1, y1);
        }
        if (getItemShapeFilled(row, column)) {
            if (this.useFillPaint) {
                g2.setPaint(getItemFillPaint(row, column));
            }
            else {
                g2.setPaint(getItemPaint(row, column));
            }
            g2.fill(shape);
        }
        if (this.drawOutlines) {
            if (this.useOutlinePaint) {
                g2.setPaint(getItemOutlinePaint(row, column));
            }
            else {
                g2.setPaint(getItemPaint(row, column));
            }
            g2.setStroke(getItemOutlineStroke(row, column));
            g2.draw(shape);
        }
    }

}
 
Example 2
Source File: ScatterRenderer.java    From buffer_bci with GNU General Public License v3.0 4 votes vote down vote up
/**
 * Draw a single data item.
 *
 * @param g2  the graphics device.
 * @param state  the renderer state.
 * @param dataArea  the area in which the data is drawn.
 * @param plot  the plot.
 * @param domainAxis  the domain axis.
 * @param rangeAxis  the range axis.
 * @param dataset  the dataset.
 * @param row  the row index (zero-based).
 * @param column  the column index (zero-based).
 * @param pass  the pass index.
 */
@Override
public void drawItem(Graphics2D g2, CategoryItemRendererState state,
        Rectangle2D dataArea, CategoryPlot plot, CategoryAxis domainAxis,
        ValueAxis rangeAxis, CategoryDataset dataset, int row, int column,
        int pass) {

    // do nothing if item is not visible
    if (!getItemVisible(row, column)) {
        return;
    }
    int visibleRow = state.getVisibleSeriesIndex(row);
    if (visibleRow < 0) {
        return;
    }
    int visibleRowCount = state.getVisibleSeriesCount();

    PlotOrientation orientation = plot.getOrientation();

    MultiValueCategoryDataset d = (MultiValueCategoryDataset) dataset;
    List values = d.getValues(row, column);
    if (values == null) {
        return;
    }
    int valueCount = values.size();
    for (int i = 0; i < valueCount; i++) {
        // current data point...
        double x1;
        if (this.useSeriesOffset) {
            x1 = domainAxis.getCategorySeriesMiddle(column, 
                    dataset.getColumnCount(), visibleRow, visibleRowCount,
                    this.itemMargin, dataArea, plot.getDomainAxisEdge());
        }
        else {
            x1 = domainAxis.getCategoryMiddle(column, getColumnCount(),
                    dataArea, plot.getDomainAxisEdge());
        }
        Number n = (Number) values.get(i);
        double value = n.doubleValue();
        double y1 = rangeAxis.valueToJava2D(value, dataArea,
                plot.getRangeAxisEdge());

        Shape shape = getItemShape(row, column);
        if (orientation == PlotOrientation.HORIZONTAL) {
            shape = ShapeUtilities.createTranslatedShape(shape, y1, x1);
        }
        else if (orientation == PlotOrientation.VERTICAL) {
            shape = ShapeUtilities.createTranslatedShape(shape, x1, y1);
        }
        if (getItemShapeFilled(row, column)) {
            if (this.useFillPaint) {
                g2.setPaint(getItemFillPaint(row, column));
            }
            else {
                g2.setPaint(getItemPaint(row, column));
            }
            g2.fill(shape);
        }
        if (this.drawOutlines) {
            if (this.useOutlinePaint) {
                g2.setPaint(getItemOutlinePaint(row, column));
            }
            else {
                g2.setPaint(getItemPaint(row, column));
            }
            g2.setStroke(getItemOutlineStroke(row, column));
            g2.draw(shape);
        }
    }

}
 
Example 3
Source File: ScatterRenderer.java    From ccu-historian with GNU General Public License v3.0 4 votes vote down vote up
/**
 * Draw a single data item.
 *
 * @param g2  the graphics device.
 * @param state  the renderer state.
 * @param dataArea  the area in which the data is drawn.
 * @param plot  the plot.
 * @param domainAxis  the domain axis.
 * @param rangeAxis  the range axis.
 * @param dataset  the dataset.
 * @param row  the row index (zero-based).
 * @param column  the column index (zero-based).
 * @param pass  the pass index.
 */
@Override
public void drawItem(Graphics2D g2, CategoryItemRendererState state,
        Rectangle2D dataArea, CategoryPlot plot, CategoryAxis domainAxis,
        ValueAxis rangeAxis, CategoryDataset dataset, int row, int column,
        int pass) {

    // do nothing if item is not visible
    if (!getItemVisible(row, column)) {
        return;
    }
    int visibleRow = state.getVisibleSeriesIndex(row);
    if (visibleRow < 0) {
        return;
    }
    int visibleRowCount = state.getVisibleSeriesCount();

    PlotOrientation orientation = plot.getOrientation();

    MultiValueCategoryDataset d = (MultiValueCategoryDataset) dataset;
    List values = d.getValues(row, column);
    if (values == null) {
        return;
    }
    int valueCount = values.size();
    for (int i = 0; i < valueCount; i++) {
        // current data point...
        double x1;
        if (this.useSeriesOffset) {
            x1 = domainAxis.getCategorySeriesMiddle(column, 
                    dataset.getColumnCount(), visibleRow, visibleRowCount,
                    this.itemMargin, dataArea, plot.getDomainAxisEdge());
        }
        else {
            x1 = domainAxis.getCategoryMiddle(column, getColumnCount(),
                    dataArea, plot.getDomainAxisEdge());
        }
        Number n = (Number) values.get(i);
        double value = n.doubleValue();
        double y1 = rangeAxis.valueToJava2D(value, dataArea,
                plot.getRangeAxisEdge());

        Shape shape = getItemShape(row, column);
        if (orientation == PlotOrientation.HORIZONTAL) {
            shape = ShapeUtilities.createTranslatedShape(shape, y1, x1);
        }
        else if (orientation == PlotOrientation.VERTICAL) {
            shape = ShapeUtilities.createTranslatedShape(shape, x1, y1);
        }
        if (getItemShapeFilled(row, column)) {
            if (this.useFillPaint) {
                g2.setPaint(getItemFillPaint(row, column));
            }
            else {
                g2.setPaint(getItemPaint(row, column));
            }
            g2.fill(shape);
        }
        if (this.drawOutlines) {
            if (this.useOutlinePaint) {
                g2.setPaint(getItemOutlinePaint(row, column));
            }
            else {
                g2.setPaint(getItemPaint(row, column));
            }
            g2.setStroke(getItemOutlineStroke(row, column));
            g2.draw(shape);
        }
    }

}
 
Example 4
Source File: ScatterRenderer.java    From astor with GNU General Public License v2.0 4 votes vote down vote up
/**
 * Draw a single data item.
 *
 * @param g2  the graphics device.
 * @param state  the renderer state.
 * @param dataArea  the area in which the data is drawn.
 * @param plot  the plot.
 * @param domainAxis  the domain axis.
 * @param rangeAxis  the range axis.
 * @param dataset  the dataset.
 * @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) {

    // do nothing if item is not visible
    if (!getItemVisible(row, column)) {
        return;   
    }

    PlotOrientation orientation = plot.getOrientation();

    MultiValueCategoryDataset d = (MultiValueCategoryDataset) dataset;
    List values = d.getValues(row, column);
    if (values == null) {
        return;
    }
    int valueCount = values.size();
    for (int i = 0; i < valueCount; i++) {
        // current data point...
        double x1;
        if (this.useSeriesOffset) {
            x1 = domainAxis.getCategorySeriesMiddle(dataset.getColumnKey(
                    column), dataset.getRowKey(row), dataset, 
                    this.itemMargin, dataArea, plot.getDomainAxisEdge());            
        }
        else {
            x1 = domainAxis.getCategoryMiddle(column, getColumnCount(), 
                    dataArea, plot.getDomainAxisEdge());
        }
        Number n = (Number) values.get(i);
        double value = n.doubleValue();
        double y1 = rangeAxis.valueToJava2D(value, dataArea, 
                plot.getRangeAxisEdge());

        Shape shape = getItemShape(row, column);
        if (orientation == PlotOrientation.HORIZONTAL) {
            shape = ShapeUtilities.createTranslatedShape(shape, y1, x1);
        }
        else if (orientation == PlotOrientation.VERTICAL) {
            shape = ShapeUtilities.createTranslatedShape(shape, x1, y1);
        }
        if (getItemShapeFilled(row, column)) {
            if (this.useFillPaint) {
                g2.setPaint(getItemFillPaint(row, column));
            }
            else {
                g2.setPaint(getItemPaint(row, column));   
            }
            g2.fill(shape);
        }
        if (this.drawOutlines) {
            if (this.useOutlinePaint) {
                g2.setPaint(getItemOutlinePaint(row, column));   
            }
            else {
                g2.setPaint(getItemPaint(row, column));
            }
            g2.setStroke(getItemOutlineStroke(row, column));
            g2.draw(shape);
        }
    }

}
 
Example 5
Source File: ScatterRenderer.java    From SIMVA-SoS with Apache License 2.0 4 votes vote down vote up
/**
 * Draw a single data item.
 *
 * @param g2  the graphics device.
 * @param state  the renderer state.
 * @param dataArea  the area in which the data is drawn.
 * @param plot  the plot.
 * @param domainAxis  the domain axis.
 * @param rangeAxis  the range axis.
 * @param dataset  the dataset.
 * @param row  the row index (zero-based).
 * @param column  the column index (zero-based).
 * @param pass  the pass index.
 */
@Override
public void drawItem(Graphics2D g2, CategoryItemRendererState state,
        Rectangle2D dataArea, CategoryPlot plot, CategoryAxis domainAxis,
        ValueAxis rangeAxis, CategoryDataset dataset, int row, int column,
        int pass) {

    // do nothing if item is not visible
    if (!getItemVisible(row, column)) {
        return;
    }
    int visibleRow = state.getVisibleSeriesIndex(row);
    if (visibleRow < 0) {
        return;
    }
    int visibleRowCount = state.getVisibleSeriesCount();

    PlotOrientation orientation = plot.getOrientation();

    MultiValueCategoryDataset d = (MultiValueCategoryDataset) dataset;
    List values = d.getValues(row, column);
    if (values == null) {
        return;
    }
    int valueCount = values.size();
    for (int i = 0; i < valueCount; i++) {
        // current data point...
        double x1;
        if (this.useSeriesOffset) {
            x1 = domainAxis.getCategorySeriesMiddle(column, 
                    dataset.getColumnCount(), visibleRow, visibleRowCount,
                    this.itemMargin, dataArea, plot.getDomainAxisEdge());
        }
        else {
            x1 = domainAxis.getCategoryMiddle(column, getColumnCount(),
                    dataArea, plot.getDomainAxisEdge());
        }
        Number n = (Number) values.get(i);
        double value = n.doubleValue();
        double y1 = rangeAxis.valueToJava2D(value, dataArea,
                plot.getRangeAxisEdge());

        Shape shape = getItemShape(row, column);
        if (orientation == PlotOrientation.HORIZONTAL) {
            shape = ShapeUtilities.createTranslatedShape(shape, y1, x1);
        }
        else if (orientation == PlotOrientation.VERTICAL) {
            shape = ShapeUtilities.createTranslatedShape(shape, x1, y1);
        }
        if (getItemShapeFilled(row, column)) {
            if (this.useFillPaint) {
                g2.setPaint(getItemFillPaint(row, column));
            }
            else {
                g2.setPaint(getItemPaint(row, column));
            }
            g2.fill(shape);
        }
        if (this.drawOutlines) {
            if (this.useOutlinePaint) {
                g2.setPaint(getItemOutlinePaint(row, column));
            }
            else {
                g2.setPaint(getItemPaint(row, column));
            }
            g2.setStroke(getItemOutlineStroke(row, column));
            g2.draw(shape);
        }
    }

}
 
Example 6
Source File: ScatterRenderer.java    From astor with GNU General Public License v2.0 4 votes vote down vote up
/**
 * Draw a single data item.
 *
 * @param g2  the graphics device.
 * @param state  the renderer state.
 * @param dataArea  the area in which the data is drawn.
 * @param plot  the plot.
 * @param domainAxis  the domain axis.
 * @param rangeAxis  the range axis.
 * @param dataset  the dataset.
 * @param row  the row index (zero-based).
 * @param column  the column index (zero-based).
 * @param selected  is the item selected?
 * @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,
        boolean selected, int pass) {

    // do nothing if item is not visible
    if (!getItemVisible(row, column)) {
        return;
    }
    int visibleRow = state.getVisibleSeriesIndex(row);
    if (visibleRow < 0) {
        return;
    }
    int visibleRowCount = state.getVisibleSeriesCount();

    PlotOrientation orientation = plot.getOrientation();

    MultiValueCategoryDataset d = (MultiValueCategoryDataset) dataset;
    List values = d.getValues(row, column);
    if (values == null) {
        return;
    }
    int valueCount = values.size();
    for (int i = 0; i < valueCount; i++) {
        // current data point...
        double x1;
        if (this.useSeriesOffset) {
            x1 = domainAxis.getCategorySeriesMiddle(column,
                    dataset.getColumnCount(), visibleRow, visibleRowCount,
                    this.itemMargin, dataArea, plot.getDomainAxisEdge());
        }
        else {
            x1 = domainAxis.getCategoryMiddle(column, getColumnCount(),
                    dataArea, plot.getDomainAxisEdge());
        }
        Number n = (Number) values.get(i);
        double value = n.doubleValue();
        double y1 = rangeAxis.valueToJava2D(value, dataArea,
                plot.getRangeAxisEdge());

        Shape shape = getItemShape(row, column, selected);
        if (orientation == PlotOrientation.HORIZONTAL) {
            shape = ShapeUtilities.createTranslatedShape(shape, y1, x1);
        }
        else if (orientation == PlotOrientation.VERTICAL) {
            shape = ShapeUtilities.createTranslatedShape(shape, x1, y1);
        }
        if (getItemShapeFilled(row, column)) {
            if (this.useFillPaint) {
                g2.setPaint(getItemFillPaint(row, column, selected));
            }
            else {
                g2.setPaint(getItemPaint(row, column, selected));
            }
            g2.fill(shape);
        }
        if (this.drawOutlines) {
            if (this.useOutlinePaint) {
                g2.setPaint(getItemOutlinePaint(row, column, selected));
            }
            else {
                g2.setPaint(getItemPaint(row, column, selected));
            }
            g2.setStroke(getItemOutlineStroke(row, column, selected));
            g2.draw(shape);
        }
    }

}
 
Example 7
Source File: LevelRenderer.java    From buffer_bci with GNU General Public License v3.0 3 votes vote down vote up
/**
 * Returns the Java2D coordinate for the middle of the specified data item.
 *
 * @param rowKey  the row key.
 * @param columnKey  the column key.
 * @param dataset  the dataset.
 * @param axis  the axis.
 * @param area  the drawing area.
 * @param edge  the edge along which the axis lies.
 *
 * @return The Java2D coordinate.
 *
 * @since 1.0.11
 */
@Override
public double getItemMiddle(Comparable rowKey, Comparable columnKey,
        CategoryDataset dataset, CategoryAxis axis, Rectangle2D area,
        RectangleEdge edge) {
    return axis.getCategorySeriesMiddle(columnKey, rowKey, dataset,
            this.itemMargin, area, edge);
}
 
Example 8
Source File: GanttRenderer.java    From openstock with GNU General Public License v3.0 3 votes vote down vote up
/**
 * Returns the Java2D coordinate for the middle of the specified data item.
 *
 * @param rowKey  the row key.
 * @param columnKey  the column key.
 * @param dataset  the dataset.
 * @param axis  the axis.
 * @param area  the drawing area.
 * @param edge  the edge along which the axis lies.
 *
 * @return The Java2D coordinate.
 *
 * @since 1.0.11
 */
@Override
public double getItemMiddle(Comparable rowKey, Comparable columnKey,
        CategoryDataset dataset, CategoryAxis axis, Rectangle2D area,
        RectangleEdge edge) {
    return axis.getCategorySeriesMiddle(columnKey, rowKey, dataset,
            getItemMargin(), area, edge);
}
 
Example 9
Source File: GanttRenderer.java    From buffer_bci with GNU General Public License v3.0 3 votes vote down vote up
/**
 * Returns the Java2D coordinate for the middle of the specified data item.
 *
 * @param rowKey  the row key.
 * @param columnKey  the column key.
 * @param dataset  the dataset.
 * @param axis  the axis.
 * @param area  the drawing area.
 * @param edge  the edge along which the axis lies.
 *
 * @return The Java2D coordinate.
 *
 * @since 1.0.11
 */
@Override
public double getItemMiddle(Comparable rowKey, Comparable columnKey,
        CategoryDataset dataset, CategoryAxis axis, Rectangle2D area,
        RectangleEdge edge) {
    return axis.getCategorySeriesMiddle(columnKey, rowKey, dataset,
            getItemMargin(), area, edge);
}
 
Example 10
Source File: LevelRenderer.java    From astor with GNU General Public License v2.0 3 votes vote down vote up
/**
 * Returns the Java2D coordinate for the middle of the specified data item.
 *
 * @param rowKey  the row key.
 * @param columnKey  the column key.
 * @param dataset  the dataset.
 * @param axis  the axis.
 * @param area  the drawing area.
 * @param edge  the edge along which the axis lies.
 *
 * @return The Java2D coordinate.
 *
 * @since 1.0.11
 */
public double getItemMiddle(Comparable rowKey, Comparable columnKey,
        CategoryDataset dataset, CategoryAxis axis, Rectangle2D area,
        RectangleEdge edge) {
    return axis.getCategorySeriesMiddle(columnKey, rowKey, dataset,
            this.itemMargin, area, edge);
}
 
Example 11
Source File: GanttRenderer.java    From astor with GNU General Public License v2.0 3 votes vote down vote up
/**
 * Returns the Java2D coordinate for the middle of the specified data item.
 *
 * @param rowKey  the row key.
 * @param columnKey  the column key.
 * @param dataset  the dataset.
 * @param axis  the axis.
 * @param area  the drawing area.
 * @param edge  the edge along which the axis lies.
 *
 * @return The Java2D coordinate.
 *
 * @since 1.0.11
 */
public double getItemMiddle(Comparable rowKey, Comparable columnKey,
        CategoryDataset dataset, CategoryAxis axis, Rectangle2D area,
        RectangleEdge edge) {
    return axis.getCategorySeriesMiddle(columnKey, rowKey, dataset,
            getItemMargin(), area, edge);
}
 
Example 12
Source File: LevelRenderer.java    From ECG-Viewer with GNU General Public License v2.0 3 votes vote down vote up
/**
 * Returns the Java2D coordinate for the middle of the specified data item.
 *
 * @param rowKey  the row key.
 * @param columnKey  the column key.
 * @param dataset  the dataset.
 * @param axis  the axis.
 * @param area  the drawing area.
 * @param edge  the edge along which the axis lies.
 *
 * @return The Java2D coordinate.
 *
 * @since 1.0.11
 */
@Override
public double getItemMiddle(Comparable rowKey, Comparable columnKey,
        CategoryDataset dataset, CategoryAxis axis, Rectangle2D area,
        RectangleEdge edge) {
    return axis.getCategorySeriesMiddle(columnKey, rowKey, dataset,
            this.itemMargin, area, edge);
}
 
Example 13
Source File: GanttRenderer.java    From buffer_bci with GNU General Public License v3.0 3 votes vote down vote up
/**
 * Returns the Java2D coordinate for the middle of the specified data item.
 *
 * @param rowKey  the row key.
 * @param columnKey  the column key.
 * @param dataset  the dataset.
 * @param axis  the axis.
 * @param area  the drawing area.
 * @param edge  the edge along which the axis lies.
 *
 * @return The Java2D coordinate.
 *
 * @since 1.0.11
 */
@Override
public double getItemMiddle(Comparable rowKey, Comparable columnKey,
        CategoryDataset dataset, CategoryAxis axis, Rectangle2D area,
        RectangleEdge edge) {
    return axis.getCategorySeriesMiddle(columnKey, rowKey, dataset,
            getItemMargin(), area, edge);
}
 
Example 14
Source File: GanttRenderer.java    From ECG-Viewer with GNU General Public License v2.0 3 votes vote down vote up
/**
 * Returns the Java2D coordinate for the middle of the specified data item.
 *
 * @param rowKey  the row key.
 * @param columnKey  the column key.
 * @param dataset  the dataset.
 * @param axis  the axis.
 * @param area  the drawing area.
 * @param edge  the edge along which the axis lies.
 *
 * @return The Java2D coordinate.
 *
 * @since 1.0.11
 */
@Override
public double getItemMiddle(Comparable rowKey, Comparable columnKey,
        CategoryDataset dataset, CategoryAxis axis, Rectangle2D area,
        RectangleEdge edge) {
    return axis.getCategorySeriesMiddle(columnKey, rowKey, dataset,
            getItemMargin(), area, edge);
}
 
Example 15
Source File: LevelRenderer.java    From buffer_bci with GNU General Public License v3.0 3 votes vote down vote up
/**
 * Returns the Java2D coordinate for the middle of the specified data item.
 *
 * @param rowKey  the row key.
 * @param columnKey  the column key.
 * @param dataset  the dataset.
 * @param axis  the axis.
 * @param area  the drawing area.
 * @param edge  the edge along which the axis lies.
 *
 * @return The Java2D coordinate.
 *
 * @since 1.0.11
 */
@Override
public double getItemMiddle(Comparable rowKey, Comparable columnKey,
        CategoryDataset dataset, CategoryAxis axis, Rectangle2D area,
        RectangleEdge edge) {
    return axis.getCategorySeriesMiddle(columnKey, rowKey, dataset,
            this.itemMargin, area, edge);
}
 
Example 16
Source File: LevelRenderer.java    From SIMVA-SoS with Apache License 2.0 3 votes vote down vote up
/**
 * Returns the Java2D coordinate for the middle of the specified data item.
 *
 * @param rowKey  the row key.
 * @param columnKey  the column key.
 * @param dataset  the dataset.
 * @param axis  the axis.
 * @param area  the drawing area.
 * @param edge  the edge along which the axis lies.
 *
 * @return The Java2D coordinate.
 *
 * @since 1.0.11
 */
@Override
public double getItemMiddle(Comparable rowKey, Comparable columnKey,
        CategoryDataset dataset, CategoryAxis axis, Rectangle2D area,
        RectangleEdge edge) {
    return axis.getCategorySeriesMiddle(columnKey, rowKey, dataset,
            this.itemMargin, area, edge);
}
 
Example 17
Source File: GanttRenderer.java    From SIMVA-SoS with Apache License 2.0 3 votes vote down vote up
/**
 * Returns the Java2D coordinate for the middle of the specified data item.
 *
 * @param rowKey  the row key.
 * @param columnKey  the column key.
 * @param dataset  the dataset.
 * @param axis  the axis.
 * @param area  the drawing area.
 * @param edge  the edge along which the axis lies.
 *
 * @return The Java2D coordinate.
 *
 * @since 1.0.11
 */
@Override
public double getItemMiddle(Comparable rowKey, Comparable columnKey,
        CategoryDataset dataset, CategoryAxis axis, Rectangle2D area,
        RectangleEdge edge) {
    return axis.getCategorySeriesMiddle(columnKey, rowKey, dataset,
            getItemMargin(), area, edge);
}
 
Example 18
Source File: LevelRenderer.java    From ccu-historian with GNU General Public License v3.0 3 votes vote down vote up
/**
 * Returns the Java2D coordinate for the middle of the specified data item.
 *
 * @param rowKey  the row key.
 * @param columnKey  the column key.
 * @param dataset  the dataset.
 * @param axis  the axis.
 * @param area  the drawing area.
 * @param edge  the edge along which the axis lies.
 *
 * @return The Java2D coordinate.
 *
 * @since 1.0.11
 */
@Override
public double getItemMiddle(Comparable rowKey, Comparable columnKey,
        CategoryDataset dataset, CategoryAxis axis, Rectangle2D area,
        RectangleEdge edge) {
    return axis.getCategorySeriesMiddle(columnKey, rowKey, dataset,
            this.itemMargin, area, edge);
}
 
Example 19
Source File: GanttRenderer.java    From ccu-historian with GNU General Public License v3.0 3 votes vote down vote up
/**
 * Returns the Java2D coordinate for the middle of the specified data item.
 *
 * @param rowKey  the row key.
 * @param columnKey  the column key.
 * @param dataset  the dataset.
 * @param axis  the axis.
 * @param area  the drawing area.
 * @param edge  the edge along which the axis lies.
 *
 * @return The Java2D coordinate.
 *
 * @since 1.0.11
 */
@Override
public double getItemMiddle(Comparable rowKey, Comparable columnKey,
        CategoryDataset dataset, CategoryAxis axis, Rectangle2D area,
        RectangleEdge edge) {
    return axis.getCategorySeriesMiddle(columnKey, rowKey, dataset,
            getItemMargin(), area, edge);
}
 
Example 20
Source File: LevelRenderer.java    From openstock with GNU General Public License v3.0 3 votes vote down vote up
/**
 * Returns the Java2D coordinate for the middle of the specified data item.
 *
 * @param rowKey  the row key.
 * @param columnKey  the column key.
 * @param dataset  the dataset.
 * @param axis  the axis.
 * @param area  the drawing area.
 * @param edge  the edge along which the axis lies.
 *
 * @return The Java2D coordinate.
 *
 * @since 1.0.11
 */
@Override
public double getItemMiddle(Comparable rowKey, Comparable columnKey,
        CategoryDataset dataset, CategoryAxis axis, Rectangle2D area,
        RectangleEdge edge) {
    return axis.getCategorySeriesMiddle(columnKey, rowKey, dataset,
            this.itemMargin, area, edge);
}