Package java.awt

Examples of java.awt.Graphics2D.fillRoundRect()


            g2.translate(this.getWidth() - 0.5f * this.getHeight(), 0);
        }
        g2.setPaint(new GradientPaint(
                0, 0, this.thumbColor,
                0, this.getHeight() + 10, Color.black, true));
        g2.fillRoundRect(0, 0, (int) viewExtent, vHeight, vHeight, vHeight);
        g2.setColor(new Color(250, 250, 250, 100));
        g2.drawRoundRect(0, 0, (int) viewExtent, vHeight, vHeight, vHeight);
    }

    /**
 
View Full Code Here


                bottomColoring = this.buttonColor;
            }
        }
        // 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;
View Full Code Here

                bottomColoring = Color.darkGray;
            }
        }
        // Paint the second layer
        g2.setPaint(new GradientPaint(0, 0, topColoring, 0, buttonHeight, bottomColoring, false));
        g2.fillRoundRect(INSET + HIGHLIGHT_INSET, INSET + HIGHLIGHT_INSET + 1, highlightWidth, highlightHeight, arc, arc);
        //g2.setColor(Color.gray);
        //g2.drawRoundRect(INSET+HIGHLIGHT_INSET,INSET+HIGHLIGHT_INSET,highlightWidth,highlightHeight,arc,arc);


        // Draw the text (if any)
View Full Code Here

            Graphics2D g2 = (Graphics2D) g;
            g2.addRenderingHints(renderingHints);
            g2.translate(vWidth / 2, 0);
            g2.setColor(trackColor);
            g2.fillRoundRect(0, 0, vWidth, this.getHeight(), vWidth, vWidth);
            g2.setColor(new Color(150, 150, 150));
            g2.drawRoundRect(0, 0, vWidth, this.getHeight() - 1, vWidth, vWidth);

            if (viewValue < this.getHeight() - 0.5f * this.getWidth()) {
                g2.translate(0, viewValue);
View Full Code Here

                g2.translate(0, this.getHeight() - 0.5f * this.getWidth());
            }
            g2.setPaint(new GradientPaint(
                    0, 0, this.thumbColor,
                    this.getWidth() + 10, 0, Color.black, true));
            g2.fillRoundRect(0, 0, vWidth, (int) viewExtent, vWidth, vWidth);
            g2.setColor(new Color(250, 250, 250, 100));
            g2.drawRoundRect(0, 0, vWidth, (int) viewExtent, vWidth, vWidth);

        }
    }
View Full Code Here

        Graphics2D g2 = (Graphics2D) g;
        g2.addRenderingHints(renderingHints);
        g2.translate(0, vHeight / 2);

        g2.setColor(trackColor);
        g2.fillRoundRect(0, 0, this.getWidth(), vHeight, vHeight, vHeight);
        g2.setColor(new Color(150, 150, 150));
        g2.drawRoundRect(0, 0, this.getWidth() - 1, vHeight, vHeight, vHeight);

        if (viewValue < this.getWidth() - 0.5f * this.getHeight()) {
            g2.translate(viewValue, 0);
View Full Code Here

            g2.translate(this.getWidth() - 0.5f * this.getHeight(), 0);
        }
        g2.setPaint(new GradientPaint(
                0, 0, this.thumbColor,
                0, this.getHeight() + 10, Color.black, true));
        g2.fillRoundRect(0, 0, (int) viewExtent, vHeight, vHeight, vHeight);
        g2.setColor(new Color(250, 250, 250, 100));
        g2.drawRoundRect(0, 0, (int) viewExtent, vHeight, vHeight, vHeight);
    }

    /**
 
View Full Code Here

                gb.drawRoundRect(INSET, INSET, buttonWidth, buttonHeight, arc, arc);
                gb.setStroke(new BasicStroke(1));
            }
            // Paint the first layer
            gb.setColor(buttonColor.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
View Full Code Here

            // Paint the second layer
            gb.setComposite(AlphaComposite.getInstance(AlphaComposite.SRC_OVER, .8f));

            gb.setColor(buttonColor);
            gb.setClip(new RoundRectangle2D.Float(INSET, INSET, highlightWidth, highlightHeight, highlightArc, highlightArc));
            gb.fillRoundRect(INSET, INSET, buttonWidth, buttonHeight, arc, arc);

            // Blur
            ConvolveOp blurOp = new ConvolveOp(new Kernel(3, 3, BLUR));
            BufferedImage blurredImage = blurOp.filter(buffer, null);
View Full Code Here

                RenderingHints.KEY_ANTIALIASING,
                RenderingHints.VALUE_ANTIALIAS_ON);


        g2.setColor(Color.white);
        g2.fillRoundRect(0, 0, w, h, h, h);

        g2.setStroke(new BasicStroke(3));
        g2.setColor(Color.darkGray.brighter());
        g2.draw(this.getMag(w, h));
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.