List of usage examples for org.jfree.chart.renderer.xy XYBarRenderer getShadowYOffset
public double getShadowYOffset()
From source file:org.openfaces.component.chart.impl.renderers.GradientXYBarPainterAdapter.java
@Override public void paintBarShadow(Graphics2D g2, XYBarRenderer renderer, int row, int column, RectangularShape bar, RectangleEdge base, boolean pegShadow) { // handle a special case - if the bar colour has alpha == 0, it is // invisible so we shouldn't draw any shadow Paint itemPaint = renderer.getItemPaint(row, column); if (itemPaint instanceof Color) { Color c = (Color) itemPaint; if (c.getAlpha() == 0) { return; }/*from w w w .j a v a2 s . c o m*/ } RectangularShape shadow = createShadow(bar, renderer.getShadowXOffset(), renderer.getShadowYOffset(), base, pegShadow); if (renderer instanceof XYBarRendererAdapter) { g2.setPaint(((XYBarRendererAdapter) renderer).getShadowPaint()); } g2.fill(shadow); }
From source file:org.openfaces.component.chart.impl.renderers.StandardXYBarPainterAdapter.java
/** * Paints a single bar instance./*from w w w .j av a 2 s . co m*/ * * @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. * @param pegShadow peg the shadow to the base of the bar? */ public void paintBarShadow(Graphics2D g2, XYBarRenderer renderer, int row, int column, RectangularShape bar, RectangleEdge base, boolean pegShadow) { // handle a special case - if the bar colour has alpha == 0, it is // invisible so we shouldn't draw any shadow Paint itemPaint = renderer.getItemPaint(row, column); if (itemPaint instanceof Color) { Color c = (Color) itemPaint; if (c.getAlpha() == 0) { return; } } RectangularShape shadow = createShadow(bar, renderer.getShadowXOffset(), renderer.getShadowYOffset(), base, pegShadow); if (renderer instanceof XYBarRendererAdapter) { g2.setPaint(((XYBarRendererAdapter) renderer).getShadowPaint()); } g2.fill(shadow); }
From source file:it.cnr.istc.utils.gui.ReverseGradientXYBarPainter.java
/** * Paints a single bar instance.//ww w.j a v a 2s.c om * * @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. * @param pegShadow peg the shadow to the base of the bar? */ @Override public void paintBarShadow(Graphics2D g2, XYBarRenderer renderer, int row, int column, RectangularShape bar, RectangleEdge base, boolean pegShadow) { // handle a special case - if the bar colour has alpha == 0, it is // invisible so we shouldn't draw any shadow Paint itemPaint = renderer.getItemPaint(row, column); if (itemPaint instanceof Color) { Color c = (Color) itemPaint; if (c.getAlpha() == 0) { return; } } RectangularShape shadow = createShadow(bar, renderer.getShadowXOffset(), renderer.getShadowYOffset(), base, pegShadow); g2.setPaint(Color.gray); g2.fill(shadow); }