Package java.awt

Examples of java.awt.Graphics2D.drawRoundRect()


        g2 = (Graphics2D)img2.getGraphics();
        g2.setRenderingHint(RenderingHints.KEY_ANTIALIASING,
                RenderingHints.VALUE_ANTIALIAS_ON);
        g2.setClip(0,28,IMG_SIZE,1);
        g2.setColor(getLighter(color, 0.90f));
        g2.drawRoundRect(2,1,25,25,RADIUS,RADIUS);
        g2.dispose();
        // draw final image
        if (width != IMG_SIZE || height != IMG_SIZE){
            ImageScalingHelper.paint(g,0,0,width,height,img2, INSETS, INSETS,
                    ImageScalingHelper.PaintType.PAINT9_STRETCH,
View Full Code Here


        g2 = (Graphics2D)img2.getGraphics();
        g2.setRenderingHint(RenderingHints.KEY_ANTIALIASING,
                RenderingHints.VALUE_ANTIALIAS_ON);
        g2.setClip(0,28,IMG_SIZE,1);
        g2.setColor(getLighter(c.getBackground(),0.90f));
        g2.drawRoundRect(2,1,25,25,RADIUS,RADIUS);
        g2.dispose();
        // draw final image
        if (width != IMG_SIZE || height != IMG_SIZE){
            ImageScalingHelper.paint(g,0,0,width,height,img2, INSETS, INSETS,
                    ImageScalingHelper.PaintType.PAINT9_STRETCH,
View Full Code Here

   
    Graphics2D g2 = (Graphics2D) g;
    Stroke stroke = new BasicStroke(1, 1, 1, 1, new float[]{4f,2f}, 3);
    g2.setStroke(stroke);
    g2.setColor(new Color(0, 0, 0));
    g2.drawRoundRect(0, 0, this.getWidth()-1, this.getHeight()-1, 8, 8);
  }
}
View Full Code Here

    stroke = new BasicStroke(1.3f,0,0,4.0f,null,0.0f);
    g2d.setStroke(stroke);
   
   
    //outer border
    g2d.drawRoundRect(0, 0, getWidth()-1, getHeight()-1, 8,8);

    int rectSize = 8;
    int halfRectSize = rectSize/2;
    int innerCrossGap = 2;
    int half = ArrowLabel.DEFAULT_WIDTH / 2;
View Full Code Here

//    path.moveTo(getWidth()-half+innerCrossGap, posY);
//    path.lineTo(getWidth()-rectSize-half-innerCrossGap, posY);
 
    g2d.draw(path);
   
    g2d.drawRoundRect(half-halfRectSize, posY-halfRectSize, rectSize, rectSize, 2,2);
//    g2d.drawRoundRect(getWidth()-rectSize-half, posY-halfRectSize, rectSize, rectSize, 2,2);

  }
 
View Full Code Here

    g2.setRenderingHint(RenderingHints.KEY_ANTIALIASING, RenderingHints.VALUE_ANTIALIAS_ON);
   
    Stroke stroke = new BasicStroke(0.5f, 1, 1, 1, new float[]{1f,5f}, 3);
    g2.setStroke(stroke);
    g2.setColor(new Color(150, 150, 150));
    g2.drawRoundRect(0, 1, this.getWidth()-1, this.getHeight()-2, 8, 8);
    //g2.dispose();
  }

}
View Full Code Here

        //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));
        ng2.setPaint(gpxbt);
        ng2.drawRoundRect(-x1, 1, w1 + x2 + x1, h - 2, roundBorderDiameter, roundBorderDiameter);

        // aspect plus glossy de BeDesk 2012 - bord inférieur
        Graphics2D ngbb = (Graphics2D) g2.create();
        ngbb.setClip(0, h / 2, this.getWidth(), h);
        GradientPaint gpxbb =
View Full Code Here

        ngbb.setClip(0, h / 2, this.getWidth(), h);
        GradientPaint gpxbb =
            new GradientPaint(new Point(0, h / 2), new Color(border1.getRed(), border1.getGreen(), border1.getBlue(), 32), new Point(0, h), new Color(border1.getRed(),
                    border1.getGreen(), border1.getBlue(), 32));
        ngbb.setPaint(gpxbb);
        ngbb.drawRoundRect(-x1, 1, w1 + x2 + x1, h - 3, roundBorderDiameter, roundBorderDiameter);
        //

        //
        //Bordure normale
        g2.setPaint(border0);
View Full Code Here

            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

                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);

            }
            else {
                GradientPaint gp = new GradientPaint(new Point(0, 0), new Color(0, 0, 0, 42), new Point(0, bh), new Color(0, 0, 0, 0));
                g2.setPaint(gp);
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.