Tabnine Logo
GradientXYBarPainter.createShadow
Code IndexAdd Tabnine to your IDE (free)

How to use
createShadow
method
in
org.jfree.chart.renderer.xy.GradientXYBarPainter

Best Java code snippets using org.jfree.chart.renderer.xy.GradientXYBarPainter.createShadow (Showing top 2 results out of 315)

origin: jfree/jfreechart

/**
 * 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.
 * @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);
}
origin: org.codehaus.jtstand/jtstand-chart

/**
 * 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.
 * @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);
  g2.setPaint(Color.gray);
  g2.fill(shadow);
}
org.jfree.chart.renderer.xyGradientXYBarPaintercreateShadow

Javadoc

Creates a shadow for the bar.

Popular methods of GradientXYBarPainter

  • <init>
    Creates a new instance.
  • splitHorizontalBar
    Splits a bar into subregions (elsewhere, these subregions will have different gradients applied to t
  • splitVerticalBar
    Splits a bar into subregions (elsewhere, these subregions will have different gradients applied to t
  • paintBar
    Paints a single bar instance.

Popular in Java

  • Reactive rest calls using spring rest template
  • startActivity (Activity)
  • onCreateOptionsMenu (Activity)
  • getSupportFragmentManager (FragmentActivity)
  • Menu (java.awt)
  • Window (java.awt)
    A Window object is a top-level window with no borders and no menubar. The default layout for a windo
  • IOException (java.io)
    Signals a general, I/O-related error. Error details may be specified when calling the constructor, a
  • DecimalFormat (java.text)
    A concrete subclass of NumberFormat that formats decimal numbers. It has a variety of features desig
  • Locale (java.util)
    Locale represents a language/country/variant combination. Locales are used to alter the presentatio
  • Response (javax.ws.rs.core)
    Defines the contract between a returned instance and the runtime when an application needs to provid
  • Top plugins for WebStorm
Tabnine Logo
  • Products

    Search for Java codeSearch for JavaScript code
  • IDE Plugins

    IntelliJ IDEAWebStormVisual StudioAndroid StudioEclipseVisual Studio CodePyCharmSublime TextPhpStormVimGoLandRubyMineEmacsJupyter NotebookJupyter LabRiderDataGripAppCode
  • Company

    About UsContact UsCareers
  • Resources

    FAQBlogTabnine AcademyTerms of usePrivacy policyJava Code IndexJavascript Code Index
Get Tabnine for your IDE now