Examples of drawRoundRect()


Examples of java.awt.Graphics2D.drawRoundRect()

        Color color = Utilities.deriveColorHSB(c.getBackground(), 0, 0, -.3f);
//        Color color = Color.RED;
        g2.setColor(ColorUtil.setAlpha(color, 40));       
        g2.drawRoundRect(x, y + 2, width - 1, height - 3, cornerRadius, cornerRadius);
        g2.setColor(ColorUtil.setAlpha(color, 90));       
        g2.drawRoundRect(x, y + 1, width - 1, height - 2, cornerRadius, cornerRadius);
        g2.setColor(ColorUtil.setAlpha(color, 255));       
        g2.drawRoundRect(x, y, width - 1, height - 1, cornerRadius, cornerRadius);

        g2.dispose();           
    }
View Full Code Here

Examples of java.awt.Graphics2D.drawRoundRect()

        g2.setColor(ColorUtil.setAlpha(color, 40));       
        g2.drawRoundRect(x, y + 2, width - 1, height - 3, cornerRadius, cornerRadius);
        g2.setColor(ColorUtil.setAlpha(color, 90));       
        g2.drawRoundRect(x, y + 1, width - 1, height - 2, cornerRadius, cornerRadius);
        g2.setColor(ColorUtil.setAlpha(color, 255));       
        g2.drawRoundRect(x, y, width - 1, height - 1, cornerRadius, cornerRadius);

        g2.dispose();           
    }
}
View Full Code Here

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

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

Examples of java.awt.Graphics2D.drawRoundRect()

   
    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

Examples of java.awt.Graphics2D.drawRoundRect()

    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

Examples of java.awt.Graphics2D.drawRoundRect()

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

Examples of java.awt.Graphics2D.drawRoundRect()

    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

Examples of java.awt.Graphics2D.drawRoundRect()

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

Examples of java.awt.Graphics2D.drawRoundRect()

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