Examples of GradientPaint


Examples of java.awt.GradientPaint

      RectangleInsets padding = title.getPadding();
      double bottomPadding = Math.max(padding.getBottom(), 15d);
      title.setPadding(padding.getTop(), padding.getLeft(), bottomPadding, padding.getRight());
    }

    GradientPaint gp = (GradientPaint)getDefaultValue(defaultChartPropertiesMap, ChartThemesConstants.BACKGROUND_PAINT);

    jfreeChart.setBackgroundPaint(new GradientPaint(0f, 0f, gp.getColor1(), 0f, getChart().getHeight() * 0.7f, gp.getColor2(), false));
  }
View Full Code Here

Examples of java.awt.GradientPaint

      piePlot.setLabelShadowPaint(ChartThemesConstants.TRANSPARENT_PAINT);
      piePlot.setLabelOutlinePaint(ChartThemesConstants.TRANSPARENT_PAINT);
    }
    piePlot.setShadowXOffset(5);
    piePlot.setShadowYOffset(10);
    piePlot.setShadowPaint(new GradientPaint(0, getChart().getHeight() / 2, new Color(41, 120, 162), 0, getChart().getHeight(), Color.white));
    PieDataset pieDataset = piePlot.getDataset();
    if(pieDataset != null)
    {
      for(int i = 0; i < pieDataset.getItemCount(); i++)
      {
View Full Code Here

Examples of java.awt.GradientPaint

    // Set all the colors we support
    Paint backgroundPaint = jrPlot.getOwnBackcolor() == null ? ChartThemesConstants.TRANSPARENT_PAINT : jrPlot.getOwnBackcolor();
    chartPlot.setBackgroundPaint(backgroundPaint);

    GradientPaint gp =
      new GradientPaint(
        new Point(), Color.LIGHT_GRAY,
        new Point(), Color.BLACK,
        false
        );
   
View Full Code Here

Examples of java.awt.GradientPaint

  protected JFreeChart createDialChart() throws JRException
  {

    JRMeterPlot jrPlot = (JRMeterPlot)getPlot();

    GradientPaint gp =
      new GradientPaint(
        new Point(), Color.LIGHT_GRAY,
        new Point(), Color.BLACK,
        false
        );

    GradientPaint gp2 =
      new GradientPaint(
        new Point(), Color.GRAY,
        new Point(), Color.BLACK
        );

    // get data for diagrams
View Full Code Here

Examples of java.awt.GradientPaint

  /**
   *
   */
  public Paint getPaint()
  {
    return new GradientPaint(0, 0, color1, 0, 0, color2);
  }
View Full Code Here

Examples of java.awt.GradientPaint

      }
    }
   
    if (backgroundPaint != null)
    {
      GradientPaint gp = backgroundPaint instanceof GradientPaint ? (GradientPaint)backgroundPaint : null;
      if (gp != null)
      {
        backgroundPaint = new GradientPaint(0f, 0f, gp.getColor1(), 0f, getChart().getHeight() * 0.7f, gp.getColor2(), false);
      }
      jfreeChart.setBackgroundPaint(backgroundPaint);
    }

    setChartBackgroundImage(jfreeChart);
View Full Code Here

Examples of java.awt.GradientPaint

      if (itemPaint instanceof Color) {
        g2.setPaint(((Color) itemPaint).darker());
      }
      else if (itemPaint instanceof GradientPaint)
      {
        GradientPaint gp = (GradientPaint)itemPaint;
        g2.setPaint(
          new StandardGradientPaintTransformer().transform(
            new GradientPaint(gp.getPoint1(), gp.getColor1().darker(), gp.getPoint2(), gp.getColor2().darker(), gp.isCyclic()),
            bar3dRight
            )
          );
      }
      g2.fill(bar3dRight);
View Full Code Here

Examples of java.awt.GradientPaint

        Icon icon = lbl.getIcon();
        int nStartOfText = (icon == null) ? 0 : icon.getIconWidth()
                + lbl.getIconTextGap();
        g2.setComposite(AlphaComposite.getInstance(AlphaComposite.DST_OVER,
                0.5f)); // Make the gradient ghostlike
        g2.setPaint(new GradientPaint(nStartOfText, 0,
                SystemColor.controlShadow, getWidth(), 0, new Color(255, 255,
                        255, 0)));
        g2.fillRect(nStartOfText, 0, getWidth(), ghostImage.getHeight());

        g2.dispose();
View Full Code Here

Examples of java.awt.GradientPaint

        // disable bar outlines...
        BarRenderer renderer = (BarRenderer) plot.getRenderer();
        renderer.setDrawBarOutline(false);
       
        // set up gradient paints for series...
        GradientPaint gp0 = new GradientPaint(0.0f, 0.0f, Color.green, 0.0f, 0.0f, new Color(0, 64, 0));
        Paint gp1 = new Color(0, 0, 0, 0);
        GradientPaint gp2 = new GradientPaint(0.0f, 0.0f, Color.red, 0.0f, 0.0f, new Color(64, 0, 0));
        //renderer.setSeriesPaint(0, gp0);
  renderer.setSeriesPaint(0, Color.green);
        renderer.setSeriesPaint(1, gp1);
        //renderer.setSeriesPaint(2, gp2);
  renderer.setSeriesPaint(2, Color.red);
View Full Code Here

Examples of java.awt.GradientPaint

      JLabel iconLabel = new JLabel(new ImageIcon(stepIcon)) {
          @Override
          protected void paintComponent(Graphics g) {
            Graphics2D g2D = (Graphics2D)g;
             // Paint a blue gradient behind icon
            g2D.setPaint(new GradientPaint(0, 0, new Color(163, 168, 226),
                                           0, getHeight(), new Color(80, 86, 158)));
            g.fillRect(0, 0, getWidth(), getHeight());
            super.paintComponent(g);
          }
        };
View Full Code Here
TOP
Copyright © 2018 www.massapi.com. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.