Examples of GradientPaint


Examples of com.google.code.appengine.awt.GradientPaint

        Color color;
        Paint paint = getPaint();
        if (paint instanceof Color) {
            color = (Color) paint;
        } else if (paint instanceof GradientPaint) {
            GradientPaint gp = (GradientPaint) paint;
            color = PrintColor.mixColor(gp.getColor1(), gp.getColor2());
        } else {
            Color bkg = getBackground();
            if (bkg == null) {
                color = Color.BLACK;
            } else {
View Full Code Here

Examples of java.awt.GradientPaint

    int width = getWidth();
    int height = getHeight();

    // Create the gradient paint
    GradientPaint paint =
        new GradientPaint((float)width / 3, 0, getBackground(), width, height, UIManager.getColor("List.selectionBackground"), false);

    g2d.setPaint(paint);
    g2d.fillRect(0, 0, width, height);
  }
View Full Code Here

Examples of java.awt.GradientPaint

        new Font("Sans Serif", Font.BOLD, 18),
    };
    paintSteady = new Paint[colorBase.length];
    for (int i = 0; i < colorBase.length; i++) {
      Color hue = colorBase[i];
      paintSteady[i] = new GradientPaint(0.0f, 0.0f, derive(hue, 0),
          0.0f, fadeStop, hue);
    }
   
    URL url = AboutCredits.class.getClassLoader().getResource(HENDRIX_PATH);
    Image hendrixLogo = null;
View Full Code Here

Examples of java.awt.GradientPaint

        paint = paintSteady;
      } else {
        paint = new Paint[colorBase.length];
        for (int i = 0; i < paint.length; i++) {
          Color hue = colorBase[i];
          paint[i] = new GradientPaint(0.0f, 0.0f, derive(hue, a),
            0.0f, fadeStop, hue);
        }
      }
      yPos = initY;
    } else if (offs < MILLIS_FREEZE + maxY * MILLIS_PER_PIXEL) {
View Full Code Here

Examples of java.awt.GradientPaint

    super.paint(graphics);
    final Graphics2D g2 = (Graphics2D) graphics;

    int w = getWidth();
    int h = 70;
    GradientPaint gradient = new GradientPaint(0, 0, new Color(255, 255, 255, 255), 2, h, new Color(255, 255, 255, 0), false);
    g2.setPaint(gradient);
    g2.fillRect(0, 0, w, h);

    gradient = new GradientPaint(0, getHeight() - h, new Color(255, 255, 255, 0), 2, getHeight(), new Color(255, 255, 255, 255), false);
    g2.setPaint(gradient);
    g2.fillRect(0, getHeight() - h, w, h);
  }
View Full Code Here

Examples of java.awt.GradientPaint

        Color c1 = new Color(UIManager.getDefaults().getColor(
            "Tree.selectionBackground").getRGB());
        c1 = c1.darker();

        g2.setPaint(new GradientPaint(0, 0, c1, getWidth(), 0, new Color(255,
            255, 255, 0)));

        // Paint under the JLabel's text
        g2.fillRect(0, 0, getWidth(), mGhostImage.getHeight());
View Full Code Here

Examples of java.awt.GradientPaint

        cb.setColorStroke(color);
      }
    }
    else if (paint instanceof GradientPaint)
    {
      final GradientPaint gp = (GradientPaint) paint;
      final Point2D p1 = gp.getPoint1();
      transform.transform(p1, p1);
      final Point2D p2 = gp.getPoint2();
      transform.transform(p2, p2);
      final Color c1 = gp.getColor1();
      final Color c2 = gp.getColor2();
      final PdfShading shading = PdfShading.simpleAxial(cb.getPdfWriter(), (float) p1.getX(), normalizeY(
          (float) p1.getY()), (float) p2.getX(), normalizeY((float) p2.getY()), c1, c2);
      final PdfShadingPattern pat = new PdfShadingPattern(shading);
      if (fill)
      {
View Full Code Here

Examples of java.awt.GradientPaint

     */
    public static Paint getGradientPaintForShape(Shape shape, Paint paint) {
        if (paint instanceof Color) {
            Color color = (Color) paint;
            Rectangle rect = shape.getBounds();
            paint = new GradientPaint((float) rect.getWidth() * .3f, (float) rect.getHeight() * .3f, color.brighter()
                    .brighter(), (float) rect.getWidth() * .7f, (float) rect.getHeight() * .7f, color.darker()
                    .darker());
        }
        return paint;
    }
View Full Code Here

Examples of java.awt.GradientPaint

        viewRect.width = getWidth() - (i.right + viewRect.x);
        viewRect.height = getHeight() - (i.bottom + viewRect.y);
       
        // paint gradient
        Graphics2D g2 = (Graphics2D)g;
        Paint gradient = new GradientPaint(
            0, 0, fromColor,
            viewRect.width, viewRect.height, toColor );
        g2.setPaint( gradient );
        g2.fillRect( viewRect.x, viewRect.y,
            viewRect.width, viewRect.height );
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
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.