Package java.awt

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


    // 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

  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

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

      }
    }
   
    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

      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

        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

        // 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

      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

      bottomColor = _pane.getSelectedTabBottomColor();
    } else {
      topColor = _pane.getUnselectedTabTopColor();
      bottomColor = _pane.getUnselectedTabBottomColor();
    }
    final GradientPaint gradient = new GradientPaint(x, y, topColor, x, y + h, bottomColor);

    if (g instanceof Graphics2D) {
      ((Graphics2D) g).setPaint(gradient);
    } else {
      g.setColor(bottomColor);
View Full Code Here

TOP

Related Classes of java.awt.GradientPaint

Copyright © 2018 www.massapicom. 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.