Java Code Examples for org.jfree.chart.annotations.CategoryAnnotation#draw()

The following examples show how to use org.jfree.chart.annotations.CategoryAnnotation#draw() . 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: jKali_0031_s.java    From coming with MIT License 6 votes vote down vote up
/**
 * Draws all the annotations for the specified layer.
 *
 * @param g2  the graphics device.
 * @param dataArea  the data area.
 * @param domainAxis  the domain axis.
 * @param rangeAxis  the range axis.
 * @param layer  the layer.
 * @param info  the plot rendering info.
 *
 * @since 1.2.0
 */
public void drawAnnotations(Graphics2D g2, Rectangle2D dataArea,
        CategoryAxis domainAxis, ValueAxis rangeAxis, Layer layer,
        PlotRenderingInfo info) {

    Iterator iterator = null;
    if (layer.equals(Layer.FOREGROUND)) {
        iterator = this.foregroundAnnotations.iterator();
    }
    else if (layer.equals(Layer.BACKGROUND)) {
        iterator = this.backgroundAnnotations.iterator();
    }
    else {
        // should not get here
        throw new RuntimeException("Unknown layer.");
    }
    while (iterator.hasNext()) {
        CategoryAnnotation annotation = (CategoryAnnotation) iterator.next();
        annotation.draw(g2, this.plot, dataArea, domainAxis, rangeAxis,
                0, info);
    }

}
 
Example 2
Source File: JGenProg2017_0044_s.java    From coming with MIT License 6 votes vote down vote up
/**
 * Draws all the annotations for the specified layer.
 *
 * @param g2  the graphics device.
 * @param dataArea  the data area.
 * @param domainAxis  the domain axis.
 * @param rangeAxis  the range axis.
 * @param layer  the layer.
 * @param info  the plot rendering info.
 *
 * @since 1.2.0
 */
public void drawAnnotations(Graphics2D g2, Rectangle2D dataArea,
        CategoryAxis domainAxis, ValueAxis rangeAxis, Layer layer,
        PlotRenderingInfo info) {

    Iterator iterator = null;
    if (layer.equals(Layer.FOREGROUND)) {
        iterator = this.foregroundAnnotations.iterator();
    }
    else if (layer.equals(Layer.BACKGROUND)) {
        iterator = this.backgroundAnnotations.iterator();
    }
    else {
        // should not get here
        throw new RuntimeException("Unknown layer.");
    }
    while (iterator.hasNext()) {
        CategoryAnnotation annotation = (CategoryAnnotation) iterator.next();
        annotation.draw(g2, this.plot, dataArea, domainAxis, rangeAxis,
                0, info);
    }

}
 
Example 3
Source File: Cardumen_0075_s.java    From coming with MIT License 6 votes vote down vote up
/**
 * Draws all the annotations for the specified layer.
 *
 * @param g2  the graphics device.
 * @param dataArea  the data area.
 * @param domainAxis  the domain axis.
 * @param rangeAxis  the range axis.
 * @param layer  the layer.
 * @param info  the plot rendering info.
 *
 * @since 1.2.0
 */
public void drawAnnotations(Graphics2D g2, Rectangle2D dataArea,
        CategoryAxis domainAxis, ValueAxis rangeAxis, Layer layer,
        PlotRenderingInfo info) {

    Iterator iterator = null;
    if (layer.equals(Layer.FOREGROUND)) {
        iterator = this.foregroundAnnotations.iterator();
    }
    else if (layer.equals(Layer.BACKGROUND)) {
        iterator = this.backgroundAnnotations.iterator();
    }
    else {
        // should not get here
        throw new RuntimeException("Unknown layer.");
    }
    while (iterator.hasNext()) {
        CategoryAnnotation annotation = (CategoryAnnotation) iterator.next();
        annotation.draw(g2, this.plot, dataArea, domainAxis, rangeAxis,
                0, info);
    }

}
 
Example 4
Source File: Arja_0089_s.java    From coming with MIT License 6 votes vote down vote up
/**
 * Draws all the annotations for the specified layer.
 *
 * @param g2  the graphics device.
 * @param dataArea  the data area.
 * @param domainAxis  the domain axis.
 * @param rangeAxis  the range axis.
 * @param layer  the layer.
 * @param info  the plot rendering info.
 *
 * @since 1.2.0
 */
public void drawAnnotations(Graphics2D g2, Rectangle2D dataArea,
        CategoryAxis domainAxis, ValueAxis rangeAxis, Layer layer,
        PlotRenderingInfo info) {

    Iterator iterator = null;
    if (layer.equals(Layer.FOREGROUND)) {
        iterator = this.foregroundAnnotations.iterator();
    }
    else if (layer.equals(Layer.BACKGROUND)) {
        iterator = this.backgroundAnnotations.iterator();
    }
    else {
        // should not get here
        throw new RuntimeException("Unknown layer.");
    }
    while (iterator.hasNext()) {
        CategoryAnnotation annotation = (CategoryAnnotation) iterator.next();
        annotation.draw(g2, this.plot, dataArea, domainAxis, rangeAxis,
                0, info);
    }

}
 
Example 5
Source File: Arja_00112_s.java    From coming with MIT License 6 votes vote down vote up
/**
 * Draws all the annotations for the specified layer.
 *
 * @param g2  the graphics device.
 * @param dataArea  the data area.
 * @param domainAxis  the domain axis.
 * @param rangeAxis  the range axis.
 * @param layer  the layer.
 * @param info  the plot rendering info.
 *
 * @since 1.2.0
 */
public void drawAnnotations(Graphics2D g2, Rectangle2D dataArea,
        CategoryAxis domainAxis, ValueAxis rangeAxis, Layer layer,
        PlotRenderingInfo info) {

    Iterator iterator = null;
    if (layer.equals(Layer.FOREGROUND)) {
        iterator = this.foregroundAnnotations.iterator();
    }
    else if (layer.equals(Layer.BACKGROUND)) {
        iterator = this.backgroundAnnotations.iterator();
    }
    else {
        // should not get here
        throw new RuntimeException("Unknown layer.");
    }
    while (iterator.hasNext()) {
        CategoryAnnotation annotation = (CategoryAnnotation) iterator.next();
        annotation.draw(g2, this.plot, dataArea, domainAxis, rangeAxis,
                0, info);
    }

}
 
Example 6
Source File: Arja_0062_s.java    From coming with MIT License 6 votes vote down vote up
/**
 * Draws all the annotations for the specified layer.
 *
 * @param g2  the graphics device.
 * @param dataArea  the data area.
 * @param domainAxis  the domain axis.
 * @param rangeAxis  the range axis.
 * @param layer  the layer.
 * @param info  the plot rendering info.
 *
 * @since 1.2.0
 */
public void drawAnnotations(Graphics2D g2, Rectangle2D dataArea,
        CategoryAxis domainAxis, ValueAxis rangeAxis, Layer layer,
        PlotRenderingInfo info) {

    Iterator iterator = null;
    if (layer.equals(Layer.FOREGROUND)) {
        iterator = this.foregroundAnnotations.iterator();
    }
    else if (layer.equals(Layer.BACKGROUND)) {
        iterator = this.backgroundAnnotations.iterator();
    }
    else {
        // should not get here
        throw new RuntimeException("Unknown layer.");
    }
    while (iterator.hasNext()) {
        CategoryAnnotation annotation = (CategoryAnnotation) iterator.next();
        annotation.draw(g2, this.plot, dataArea, domainAxis, rangeAxis,
                0, info);
    }

}
 
Example 7
Source File: Arja_000_t.java    From coming with MIT License 6 votes vote down vote up
/**
 * Draws all the annotations for the specified layer.
 *
 * @param g2  the graphics device.
 * @param dataArea  the data area.
 * @param domainAxis  the domain axis.
 * @param rangeAxis  the range axis.
 * @param layer  the layer.
 * @param info  the plot rendering info.
 *
 * @since 1.2.0
 */
public void drawAnnotations(Graphics2D g2, Rectangle2D dataArea,
        CategoryAxis domainAxis, ValueAxis rangeAxis, Layer layer,
        PlotRenderingInfo info) {

    Iterator iterator = null;
    if (layer.equals(Layer.FOREGROUND)) {
        iterator = this.foregroundAnnotations.iterator();
    }
    else if (layer.equals(Layer.BACKGROUND)) {
        iterator = this.backgroundAnnotations.iterator();
    }
    else {
        // should not get here
        throw new RuntimeException("Unknown layer.");
    }
    while (iterator.hasNext()) {
        CategoryAnnotation annotation = (CategoryAnnotation) iterator.next();
        annotation.draw(g2, this.plot, dataArea, domainAxis, rangeAxis,
                0, info);
    }

}
 
Example 8
Source File: JGenProg2017_00124_t.java    From coming with MIT License 6 votes vote down vote up
/**
 * Draws all the annotations for the specified layer.
 *
 * @param g2  the graphics device.
 * @param dataArea  the data area.
 * @param domainAxis  the domain axis.
 * @param rangeAxis  the range axis.
 * @param layer  the layer.
 * @param info  the plot rendering info.
 *
 * @since 1.2.0
 */
public void drawAnnotations(Graphics2D g2, Rectangle2D dataArea,
        CategoryAxis domainAxis, ValueAxis rangeAxis, Layer layer,
        PlotRenderingInfo info) {

    Iterator iterator = null;
    if (layer.equals(Layer.FOREGROUND)) {
        iterator = this.foregroundAnnotations.iterator();
    }
    else if (layer.equals(Layer.BACKGROUND)) {
        iterator = this.backgroundAnnotations.iterator();
    }
    else {
        // should not get here
        throw new RuntimeException("Unknown layer.");
    }
    while (iterator.hasNext()) {
        CategoryAnnotation annotation = (CategoryAnnotation) iterator.next();
        annotation.draw(g2, this.plot, dataArea, domainAxis, rangeAxis,
                0, info);
    }

}
 
Example 9
Source File: jMutRepair_000_t.java    From coming with MIT License 6 votes vote down vote up
/**
 * Draws all the annotations for the specified layer.
 *
 * @param g2  the graphics device.
 * @param dataArea  the data area.
 * @param domainAxis  the domain axis.
 * @param rangeAxis  the range axis.
 * @param layer  the layer.
 * @param info  the plot rendering info.
 *
 * @since 1.2.0
 */
public void drawAnnotations(Graphics2D g2, Rectangle2D dataArea,
        CategoryAxis domainAxis, ValueAxis rangeAxis, Layer layer,
        PlotRenderingInfo info) {

    Iterator iterator = null;
    if (layer.equals(Layer.FOREGROUND)) {
        iterator = this.foregroundAnnotations.iterator();
    }
    else if (layer.equals(Layer.BACKGROUND)) {
        iterator = this.backgroundAnnotations.iterator();
    }
    else {
        // should not get here
        throw new RuntimeException("Unknown layer.");
    }
    while (iterator.hasNext()) {
        CategoryAnnotation annotation = (CategoryAnnotation) iterator.next();
        annotation.draw(g2, this.plot, dataArea, domainAxis, rangeAxis,
                0, info);
    }

}
 
Example 10
Source File: Cardumen_000_t.java    From coming with MIT License 6 votes vote down vote up
/**
 * Draws all the annotations for the specified layer.
 *
 * @param g2  the graphics device.
 * @param dataArea  the data area.
 * @param domainAxis  the domain axis.
 * @param rangeAxis  the range axis.
 * @param layer  the layer.
 * @param info  the plot rendering info.
 *
 * @since 1.2.0
 */
public void drawAnnotations(Graphics2D g2, Rectangle2D dataArea,
        CategoryAxis domainAxis, ValueAxis rangeAxis, Layer layer,
        PlotRenderingInfo info) {

    Iterator iterator = null;
    if (layer.equals(Layer.FOREGROUND)) {
        iterator = this.foregroundAnnotations.iterator();
    }
    else if (layer.equals(Layer.BACKGROUND)) {
        iterator = this.backgroundAnnotations.iterator();
    }
    else {
        // should not get here
        throw new RuntimeException("Unknown layer.");
    }
    while (iterator.hasNext()) {
        CategoryAnnotation annotation = (CategoryAnnotation) iterator.next();
        annotation.draw(g2, this.plot, dataArea, domainAxis, rangeAxis,
                0, info);
    }

}
 
Example 11
Source File: CategoryPlot.java    From ccu-historian with GNU General Public License v3.0 5 votes vote down vote up
/**
 * Draws the annotations.
 *
 * @param g2  the graphics device.
 * @param dataArea  the data area.
 */
protected void drawAnnotations(Graphics2D g2, Rectangle2D dataArea) {

    if (getAnnotations() != null) {
        Iterator iterator = getAnnotations().iterator();
        while (iterator.hasNext()) {
            CategoryAnnotation annotation
                    = (CategoryAnnotation) iterator.next();
            annotation.draw(g2, this, dataArea, getDomainAxis(),
                    getRangeAxis());
        }
    }

}
 
Example 12
Source File: jMutRepair_0021_s.java    From coming with MIT License 5 votes vote down vote up
/**
 * Draws the annotations...
 *
 * @param g2  the graphics device.
 * @param dataArea  the data area.
 */
protected void drawAnnotations(Graphics2D g2, Rectangle2D dataArea) {

    if (getAnnotations() != null) {
        Iterator iterator = getAnnotations().iterator();
        while (iterator.hasNext()) {
            CategoryAnnotation annotation 
                    = (CategoryAnnotation) iterator.next();
            annotation.draw(g2, this, dataArea, getDomainAxis(), 
                    getRangeAxis());
        }
    }

}
 
Example 13
Source File: CategoryPlot.java    From astor with GNU General Public License v2.0 5 votes vote down vote up
/**
 * Draws the annotations.
 *
 * @param g2  the graphics device.
 * @param dataArea  the data area.
 * @param info  the plot rendering info (<code>null</code> permitted).
 */
protected void drawAnnotations(Graphics2D g2, Rectangle2D dataArea,
        PlotRenderingInfo info) {

    Iterator iterator = getAnnotations().iterator();
    while (iterator.hasNext()) {
        CategoryAnnotation annotation 
                = (CategoryAnnotation) iterator.next();
        annotation.draw(g2, this, dataArea, getDomainAxis(), 
                getRangeAxis(), 0, info);
    }

}
 
Example 14
Source File: 1_CategoryPlot.java    From SimFix with GNU General Public License v2.0 5 votes vote down vote up
/**
 * Draws the annotations.
 *
 * @param g2  the graphics device.
 * @param dataArea  the data area.
 * @param info  the plot rendering info (<code>null</code> permitted).
 */
protected void drawAnnotations(Graphics2D g2, Rectangle2D dataArea,
        PlotRenderingInfo info) {

    Iterator iterator = getAnnotations().iterator();
    while (iterator.hasNext()) {
        CategoryAnnotation annotation 
                = (CategoryAnnotation) iterator.next();
        annotation.draw(g2, this, dataArea, getDomainAxis(), 
                getRangeAxis(), 0, info);
    }

}
 
Example 15
Source File: patch1-Chart-26-jMutRepair_patch1-Chart-26-jMutRepair_t.java    From coming with MIT License 5 votes vote down vote up
/**
 * Draws the annotations...
 *
 * @param g2  the graphics device.
 * @param dataArea  the data area.
 */
protected void drawAnnotations(Graphics2D g2, Rectangle2D dataArea) {

    if (getAnnotations() != null) {
        Iterator iterator = getAnnotations().iterator();
        while (iterator.hasNext()) {
            CategoryAnnotation annotation 
                    = (CategoryAnnotation) iterator.next();
            annotation.draw(g2, this, dataArea, getDomainAxis(), 
                    getRangeAxis());
        }
    }

}
 
Example 16
Source File: jMutRepair_0030_t.java    From coming with MIT License 5 votes vote down vote up
/**
 * Draws the annotations...
 *
 * @param g2  the graphics device.
 * @param dataArea  the data area.
 */
protected void drawAnnotations(Graphics2D g2, Rectangle2D dataArea) {

    if (getAnnotations() != null) {
        Iterator iterator = getAnnotations().iterator();
        while (iterator.hasNext()) {
            CategoryAnnotation annotation 
                    = (CategoryAnnotation) iterator.next();
            annotation.draw(g2, this, dataArea, getDomainAxis(), 
                    getRangeAxis());
        }
    }

}
 
Example 17
Source File: Cardumen_006_s.java    From coming with MIT License 5 votes vote down vote up
/**
 * Draws the annotations.
 *
 * @param g2  the graphics device.
 * @param dataArea  the data area.
 * @param info  the plot rendering info (<code>null</code> permitted).
 */
protected void drawAnnotations(Graphics2D g2, Rectangle2D dataArea,
        PlotRenderingInfo info) {

    Iterator iterator = getAnnotations().iterator();
    while (iterator.hasNext()) {
        CategoryAnnotation annotation 
                = (CategoryAnnotation) iterator.next();
        annotation.draw(g2, this, dataArea, getDomainAxis(), 
                getRangeAxis(), 0, info);
    }

}
 
Example 18
Source File: patch1-Chart-26-jMutRepair_patch1-Chart-26-jMutRepair_s.java    From coming with MIT License 5 votes vote down vote up
/**
 * Draws the annotations...
 *
 * @param g2  the graphics device.
 * @param dataArea  the data area.
 */
protected void drawAnnotations(Graphics2D g2, Rectangle2D dataArea) {

    if (getAnnotations() != null) {
        Iterator iterator = getAnnotations().iterator();
        while (iterator.hasNext()) {
            CategoryAnnotation annotation 
                    = (CategoryAnnotation) iterator.next();
            annotation.draw(g2, this, dataArea, getDomainAxis(), 
                    getRangeAxis());
        }
    }

}
 
Example 19
Source File: 1_CategoryPlot.java    From SimFix with GNU General Public License v2.0 5 votes vote down vote up
/**
 * Draws the annotations.
 *
 * @param g2  the graphics device.
 * @param dataArea  the data area.
 * @param info  the plot rendering info (<code>null</code> permitted).
 */
protected void drawAnnotations(Graphics2D g2, Rectangle2D dataArea,
        PlotRenderingInfo info) {

    Iterator iterator = getAnnotations().iterator();
    while (iterator.hasNext()) {
        CategoryAnnotation annotation 
                = (CategoryAnnotation) iterator.next();
        annotation.draw(g2, this, dataArea, getDomainAxis(), 
                getRangeAxis(), 0, info);
    }

}
 
Example 20
Source File: Nopol2017_005_s.java    From coming with MIT License 5 votes vote down vote up
/**
 * Draws the annotations...
 *
 * @param g2  the graphics device.
 * @param dataArea  the data area.
 */
protected void drawAnnotations(Graphics2D g2, Rectangle2D dataArea) {

    if (getAnnotations() != null) {
        Iterator iterator = getAnnotations().iterator();
        while (iterator.hasNext()) {
            CategoryAnnotation annotation 
                    = (CategoryAnnotation) iterator.next();
            annotation.draw(g2, this, dataArea, getDomainAxis(), 
                    getRangeAxis());
        }
    }

}