Package java.awt

Examples of java.awt.Graphics2D.fillRoundRect()


                    offs1,Position.Bias.Backward,
                    bounds);
        Rectangle r = (shape instanceof Rectangle) ?
                (Rectangle)shape : shape.getBounds();
        if (roundedEdges) {
          g2d.fillRoundRect(r.x,r.y, r.width,r.height, ARCWIDTH,
                          ARCHEIGHT);
        }
        else {
          g2d.fillRect(r.x, r.y, r.width, r.height);
        }
View Full Code Here


        // draw shadow shape
        Graphics2D g2 = (Graphics2D)img1.getGraphics();
        g2.setRenderingHint(RenderingHints.KEY_ANTIALIASING,
                RenderingHints.VALUE_ANTIALIAS_ON);
        g2.setColor(color);
        g2.fillRoundRect(2,0,26,26,RADIUS,RADIUS);
        g2.dispose();
        // draw shadow
        InnerShadowEffect effect = new InnerShadowEffect();
        effect.setDistance(1);
        effect.setSize(3);
View Full Code Here

        // draw shadow shape
        Graphics2D g2 = (Graphics2D)img1.getGraphics();
        g2.setRenderingHint(RenderingHints.KEY_ANTIALIASING,
                RenderingHints.VALUE_ANTIALIAS_ON);
        g2.setColor(c.getBackground());
        g2.fillRoundRect(2,0,26,26,RADIUS,RADIUS);
        g2.dispose();
        // draw shadow
        InnerShadowEffect effect = new InnerShadowEffect();
        effect.setDistance(1);
        effect.setSize(3);
View Full Code Here

      int w = width + 1;
      int h = bounds.height - 1;
      if (rtl) {
        x = bounds.width-width-2;
      }
      g2d.fillRoundRect(x,y, w,h, 8,8);
      g2d.setColor(UIManager.getColor("Office2003LnF.ToolBarBottomBorderColor"));
      g2d.drawLine(x+4,h, (x+4)+5+width-9,h);

    }
View Full Code Here

      // Paint the rounded edge toolbar.
      GradientPaint paint = new GradientPaint(0,0,  beginColor,
                    bounds.width, 0, endColor);
      g2d.setPaint(paint);
      g2d.fillRoundRect(0,1, bounds.width,height+1, 8,8);

    }

  }
View Full Code Here

        //g2d.drawRect(0, 0, 319, 320);
       
        AlphaComposite myAlpha = AlphaComposite.getInstance(
            AlphaComposite.SRC_OVER, 0.12f);
        g2d.setComposite(myAlpha);
        g2d.fillRoundRect(0, 0, 320, 320, 20, 20);
        AlphaComposite noAlpha = AlphaComposite.getInstance(
            AlphaComposite.SRC_OVER, 1.0f);
        g2d.setComposite(noAlpha);
      }
     
View Full Code Here

        h1 = h - 1;


        // ombre..
        g2.setPaint(new Color(border0.getRed(), border0.getGreen(), border0.getBlue(), 64));
        g2.fillRoundRect(-x1, 0, w1 + x2 + x1, h + 1, roundBorderDiameter, roundBorderDiameter);
        //


        g2.setPaint(new GradientPaint(pointZero, bg, new Point(0, h), bg1));
View Full Code Here

        //


        g2.setPaint(new GradientPaint(pointZero, bg, new Point(0, h), bg1));

        g2.fillRoundRect(-x1, 1, w1 + x2 + x1, h - 2, roundBorderDiameter, roundBorderDiameter);

        // aspect plus glossy de BeDesk 2012
        Graphics2D ng2 = (Graphics2D) g2.create();
        ng2.setClip(0, 0, this.getWidth(), h / 2);
        GradientPaint gpx = new GradientPaint(pointZero, new Color(255, 255, 255, 64), new Point(0, h / 2), new Color(255, 255, 255, 32));
View Full Code Here

        // aspect plus glossy de BeDesk 2012
        Graphics2D ng2 = (Graphics2D) g2.create();
        ng2.setClip(0, 0, this.getWidth(), h / 2);
        GradientPaint gpx = new GradientPaint(pointZero, new Color(255, 255, 255, 64), new Point(0, h / 2), new Color(255, 255, 255, 32));
        ng2.setPaint(gpx);
        ng2.fillRoundRect(-x1, 1, w1 + x2 + x1, h - 2, roundBorderDiameter, roundBorderDiameter);

        //aspect plus glossy de BeDesk 2012 - bord supérieur
        GradientPaint gpxbt =
            new GradientPaint(pointZero, new Color(border1.getRed(), border1.getGreen(), border1.getBlue(), 128), new Point(0, h / 2), new Color(border1.getRed(),
                    border1.getGreen(), border1.getBlue(), 64));
View Full Code Here

            Graphics2D g2 = vgBuffer.createGraphics();
            g2.setRenderingHint(RenderingHints.KEY_ANTIALIASING, RenderingHints.VALUE_ANTIALIAS_ON);
            if (topConnected) {
                GradientPaint gp = new GradientPaint(new Point(0, 0), new Color(0, 0, 0, 0), new Point(0, bh), new Color(0, 0, 0, 42));
                g2.setPaint(gp);
                g2.fillRoundRect(0, 0 - roundDiameter, bw - 1, bh - 1 + roundDiameter, roundDiameter, roundDiameter);
                g2.drawRoundRect(0, 0 - roundDiameter, bw - 2, bh - 2 + roundDiameter, roundDiameter, roundDiameter);
                GradientPaint gp1 = new GradientPaint(new Point(0, 0), new Color(0, 0, 0, 0), new Point(0, bh), new Color(96, 96, 96));
                g2.setPaint(gp1);
                g2.drawRoundRect(0, 0 - roundDiameter, bw - 2, bh + roundDiameter - 1, roundDiameter, roundDiameter);
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.