Package java.awt

Examples of java.awt.Graphics2D.drawRoundRect()


                }
                // Paint the first layer
                gb.setColor(canvas.getColor().darker());
                gb.fillRoundRect(INSET, INSET, buttonWidth, buttonHeight, arc, arc);
                gb.setColor(Color.darkGray);
                gb.drawRoundRect(INSET, INSET, buttonWidth, buttonHeight, arc, arc);

                // set up paint data fields for second layer

                int highlightHeight = buttonHeight * 2 / 3;
                int highlightWidth = buttonWidth;
View Full Code Here


        }
        // Paint the first layer
        g2.setPaint(new GradientPaint(0, 0, topColoring, 0, buttonHeight, bottomColoring, false));
        g2.fillRoundRect(INSET, INSET, buttonWidth, buttonHeight + arc, arc, arc);
        g2.setColor(Color.darkGray);
        g2.drawRoundRect(INSET, INSET, buttonWidth, buttonHeight + arc, arc, arc);

        // set up paint data fields for second layer
        int highlightHeight = buttonHeight / 2 - HIGHLIGHT_INSET;
        int highlightWidth = buttonWidth - (HIGHLIGHT_INSET * 2) + 1;
        if (this.focus || this.selected) {
View Full Code Here

            }
            // Paint the first layer
            g2.setPaint(new GradientPaint(0, 0, topColoring, 0, buttonHeight, bottomColoring, false));
            g2.fillRoundRect(INSET, INSET, buttonWidth, buttonHeight, arc, arc);
            g2.setColor(Color.darkGray);
            g2.drawRoundRect(INSET, INSET, buttonWidth, buttonHeight, arc, arc);

            // set up paint data fields for second layer
            int highlightHeight = buttonHeight / 2 - HIGHLIGHT_INSET;
            int highlightWidth = buttonWidth - (HIGHLIGHT_INSET * 2) + 1;
            if (this.pressed || this.selected) {
View Full Code Here

        gc.setColor( color );
        gc.fillRoundRect( 0, 0, 14, 14, 2, 2);
        gc.setColor( contrast );
        gc.drawRoundRect( 0, 0, 14, 14, 2, 2 );
        return bi;
    }
    /**
 
View Full Code Here

            gc.setColor( colors[i] );
            gc.drawLine(i,0,i,15);
        }
        gc.setColor( Color.GRAY );
        gc.drawRoundRect( 0, 0, 14, 14, 2, 2 );
        return bi;
    }
    public static BufferedImage icon( SimpleFeatureType ft ) {
View Full Code Here

        gc.setColor(f);
        gc.fillRoundRect( 2,1, 13, 13, 2, 2 );
        gc.setColor(c);
        gc.drawRoundRect( 2,1, 13, 13, 2, 2 );
        return bi;
    }
    /**
 
View Full Code Here

                    {
                        for (int i = 0; i < markers.size(); i++)
                        {
                            if (markers.get(i) == vertex)
                            {
                                graphics.drawRoundRect(tripletOffset - 2, y - heightOfZeroChar + 2,
                                        3 * widthOfZeroChar + 3, heightOfZeroChar, 5, 5);
                            }
                        }
                    }

View Full Code Here

        Stroke savedStroke = g2.getStroke();
        RenderingHints savedHints = g2.getRenderingHints();
        g2.setColor(color);
        g2.setStroke(getStroke());
        g2.setRenderingHint(RenderingHints.KEY_ANTIALIASING, RenderingHints.VALUE_ANTIALIAS_ON);
        g2.drawRoundRect(x, y, w, h, width, height);
        g2.setRenderingHints(savedHints);
        g2.setStroke(savedStroke);
        g2.setColor(savedColor);
    }
View Full Code Here

      g2d.fillRect(x,y+h/2,w,h/2);

      g2d.setClip(vOldClip);
      GradientPaint vPaint = new GradientPaint(x,y,borderColor,x,y+h,borderHighlight);
      g2d.setPaint(vPaint);
      g2d.drawRoundRect(x,y,w,h,arc,arc);

      g2d.clipRect(x,y,w+1,h-arc/4);
      g2d.setColor(borderColorAlpha1);
      g2d.drawRoundRect(x,y+1,w,h-1,arc,arc-1);
View Full Code Here

      g2d.setPaint(vPaint);
      g2d.drawRoundRect(x,y,w,h,arc,arc);

      g2d.clipRect(x,y,w+1,h-arc/4);
      g2d.setColor(borderColorAlpha1);
      g2d.drawRoundRect(x,y+1,w,h-1,arc,arc-1);

      g2d.setClip(vOldClip);
      g2d.setColor(borderColorAlpha2);
      g2d.drawRoundRect(x+1,y+2,w-2,h-3,arc,arc-2);
    }
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.