Java 类org.jfree.ui.GradientPaintTransformer 实例源码

项目:parabuild-ci    文件:XYBarRenderer.java   
/**
 * Returns a clone of the renderer.
 *
 * @return A clone.
 *
 * @throws CloneNotSupportedException  if the renderer cannot be cloned.
 */
public Object clone() throws CloneNotSupportedException {
    XYBarRenderer result = (XYBarRenderer) super.clone();
    if (this.gradientPaintTransformer != null) {
        if (this.gradientPaintTransformer instanceof PublicCloneable) {
            PublicCloneable pc = (PublicCloneable) this.gradientPaintTransformer;
            result.gradientPaintTransformer = (GradientPaintTransformer) pc.clone();
        }
        else {
            throw new CloneNotSupportedException(
                "GradientPaintTransformer doesn't implement PublicCloneable"
            );
        }
    }
    return result;
}
项目:ccu-historian    文件:StandardXYBarPainter.java   
/**
 * Paints a single bar instance.
 *
 * @param g2  the graphics target.
 * @param renderer  the renderer.
 * @param row  the row index.
 * @param column  the column index.
 * @param bar  the bar
 * @param base  indicates which side of the rectangle is the base of the
 *              bar.
 */
@Override
public void paintBar(Graphics2D g2, XYBarRenderer renderer, int row,
        int column, RectangularShape bar, RectangleEdge base) {

    Paint itemPaint = renderer.getItemPaint(row, column);
    GradientPaintTransformer t = renderer.getGradientPaintTransformer();
    if (t != null && itemPaint instanceof GradientPaint) {
        itemPaint = t.transform((GradientPaint) itemPaint, bar);
    }
    g2.setPaint(itemPaint);
    g2.fill(bar);

    // draw the outline...
    if (renderer.isDrawBarOutline()) {
           // && state.getBarWidth() > BAR_OUTLINE_WIDTH_THRESHOLD) {
        Stroke stroke = renderer.getItemOutlineStroke(row, column);
        Paint paint = renderer.getItemOutlinePaint(row, column);
        if (stroke != null && paint != null) {
            g2.setStroke(stroke);
            g2.setPaint(paint);
            g2.draw(bar);
        }
    }

}
项目:ccu-historian    文件:StandardBarPainter.java   
/**
 * Paints a single bar instance.
 *
 * @param g2  the graphics target.
 * @param renderer  the renderer.
 * @param row  the row index.
 * @param column  the column index.
 * @param bar  the bar
 * @param base  indicates which side of the rectangle is the base of the
 *              bar.
 */
@Override
public void paintBar(Graphics2D g2, BarRenderer renderer, int row,
        int column, RectangularShape bar, RectangleEdge base) {

    Paint itemPaint = renderer.getItemPaint(row, column);
    GradientPaintTransformer t = renderer.getGradientPaintTransformer();
    if (t != null && itemPaint instanceof GradientPaint) {
        itemPaint = t.transform((GradientPaint) itemPaint, bar);
    }
    g2.setPaint(itemPaint);
    g2.fill(bar);

    // draw the outline...
    if (renderer.isDrawBarOutline()) {
           // && state.getBarWidth() > BAR_OUTLINE_WIDTH_THRESHOLD) {
        Stroke stroke = renderer.getItemOutlineStroke(row, column);
        Paint paint = renderer.getItemOutlinePaint(row, column);
        if (stroke != null && paint != null) {
            g2.setStroke(stroke);
            g2.setPaint(paint);
            g2.draw(bar);
        }
    }

}
项目:aya-lang    文件:StandardXYBarPainter.java   
/**
 * Paints a single bar instance.
 *
 * @param g2  the graphics target.
 * @param renderer  the renderer.
 * @param row  the row index.
 * @param column  the column index.
 * @param bar  the bar
 * @param base  indicates which side of the rectangle is the base of the
 *              bar.
 */
@Override
public void paintBar(Graphics2D g2, XYBarRenderer renderer, int row,
        int column, RectangularShape bar, RectangleEdge base) {

    Paint itemPaint = renderer.getItemPaint(row, column);
    GradientPaintTransformer t = renderer.getGradientPaintTransformer();
    if (t != null && itemPaint instanceof GradientPaint) {
        itemPaint = t.transform((GradientPaint) itemPaint, bar);
    }
    g2.setPaint(itemPaint);
    g2.fill(bar);

    // draw the outline...
    if (renderer.isDrawBarOutline()) {
           // && state.getBarWidth() > BAR_OUTLINE_WIDTH_THRESHOLD) {
        Stroke stroke = renderer.getItemOutlineStroke(row, column);
        Paint paint = renderer.getItemOutlinePaint(row, column);
        if (stroke != null && paint != null) {
            g2.setStroke(stroke);
            g2.setPaint(paint);
            g2.draw(bar);
        }
    }

}
项目:aya-lang    文件:StandardBarPainter.java   
/**
 * Paints a single bar instance.
 *
 * @param g2  the graphics target.
 * @param renderer  the renderer.
 * @param row  the row index.
 * @param column  the column index.
 * @param bar  the bar
 * @param base  indicates which side of the rectangle is the base of the
 *              bar.
 */
@Override
public void paintBar(Graphics2D g2, BarRenderer renderer, int row,
        int column, RectangularShape bar, RectangleEdge base) {

    Paint itemPaint = renderer.getItemPaint(row, column);
    GradientPaintTransformer t = renderer.getGradientPaintTransformer();
    if (t != null && itemPaint instanceof GradientPaint) {
        itemPaint = t.transform((GradientPaint) itemPaint, bar);
    }
    g2.setPaint(itemPaint);
    g2.fill(bar);

    // draw the outline...
    if (renderer.isDrawBarOutline()) {
           // && state.getBarWidth() > BAR_OUTLINE_WIDTH_THRESHOLD) {
        Stroke stroke = renderer.getItemOutlineStroke(row, column);
        Paint paint = renderer.getItemOutlinePaint(row, column);
        if (stroke != null && paint != null) {
            g2.setStroke(stroke);
            g2.setPaint(paint);
            g2.draw(bar);
        }
    }

}
项目:HTML5_WebSite    文件:StandardXYBarPainter.java   
/**
 * Paints a single bar instance.
 *
 * @param g2  the graphics target.
 * @param renderer  the renderer.
 * @param row  the row index.
 * @param column  the column index.
 * @param bar  the bar
 * @param base  indicates which side of the rectangle is the base of the
 *              bar.
 */
public void paintBar(Graphics2D g2, XYBarRenderer renderer, int row,
        int column, RectangularShape bar, RectangleEdge base) {

    Paint itemPaint = renderer.getItemPaint(row, column);
    GradientPaintTransformer t = renderer.getGradientPaintTransformer();
    if (t != null && itemPaint instanceof GradientPaint) {
        itemPaint = t.transform((GradientPaint) itemPaint, bar);
    }
    g2.setPaint(itemPaint);
    g2.fill(bar);

    // draw the outline...
    if (renderer.isDrawBarOutline()) {
           // && state.getBarWidth() > BAR_OUTLINE_WIDTH_THRESHOLD) {
        Stroke stroke = renderer.getItemOutlineStroke(row, column);
        Paint paint = renderer.getItemOutlinePaint(row, column);
        if (stroke != null && paint != null) {
            g2.setStroke(stroke);
            g2.setPaint(paint);
            g2.draw(bar);
        }
    }

}
项目:HTML5_WebSite    文件:StandardBarPainter.java   
/**
 * Paints a single bar instance.
 *
 * @param g2  the graphics target.
 * @param renderer  the renderer.
 * @param row  the row index.
 * @param column  the column index.
 * @param bar  the bar
 * @param base  indicates which side of the rectangle is the base of the
 *              bar.
 */
public void paintBar(Graphics2D g2, BarRenderer renderer, int row,
        int column, RectangularShape bar, RectangleEdge base) {

    Paint itemPaint = renderer.getItemPaint(row, column);
    GradientPaintTransformer t = renderer.getGradientPaintTransformer();
    if (t != null && itemPaint instanceof GradientPaint) {
        itemPaint = t.transform((GradientPaint) itemPaint, bar);
    }
    g2.setPaint(itemPaint);
    g2.fill(bar);

    // draw the outline...
    if (renderer.isDrawBarOutline()) {
           // && state.getBarWidth() > BAR_OUTLINE_WIDTH_THRESHOLD) {
        Stroke stroke = renderer.getItemOutlineStroke(row, column);
        Paint paint = renderer.getItemOutlinePaint(row, column);
        if (stroke != null && paint != null) {
            g2.setStroke(stroke);
            g2.setPaint(paint);
            g2.draw(bar);
        }
    }

}
项目:populus    文件:StandardXYBarPainter.java   
/**
 * Paints a single bar instance.
 *
 * @param g2  the graphics target.
 * @param renderer  the renderer.
 * @param row  the row index.
 * @param column  the column index.
 * @param bar  the bar
 * @param base  indicates which side of the rectangle is the base of the
 *              bar.
 */
@Override
public void paintBar(Graphics2D g2, XYBarRenderer renderer, int row,
        int column, RectangularShape bar, RectangleEdge base) {

    Paint itemPaint = renderer.getItemPaint(row, column);
    GradientPaintTransformer t = renderer.getGradientPaintTransformer();
    if (t != null && itemPaint instanceof GradientPaint) {
        itemPaint = t.transform((GradientPaint) itemPaint, bar);
    }
    g2.setPaint(itemPaint);
    g2.fill(bar);

    // draw the outline...
    if (renderer.isDrawBarOutline()) {
           // && state.getBarWidth() > BAR_OUTLINE_WIDTH_THRESHOLD) {
        Stroke stroke = renderer.getItemOutlineStroke(row, column);
        Paint paint = renderer.getItemOutlinePaint(row, column);
        if (stroke != null && paint != null) {
            g2.setStroke(stroke);
            g2.setPaint(paint);
            g2.draw(bar);
        }
    }

}
项目:populus    文件:StandardBarPainter.java   
/**
 * Paints a single bar instance.
 *
 * @param g2  the graphics target.
 * @param renderer  the renderer.
 * @param row  the row index.
 * @param column  the column index.
 * @param bar  the bar
 * @param base  indicates which side of the rectangle is the base of the
 *              bar.
 */
@Override
public void paintBar(Graphics2D g2, BarRenderer renderer, int row,
        int column, RectangularShape bar, RectangleEdge base) {

    Paint itemPaint = renderer.getItemPaint(row, column);
    GradientPaintTransformer t = renderer.getGradientPaintTransformer();
    if (t != null && itemPaint instanceof GradientPaint) {
        itemPaint = t.transform((GradientPaint) itemPaint, bar);
    }
    g2.setPaint(itemPaint);
    g2.fill(bar);

    // draw the outline...
    if (renderer.isDrawBarOutline()) {
           // && state.getBarWidth() > BAR_OUTLINE_WIDTH_THRESHOLD) {
        Stroke stroke = renderer.getItemOutlineStroke(row, column);
        Paint paint = renderer.getItemOutlinePaint(row, column);
        if (stroke != null && paint != null) {
            g2.setStroke(stroke);
            g2.setPaint(paint);
            g2.draw(bar);
        }
    }

}
项目:PI    文件:StandardXYBarPainter.java   
/**
 * Paints a single bar instance.
 *
 * @param g2  the graphics target.
 * @param renderer  the renderer.
 * @param row  the row index.
 * @param column  the column index.
 * @param bar  the bar
 * @param base  indicates which side of the rectangle is the base of the
 *              bar.
 */
public void paintBar(Graphics2D g2, XYBarRenderer renderer, int row,
        int column, RectangularShape bar, RectangleEdge base) {

    Paint itemPaint = renderer.getItemPaint(row, column);
    GradientPaintTransformer t = renderer.getGradientPaintTransformer();
    if (t != null && itemPaint instanceof GradientPaint) {
        itemPaint = t.transform((GradientPaint) itemPaint, bar);
    }
    g2.setPaint(itemPaint);
    g2.fill(bar);

    // draw the outline...
    if (renderer.isDrawBarOutline()) {
           // && state.getBarWidth() > BAR_OUTLINE_WIDTH_THRESHOLD) {
        Stroke stroke = renderer.getItemOutlineStroke(row, column);
        Paint paint = renderer.getItemOutlinePaint(row, column);
        if (stroke != null && paint != null) {
            g2.setStroke(stroke);
            g2.setPaint(paint);
            g2.draw(bar);
        }
    }

}
项目:PI    文件:StandardBarPainter.java   
/**
 * Paints a single bar instance.
 *
 * @param g2  the graphics target.
 * @param renderer  the renderer.
 * @param row  the row index.
 * @param column  the column index.
 * @param bar  the bar
 * @param base  indicates which side of the rectangle is the base of the
 *              bar.
 */
public void paintBar(Graphics2D g2, BarRenderer renderer, int row,
        int column, RectangularShape bar, RectangleEdge base) {

    Paint itemPaint = renderer.getItemPaint(row, column);
    GradientPaintTransformer t = renderer.getGradientPaintTransformer();
    if (t != null && itemPaint instanceof GradientPaint) {
        itemPaint = t.transform((GradientPaint) itemPaint, bar);
    }
    g2.setPaint(itemPaint);
    g2.fill(bar);

    // draw the outline...
    if (renderer.isDrawBarOutline()) {
           // && state.getBarWidth() > BAR_OUTLINE_WIDTH_THRESHOLD) {
        Stroke stroke = renderer.getItemOutlineStroke(row, column);
        Paint paint = renderer.getItemOutlinePaint(row, column);
        if (stroke != null && paint != null) {
            g2.setStroke(stroke);
            g2.setPaint(paint);
            g2.draw(bar);
        }
    }

}
项目:ECG-Viewer    文件:StandardXYBarPainter.java   
/**
 * Paints a single bar instance.
 *
 * @param g2  the graphics target.
 * @param renderer  the renderer.
 * @param row  the row index.
 * @param column  the column index.
 * @param bar  the bar
 * @param base  indicates which side of the rectangle is the base of the
 *              bar.
 */
@Override
public void paintBar(Graphics2D g2, XYBarRenderer renderer, int row,
        int column, RectangularShape bar, RectangleEdge base) {

    Paint itemPaint = renderer.getItemPaint(row, column);
    GradientPaintTransformer t = renderer.getGradientPaintTransformer();
    if (t != null && itemPaint instanceof GradientPaint) {
        itemPaint = t.transform((GradientPaint) itemPaint, bar);
    }
    g2.setPaint(itemPaint);
    g2.fill(bar);

    // draw the outline...
    if (renderer.isDrawBarOutline()) {
           // && state.getBarWidth() > BAR_OUTLINE_WIDTH_THRESHOLD) {
        Stroke stroke = renderer.getItemOutlineStroke(row, column);
        Paint paint = renderer.getItemOutlinePaint(row, column);
        if (stroke != null && paint != null) {
            g2.setStroke(stroke);
            g2.setPaint(paint);
            g2.draw(bar);
        }
    }

}
项目:ECG-Viewer    文件:StandardBarPainter.java   
/**
 * Paints a single bar instance.
 *
 * @param g2  the graphics target.
 * @param renderer  the renderer.
 * @param row  the row index.
 * @param column  the column index.
 * @param bar  the bar
 * @param base  indicates which side of the rectangle is the base of the
 *              bar.
 */
@Override
public void paintBar(Graphics2D g2, BarRenderer renderer, int row,
        int column, RectangularShape bar, RectangleEdge base) {

    Paint itemPaint = renderer.getItemPaint(row, column);
    GradientPaintTransformer t = renderer.getGradientPaintTransformer();
    if (t != null && itemPaint instanceof GradientPaint) {
        itemPaint = t.transform((GradientPaint) itemPaint, bar);
    }
    g2.setPaint(itemPaint);
    g2.fill(bar);

    // draw the outline...
    if (renderer.isDrawBarOutline()) {
           // && state.getBarWidth() > BAR_OUTLINE_WIDTH_THRESHOLD) {
        Stroke stroke = renderer.getItemOutlineStroke(row, column);
        Paint paint = renderer.getItemOutlinePaint(row, column);
        if (stroke != null && paint != null) {
            g2.setStroke(stroke);
            g2.setPaint(paint);
            g2.draw(bar);
        }
    }

}
项目:group-five    文件:StandardXYBarPainter.java   
/**
 * Paints a single bar instance.
 *
 * @param g2  the graphics target.
 * @param renderer  the renderer.
 * @param row  the row index.
 * @param column  the column index.
 * @param bar  the bar
 * @param base  indicates which side of the rectangle is the base of the
 *              bar.
 */
@Override
public void paintBar(Graphics2D g2, XYBarRenderer renderer, int row,
        int column, RectangularShape bar, RectangleEdge base) {

    Paint itemPaint = renderer.getItemPaint(row, column);
    GradientPaintTransformer t = renderer.getGradientPaintTransformer();
    if (t != null && itemPaint instanceof GradientPaint) {
        itemPaint = t.transform((GradientPaint) itemPaint, bar);
    }
    g2.setPaint(itemPaint);
    g2.fill(bar);

    // draw the outline...
    if (renderer.isDrawBarOutline()) {
           // && state.getBarWidth() > BAR_OUTLINE_WIDTH_THRESHOLD) {
        Stroke stroke = renderer.getItemOutlineStroke(row, column);
        Paint paint = renderer.getItemOutlinePaint(row, column);
        if (stroke != null && paint != null) {
            g2.setStroke(stroke);
            g2.setPaint(paint);
            g2.draw(bar);
        }
    }

}
项目:group-five    文件:StandardBarPainter.java   
/**
 * Paints a single bar instance.
 *
 * @param g2  the graphics target.
 * @param renderer  the renderer.
 * @param row  the row index.
 * @param column  the column index.
 * @param bar  the bar
 * @param base  indicates which side of the rectangle is the base of the
 *              bar.
 */
@Override
public void paintBar(Graphics2D g2, BarRenderer renderer, int row,
        int column, RectangularShape bar, RectangleEdge base) {

    Paint itemPaint = renderer.getItemPaint(row, column);
    GradientPaintTransformer t = renderer.getGradientPaintTransformer();
    if (t != null && itemPaint instanceof GradientPaint) {
        itemPaint = t.transform((GradientPaint) itemPaint, bar);
    }
    g2.setPaint(itemPaint);
    g2.fill(bar);

    // draw the outline...
    if (renderer.isDrawBarOutline()) {
           // && state.getBarWidth() > BAR_OUTLINE_WIDTH_THRESHOLD) {
        Stroke stroke = renderer.getItemOutlineStroke(row, column);
        Paint paint = renderer.getItemOutlinePaint(row, column);
        if (stroke != null && paint != null) {
            g2.setStroke(stroke);
            g2.setPaint(paint);
            g2.draw(bar);
        }
    }

}
项目:manydesigns.cn    文件:StandardXYBarPainter.java   
/**
 * Paints a single bar instance.
 *
 * @param g2  the graphics target.
 * @param renderer  the renderer.
 * @param row  the row index.
 * @param column  the column index.
 * @param bar  the bar
 * @param base  indicates which side of the rectangle is the base of the
 *              bar.
 */
@Override
public void paintBar(Graphics2D g2, XYBarRenderer renderer, int row,
        int column, RectangularShape bar, RectangleEdge base) {

    Paint itemPaint = renderer.getItemPaint(row, column);
    GradientPaintTransformer t = renderer.getGradientPaintTransformer();
    if (t != null && itemPaint instanceof GradientPaint) {
        itemPaint = t.transform((GradientPaint) itemPaint, bar);
    }
    g2.setPaint(itemPaint);
    g2.fill(bar);

    // draw the outline...
    if (renderer.isDrawBarOutline()) {
           // && state.getBarWidth() > BAR_OUTLINE_WIDTH_THRESHOLD) {
        Stroke stroke = renderer.getItemOutlineStroke(row, column);
        Paint paint = renderer.getItemOutlinePaint(row, column);
        if (stroke != null && paint != null) {
            g2.setStroke(stroke);
            g2.setPaint(paint);
            g2.draw(bar);
        }
    }

}
项目:manydesigns.cn    文件:StandardBarPainter.java   
/**
 * Paints a single bar instance.
 *
 * @param g2  the graphics target.
 * @param renderer  the renderer.
 * @param row  the row index.
 * @param column  the column index.
 * @param bar  the bar
 * @param base  indicates which side of the rectangle is the base of the
 *              bar.
 */
@Override
public void paintBar(Graphics2D g2, BarRenderer renderer, int row,
        int column, RectangularShape bar, RectangleEdge base) {

    Paint itemPaint = renderer.getItemPaint(row, column);
    GradientPaintTransformer t = renderer.getGradientPaintTransformer();
    if (t != null && itemPaint instanceof GradientPaint) {
        itemPaint = t.transform((GradientPaint) itemPaint, bar);
    }
    g2.setPaint(itemPaint);
    g2.fill(bar);

    // draw the outline...
    if (renderer.isDrawBarOutline()) {
           // && state.getBarWidth() > BAR_OUTLINE_WIDTH_THRESHOLD) {
        Stroke stroke = renderer.getItemOutlineStroke(row, column);
        Paint paint = renderer.getItemOutlinePaint(row, column);
        if (stroke != null && paint != null) {
            g2.setStroke(stroke);
            g2.setPaint(paint);
            g2.draw(bar);
        }
    }

}
项目:buffer_bci    文件:StandardXYBarPainter.java   
/**
 * Paints a single bar instance.
 *
 * @param g2  the graphics target.
 * @param renderer  the renderer.
 * @param row  the row index.
 * @param column  the column index.
 * @param bar  the bar
 * @param base  indicates which side of the rectangle is the base of the
 *              bar.
 */
@Override
public void paintBar(Graphics2D g2, XYBarRenderer renderer, int row,
        int column, RectangularShape bar, RectangleEdge base) {

    Paint itemPaint = renderer.getItemPaint(row, column);
    GradientPaintTransformer t = renderer.getGradientPaintTransformer();
    if (t != null && itemPaint instanceof GradientPaint) {
        itemPaint = t.transform((GradientPaint) itemPaint, bar);
    }
    g2.setPaint(itemPaint);
    g2.fill(bar);

    // draw the outline...
    if (renderer.isDrawBarOutline()) {
           // && state.getBarWidth() > BAR_OUTLINE_WIDTH_THRESHOLD) {
        Stroke stroke = renderer.getItemOutlineStroke(row, column);
        Paint paint = renderer.getItemOutlinePaint(row, column);
        if (stroke != null && paint != null) {
            g2.setStroke(stroke);
            g2.setPaint(paint);
            g2.draw(bar);
        }
    }

}
项目:buffer_bci    文件:StandardBarPainter.java   
/**
 * Paints a single bar instance.
 *
 * @param g2  the graphics target.
 * @param renderer  the renderer.
 * @param row  the row index.
 * @param column  the column index.
 * @param bar  the bar
 * @param base  indicates which side of the rectangle is the base of the
 *              bar.
 */
@Override
public void paintBar(Graphics2D g2, BarRenderer renderer, int row,
        int column, RectangularShape bar, RectangleEdge base) {

    Paint itemPaint = renderer.getItemPaint(row, column);
    GradientPaintTransformer t = renderer.getGradientPaintTransformer();
    if (t != null && itemPaint instanceof GradientPaint) {
        itemPaint = t.transform((GradientPaint) itemPaint, bar);
    }
    g2.setPaint(itemPaint);
    g2.fill(bar);

    // draw the outline...
    if (renderer.isDrawBarOutline()) {
           // && state.getBarWidth() > BAR_OUTLINE_WIDTH_THRESHOLD) {
        Stroke stroke = renderer.getItemOutlineStroke(row, column);
        Paint paint = renderer.getItemOutlinePaint(row, column);
        if (stroke != null && paint != null) {
            g2.setStroke(stroke);
            g2.setPaint(paint);
            g2.draw(bar);
        }
    }

}
项目:buffer_bci    文件:StandardXYBarPainter.java   
/**
 * Paints a single bar instance.
 *
 * @param g2  the graphics target.
 * @param renderer  the renderer.
 * @param row  the row index.
 * @param column  the column index.
 * @param bar  the bar
 * @param base  indicates which side of the rectangle is the base of the
 *              bar.
 */
@Override
public void paintBar(Graphics2D g2, XYBarRenderer renderer, int row,
        int column, RectangularShape bar, RectangleEdge base) {

    Paint itemPaint = renderer.getItemPaint(row, column);
    GradientPaintTransformer t = renderer.getGradientPaintTransformer();
    if (t != null && itemPaint instanceof GradientPaint) {
        itemPaint = t.transform((GradientPaint) itemPaint, bar);
    }
    g2.setPaint(itemPaint);
    g2.fill(bar);

    // draw the outline...
    if (renderer.isDrawBarOutline()) {
           // && state.getBarWidth() > BAR_OUTLINE_WIDTH_THRESHOLD) {
        Stroke stroke = renderer.getItemOutlineStroke(row, column);
        Paint paint = renderer.getItemOutlinePaint(row, column);
        if (stroke != null && paint != null) {
            g2.setStroke(stroke);
            g2.setPaint(paint);
            g2.draw(bar);
        }
    }

}
项目:buffer_bci    文件:StandardBarPainter.java   
/**
 * Paints a single bar instance.
 *
 * @param g2  the graphics target.
 * @param renderer  the renderer.
 * @param row  the row index.
 * @param column  the column index.
 * @param bar  the bar
 * @param base  indicates which side of the rectangle is the base of the
 *              bar.
 */
@Override
public void paintBar(Graphics2D g2, BarRenderer renderer, int row,
        int column, RectangularShape bar, RectangleEdge base) {

    Paint itemPaint = renderer.getItemPaint(row, column);
    GradientPaintTransformer t = renderer.getGradientPaintTransformer();
    if (t != null && itemPaint instanceof GradientPaint) {
        itemPaint = t.transform((GradientPaint) itemPaint, bar);
    }
    g2.setPaint(itemPaint);
    g2.fill(bar);

    // draw the outline...
    if (renderer.isDrawBarOutline()) {
           // && state.getBarWidth() > BAR_OUTLINE_WIDTH_THRESHOLD) {
        Stroke stroke = renderer.getItemOutlineStroke(row, column);
        Paint paint = renderer.getItemOutlinePaint(row, column);
        if (stroke != null && paint != null) {
            g2.setStroke(stroke);
            g2.setPaint(paint);
            g2.draw(bar);
        }
    }

}
项目:proyecto-teoria-control-utn-frro    文件:StandardXYBarPainter.java   
/**
 * Paints a single bar instance.
 *
 * @param g2  the graphics target.
 * @param renderer  the renderer.
 * @param row  the row index.
 * @param column  the column index.
 * @param bar  the bar
 * @param base  indicates which side of the rectangle is the base of the
 *              bar.
 */
public void paintBar(Graphics2D g2, XYBarRenderer renderer, int row,
        int column, RectangularShape bar, RectangleEdge base) {

    Paint itemPaint = renderer.getItemPaint(row, column);
    GradientPaintTransformer t = renderer.getGradientPaintTransformer();
    if (t != null && itemPaint instanceof GradientPaint) {
        itemPaint = t.transform((GradientPaint) itemPaint, bar);
    }
    g2.setPaint(itemPaint);
    g2.fill(bar);

    // draw the outline...
    if (renderer.isDrawBarOutline()) {
           // && state.getBarWidth() > BAR_OUTLINE_WIDTH_THRESHOLD) {
        Stroke stroke = renderer.getItemOutlineStroke(row, column);
        Paint paint = renderer.getItemOutlinePaint(row, column);
        if (stroke != null && paint != null) {
            g2.setStroke(stroke);
            g2.setPaint(paint);
            g2.draw(bar);
        }
    }

}
项目:proyecto-teoria-control-utn-frro    文件:StandardBarPainter.java   
/**
 * Paints a single bar instance.
 *
 * @param g2  the graphics target.
 * @param renderer  the renderer.
 * @param row  the row index.
 * @param column  the column index.
 * @param bar  the bar
 * @param base  indicates which side of the rectangle is the base of the
 *              bar.
 */
public void paintBar(Graphics2D g2, BarRenderer renderer, int row,
        int column, RectangularShape bar, RectangleEdge base) {

    Paint itemPaint = renderer.getItemPaint(row, column);
    GradientPaintTransformer t = renderer.getGradientPaintTransformer();
    if (t != null && itemPaint instanceof GradientPaint) {
        itemPaint = t.transform((GradientPaint) itemPaint, bar);
    }
    g2.setPaint(itemPaint);
    g2.fill(bar);

    // draw the outline...
    if (renderer.isDrawBarOutline()) {
           // && state.getBarWidth() > BAR_OUTLINE_WIDTH_THRESHOLD) {
        Stroke stroke = renderer.getItemOutlineStroke(row, column);
        Paint paint = renderer.getItemOutlinePaint(row, column);
        if (stroke != null && paint != null) {
            g2.setStroke(stroke);
            g2.setPaint(paint);
            g2.draw(bar);
        }
    }

}
项目:Memetic-Algorithm-for-TSP    文件:StandardXYBarPainter.java   
/**
 * Paints a single bar instance.
 *
 * @param g2  the graphics target.
 * @param renderer  the renderer.
 * @param row  the row index.
 * @param column  the column index.
 * @param bar  the bar
 * @param base  indicates which side of the rectangle is the base of the
 *              bar.
 */
public void paintBar(Graphics2D g2, XYBarRenderer renderer, int row,
        int column, RectangularShape bar, RectangleEdge base) {

    Paint itemPaint = renderer.getItemPaint(row, column);
    GradientPaintTransformer t = renderer.getGradientPaintTransformer();
    if (t != null && itemPaint instanceof GradientPaint) {
        itemPaint = t.transform((GradientPaint) itemPaint, bar);
    }
    g2.setPaint(itemPaint);
    g2.fill(bar);

    // draw the outline...
    if (renderer.isDrawBarOutline()) {
           // && state.getBarWidth() > BAR_OUTLINE_WIDTH_THRESHOLD) {
        Stroke stroke = renderer.getItemOutlineStroke(row, column);
        Paint paint = renderer.getItemOutlinePaint(row, column);
        if (stroke != null && paint != null) {
            g2.setStroke(stroke);
            g2.setPaint(paint);
            g2.draw(bar);
        }
    }

}
项目:Memetic-Algorithm-for-TSP    文件:StandardBarPainter.java   
/**
 * Paints a single bar instance.
 *
 * @param g2  the graphics target.
 * @param renderer  the renderer.
 * @param row  the row index.
 * @param column  the column index.
 * @param bar  the bar
 * @param base  indicates which side of the rectangle is the base of the
 *              bar.
 */
public void paintBar(Graphics2D g2, BarRenderer renderer, int row,
        int column, RectangularShape bar, RectangleEdge base) {

    Paint itemPaint = renderer.getItemPaint(row, column);
    GradientPaintTransformer t = renderer.getGradientPaintTransformer();
    if (t != null && itemPaint instanceof GradientPaint) {
        itemPaint = t.transform((GradientPaint) itemPaint, bar);
    }
    g2.setPaint(itemPaint);
    g2.fill(bar);

    // draw the outline...
    if (renderer.isDrawBarOutline()) {
           // && state.getBarWidth() > BAR_OUTLINE_WIDTH_THRESHOLD) {
        Stroke stroke = renderer.getItemOutlineStroke(row, column);
        Paint paint = renderer.getItemOutlinePaint(row, column);
        if (stroke != null && paint != null) {
            g2.setStroke(stroke);
            g2.setPaint(paint);
            g2.draw(bar);
        }
    }

}
项目:parabuild-ci    文件:XYBarRenderer.java   
/**
 * Returns a clone of the renderer.
 *
 * @return A clone.
 *
 * @throws CloneNotSupportedException  if the renderer cannot be cloned.
 */
public Object clone() throws CloneNotSupportedException {
    XYBarRenderer result = (XYBarRenderer) super.clone();
    if (this.gradientPaintTransformer != null) {
        result.gradientPaintTransformer = (GradientPaintTransformer)
            ObjectUtilities.clone(this.gradientPaintTransformer);
    }
    result.legendBar = ShapeUtilities.clone(this.legendBar);
    return result;
}
项目:ccu-historian    文件:IntervalMarkerTest.java   
/**
 * Confirm that the equals method can distinguish all the required fields.
 */
@Test
public void testEquals() {

    IntervalMarker m1 = new IntervalMarker(45.0, 50.0);
    IntervalMarker m2 = new IntervalMarker(45.0, 50.0);
    assertTrue(m1.equals(m2));
    assertTrue(m2.equals(m1));

    m1 = new IntervalMarker(44.0, 50.0);
    assertFalse(m1.equals(m2));
    m2 = new IntervalMarker(44.0, 50.0);
    assertTrue(m1.equals(m2));

    m1 = new IntervalMarker(44.0, 55.0);
    assertFalse(m1.equals(m2));
    m2 = new IntervalMarker(44.0, 55.0);
    assertTrue(m1.equals(m2));

    GradientPaintTransformer t = new StandardGradientPaintTransformer(
            GradientPaintTransformType.HORIZONTAL);
    m1.setGradientPaintTransformer(t);
    assertFalse(m1.equals(m2));
    m2.setGradientPaintTransformer(t);
    assertTrue(m1.equals(m2));

}
项目:ccu-historian    文件:XYBarRenderer.java   
/**
 * Returns a clone of the renderer.
 *
 * @return A clone.
 *
 * @throws CloneNotSupportedException  if the renderer cannot be cloned.
 */
@Override
public Object clone() throws CloneNotSupportedException {
    XYBarRenderer result = (XYBarRenderer) super.clone();
    if (this.gradientPaintTransformer != null) {
        result.gradientPaintTransformer = (GradientPaintTransformer)
            ObjectUtilities.clone(this.gradientPaintTransformer);
    }
    result.legendBar = ShapeUtilities.clone(this.legendBar);
    return result;
}
项目:aya-lang    文件:IntervalMarkerTest.java   
/**
 * Confirm that the equals method can distinguish all the required fields.
 */
@Test
public void testEquals() {

    IntervalMarker m1 = new IntervalMarker(45.0, 50.0);
    IntervalMarker m2 = new IntervalMarker(45.0, 50.0);
    assertTrue(m1.equals(m2));
    assertTrue(m2.equals(m1));

    m1 = new IntervalMarker(44.0, 50.0);
    assertFalse(m1.equals(m2));
    m2 = new IntervalMarker(44.0, 50.0);
    assertTrue(m1.equals(m2));

    m1 = new IntervalMarker(44.0, 55.0);
    assertFalse(m1.equals(m2));
    m2 = new IntervalMarker(44.0, 55.0);
    assertTrue(m1.equals(m2));

    GradientPaintTransformer t = new StandardGradientPaintTransformer(
            GradientPaintTransformType.HORIZONTAL);
    m1.setGradientPaintTransformer(t);
    assertFalse(m1.equals(m2));
    m2.setGradientPaintTransformer(t);
    assertTrue(m1.equals(m2));

}
项目:aya-lang    文件:XYBarRenderer.java   
/**
 * Returns a clone of the renderer.
 *
 * @return A clone.
 *
 * @throws CloneNotSupportedException  if the renderer cannot be cloned.
 */
@Override
public Object clone() throws CloneNotSupportedException {
    XYBarRenderer result = (XYBarRenderer) super.clone();
    if (this.gradientPaintTransformer != null) {
        result.gradientPaintTransformer = (GradientPaintTransformer)
            ObjectUtilities.clone(this.gradientPaintTransformer);
    }
    result.legendBar = ShapeUtilities.clone(this.legendBar);
    return result;
}
项目:aptasuite    文件:LogoBarPainter.java   
/**
    * Paints a single bar instance.
    *
    * @param g2  the graphics target.
    * @param renderer  the renderer.
    * @param row  the row index.
    * @param column  the column index.
    * @param bar  the bar
    * @param base  indicates which side of the rectangle is the base of the bar.
    */
   @Override
public void paintBar(Graphics2D g2, BarRenderer renderer, int row, int column, RectangularShape bar, RectangleEdge base) {

       ShapeDummy dummy = new ShapeDummy();
       Shape letter = null;

       //set letter according to row
       letter = dummy.convert(letter_matrix[row][column], bar);

       Paint itemPaint = plot_colors.get(letter_matrix[row][column]);
       GradientPaintTransformer t = renderer.getGradientPaintTransformer();
       if (t != null && itemPaint instanceof GradientPaint) {
        itemPaint = t.transform((GradientPaint) itemPaint, letter);
       }
       g2.setPaint(itemPaint);
       g2.fill(letter);

       // draw the outline...
       if (renderer.isDrawBarOutline()) 
       {
           Stroke stroke = renderer.getItemOutlineStroke(row, column);
           Paint paint = renderer.getItemOutlinePaint(row, column);
           if (stroke != null && paint != null) {
               g2.setStroke(stroke);
            g2.setPaint(paint);
            //g2.draw(bar);
            g2.draw(letter);
           }
       }

   }
项目:HTML5_WebSite    文件:XYBarRenderer.java   
/**
 * Returns a clone of the renderer.
 *
 * @return A clone.
 *
 * @throws CloneNotSupportedException  if the renderer cannot be cloned.
 */
public Object clone() throws CloneNotSupportedException {
    XYBarRenderer result = (XYBarRenderer) super.clone();
    if (this.gradientPaintTransformer != null) {
        result.gradientPaintTransformer = (GradientPaintTransformer)
            ObjectUtilities.clone(this.gradientPaintTransformer);
    }
    result.legendBar = ShapeUtilities.clone(this.legendBar);
    return result;
}
项目:populus    文件:XYBarRenderer.java   
/**
 * Returns a clone of the renderer.
 *
 * @return A clone.
 *
 * @throws CloneNotSupportedException  if the renderer cannot be cloned.
 */
@Override
public Object clone() throws CloneNotSupportedException {
    XYBarRenderer result = (XYBarRenderer) super.clone();
    if (this.gradientPaintTransformer != null) {
        result.gradientPaintTransformer = (GradientPaintTransformer)
            ObjectUtilities.clone(this.gradientPaintTransformer);
    }
    result.legendBar = ShapeUtilities.clone(this.legendBar);
    return result;
}
项目:PI    文件:XYBarRenderer.java   
/**
 * Returns a clone of the renderer.
 *
 * @return A clone.
 *
 * @throws CloneNotSupportedException  if the renderer cannot be cloned.
 */
public Object clone() throws CloneNotSupportedException {
    XYBarRenderer result = (XYBarRenderer) super.clone();
    if (this.gradientPaintTransformer != null) {
        result.gradientPaintTransformer = (GradientPaintTransformer)
            ObjectUtilities.clone(this.gradientPaintTransformer);
    }
    result.legendBar = ShapeUtilities.clone(this.legendBar);
    return result;
}
项目:nabs    文件:XYBarRenderer.java   
/**
 * Returns a clone of the renderer.
 *
 * @return A clone.
 *
 * @throws CloneNotSupportedException  if the renderer cannot be cloned.
 */
public Object clone() throws CloneNotSupportedException {
    XYBarRenderer result = (XYBarRenderer) super.clone();
    if (this.gradientPaintTransformer != null) {
        result.gradientPaintTransformer = (GradientPaintTransformer)
            ObjectUtilities.clone(this.gradientPaintTransformer);
    }
    result.legendBar = ShapeUtilities.clone(this.legendBar);
    return result;
}
项目:ECG-Viewer    文件:IntervalMarkerTest.java   
/**
 * Confirm that the equals method can distinguish all the required fields.
 */
@Test
public void testEquals() {

    IntervalMarker m1 = new IntervalMarker(45.0, 50.0);
    IntervalMarker m2 = new IntervalMarker(45.0, 50.0);
    assertTrue(m1.equals(m2));
    assertTrue(m2.equals(m1));

    m1 = new IntervalMarker(44.0, 50.0);
    assertFalse(m1.equals(m2));
    m2 = new IntervalMarker(44.0, 50.0);
    assertTrue(m1.equals(m2));

    m1 = new IntervalMarker(44.0, 55.0);
    assertFalse(m1.equals(m2));
    m2 = new IntervalMarker(44.0, 55.0);
    assertTrue(m1.equals(m2));

    GradientPaintTransformer t = new StandardGradientPaintTransformer(
            GradientPaintTransformType.HORIZONTAL);
    m1.setGradientPaintTransformer(t);
    assertFalse(m1.equals(m2));
    m2.setGradientPaintTransformer(t);
    assertTrue(m1.equals(m2));

}
项目:ECG-Viewer    文件:XYBarRenderer.java   
/**
 * Returns a clone of the renderer.
 *
 * @return A clone.
 *
 * @throws CloneNotSupportedException  if the renderer cannot be cloned.
 */
@Override
public Object clone() throws CloneNotSupportedException {
    XYBarRenderer result = (XYBarRenderer) super.clone();
    if (this.gradientPaintTransformer != null) {
        result.gradientPaintTransformer = (GradientPaintTransformer)
            ObjectUtilities.clone(this.gradientPaintTransformer);
    }
    result.legendBar = ShapeUtilities.clone(this.legendBar);
    return result;
}
项目:opensim-gui    文件:XYBarRenderer.java   
/**
 * Returns a clone of the renderer.
 *
 * @return A clone.
 *
 * @throws CloneNotSupportedException  if the renderer cannot be cloned.
 */
public Object clone() throws CloneNotSupportedException {
    XYBarRenderer result = (XYBarRenderer) super.clone();
    if (this.gradientPaintTransformer != null) {
        result.gradientPaintTransformer = (GradientPaintTransformer)
            ObjectUtilities.clone(this.gradientPaintTransformer);
    }
    result.legendBar = ShapeUtilities.clone(this.legendBar);
    return result;
}
项目:group-five    文件:IntervalMarkerTest.java   
/**
 * Confirm that the equals method can distinguish all the required fields.
 */
@Test
public void testEquals() {

    IntervalMarker m1 = new IntervalMarker(45.0, 50.0);
    IntervalMarker m2 = new IntervalMarker(45.0, 50.0);
    assertTrue(m1.equals(m2));
    assertTrue(m2.equals(m1));

    m1 = new IntervalMarker(44.0, 50.0);
    assertFalse(m1.equals(m2));
    m2 = new IntervalMarker(44.0, 50.0);
    assertTrue(m1.equals(m2));

    m1 = new IntervalMarker(44.0, 55.0);
    assertFalse(m1.equals(m2));
    m2 = new IntervalMarker(44.0, 55.0);
    assertTrue(m1.equals(m2));

    GradientPaintTransformer t = new StandardGradientPaintTransformer(
            GradientPaintTransformType.HORIZONTAL);
    m1.setGradientPaintTransformer(t);
    assertFalse(m1.equals(m2));
    m2.setGradientPaintTransformer(t);
    assertTrue(m1.equals(m2));

}
项目:group-five    文件:XYBarRenderer.java   
/**
 * Returns a clone of the renderer.
 *
 * @return A clone.
 *
 * @throws CloneNotSupportedException  if the renderer cannot be cloned.
 */
@Override
public Object clone() throws CloneNotSupportedException {
    XYBarRenderer result = (XYBarRenderer) super.clone();
    if (this.gradientPaintTransformer != null) {
        result.gradientPaintTransformer = (GradientPaintTransformer)
            ObjectUtilities.clone(this.gradientPaintTransformer);
    }
    result.legendBar = ShapeUtilities.clone(this.legendBar);
    return result;
}