Package java.awt

Examples of java.awt.Graphics2D.drawRoundRect()


         
          //changement de couleur
          g2D.setColor(new Color(255,0,0));
          g2D.setStroke(new BasicStroke(1));
         
          g2D.drawRoundRect(220, 20, 80, 80, 40, 40);
          RoundRectangle2D.Double rect = new RoundRectangle2D.Double(320, 20, 80, 80, 80, 40);
          g2D.draw(rect);
        }
       
      }
View Full Code Here


                                g2.drawString(getString(), str_x, str_y);
                        }
                }
                if (isBorderPainted()) {
                        g2.setColor(Color.BLACK);
                        g2.drawRoundRect(bounds.x + getInsets().left, bounds.y + getInsets().top, bounds.width - getInsets().right, bounds.height - getInsets().bottom, arc, arc);
                }
                g2.setPaint(paint);
                g2.setColor(c);
                g2.dispose();
                offscreen.runValidate();
View Full Code Here

    paintBackgound(g);
    paintDragOver(g);
    final Color edgeColor = nodeView.getEdgeColor();
    g.setColor(edgeColor);
    g.setStroke(BubbleMainView.DEF_STROKE);
    g.drawRoundRect(0, 0, getWidth() - 1, getHeight() - 1, 10, 10);
    g.setRenderingHint(RenderingHints.KEY_ANTIALIASING, renderingHint);
    super.paintComponent(g);
  }

  @Override
View Full Code Here

            BasicStroke b_stroke = new BasicStroke(stroke_width);
            graphics.setColor(ColorMapper.getColorByName(stroke));
            graphics.setStroke(b_stroke);

            if ((arcwidth != 0) || (archeight != 0)) {
                graphics.drawRoundRect(0, 0, width, height, arcwidth, archeight);
            } else {
                graphics.drawRect(0, 0, width, height);
            }
        }
View Full Code Here


      g2.setStroke(_STK_STROKE_);
      g2.setPaint(_PNT_PAINT_);

      g2.drawRoundRect(0, 0, k - 1, l - 1, 5, 5);

      g2.setStroke(stkOri);
      g2.setPaint(pntOri);
   }
View Full Code Here

      int adjustWH = 2;
      Graphics2D g2d = (Graphics2D) g;
     
      GfrUtilGraphics2D.s_setRenderingAntiAliasOn(g2d);

      g2d.drawRoundRect(
              x + adjustXY,
              y + adjustXY,
              width - adjustWH,
              height - adjustWH - 1,
              this._widthRadius_+1,
View Full Code Here

    final Graphics2D g2  = (Graphics2D) g;
             
    g2.setRenderingHint( RenderingHints.KEY_ANTIALIASING, RenderingHints.VALUE_ANTIALIAS_ON );
    for( int j = 0, k = 1; j < 5; j++, k += 2 ) {
      g2.setColor( colrFocus[ j ]);
      g2.drawRoundRect( x + j, y + j, width - k, height - k, 10 - k, 10 - k );
    }
  }

  public static int getAquaColorVariant()
  {
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

            BasicStroke bStroke = new BasicStroke(stroke_width);
            graphics.setColor(ColorMapper.getColorByName(stroke));
            graphics.setStroke(bStroke);

            if ((arcwidth != 0) || (archeight != 0)) {
                graphics.drawRoundRect(0, 0, width, height, arcwidth, archeight);
            } else {
                graphics.drawRect(0, 0, width, height);
            }
        }
View Full Code Here

                renderHints.put(RenderingHints.KEY_RENDERING, RenderingHints.VALUE_RENDER_QUALITY);
                Graphics2D g2 = (Graphics2D) g;
                g2.setRenderingHints(renderHints);
                g2.setStroke(new BasicStroke(2f));
                int arcWidthAndHeight = height / 2;
                g2.drawRoundRect(x + 2, y + 2, width - 4, height - 4, arcWidthAndHeight, arcWidthAndHeight);
            }

            @Override
            public Insets getBorderInsets(Component c) {
                return textField.getMargin();
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.