Examples of fillRoundRect()


Examples of java.awt.Graphics2D.fillRoundRect()

            // Darken card with alpha blended overlay
            Composite composite = g2d.getComposite();
            AlphaComposite alphaComposite = AlphaComposite.getInstance(AlphaComposite.SRC_OVER, cardAlpha);
            g2d.setComposite(alphaComposite);
            g2d.setColor(new Color(0, 155, 0));
            g2d.fillRoundRect(0, 0, getWidth(), getHeight(), cardRectRadius, cardRectRadius);
            g2d.setComposite(composite);

            // Draw 'held' text rectangle and outline
            //g2d.setColor(Color.green);
            g2d.setColor(new Color(0, 120, 0));
View Full Code Here

Examples of java.awt.Graphics2D.fillRoundRect()

            g2d.setComposite(composite);

            // Draw 'held' text rectangle and outline
            //g2d.setColor(Color.green);
            g2d.setColor(new Color(0, 120, 0));
            g2d.fillRoundRect(heldRectX, heldRectY, heldRectWidth, heldRectHeight, heldRectRadius, heldRectRadius);
            g2d.setColor(Color.white);
            g2d.drawRoundRect(heldRectX, heldRectY, heldRectWidth, heldRectHeight, heldRectRadius, heldRectRadius);

            // Draw 'held' text
            g2d.setFont(heldFont);
View Full Code Here

Examples of java.awt.Graphics2D.fillRoundRect()

        }

        if (!fill.equals("transparent")) {
            graphics.setColor(ColorMapper.getColorByName(fill));
            if ((arcwidth != 0) || (archeight != 0)) {
                graphics.fillRoundRect(stroke_width, stroke_width,
                    width - (stroke_width * 2), height - (stroke_width * 2),
                    arcwidth, archeight);
            } else {
                graphics.fillRect(stroke_width, stroke_width,
                    width - (stroke_width * 2), height - (stroke_width * 2));
 
View Full Code Here

Examples of java.awt.Graphics2D.fillRoundRect()

    g2.setRenderingHint(RenderingHints.KEY_ANTIALIASING,
        RenderingHints.VALUE_ANTIALIAS_ON);

    g2.setColor(GENERAL_BACKGROUND_COLOR);
    g2.fillRoundRect(5, 5, getWidth() - 10, getHeight() - 10, 5, 5);
    g2.setColor(Color.BLACK);
    g2.setStroke(new BasicStroke(2));
    g2.drawRoundRect(5, 5, getWidth() - 10, getHeight() - 10, 5, 5);

    super.paint(g2);
View Full Code Here

Examples of java.awt.Graphics2D.fillRoundRect()

      g2.setRenderingHint(RenderingHints.KEY_ANTIALIASING,
          RenderingHints.VALUE_ANTIALIAS_ON);

      g2.setFont(g2.getFont().deriveFont(Font.BOLD));
      g2.setColor(TOTAL_BACKGROUND_COLOR);
      g2.fillRoundRect(5, 5, getWidth() - 10, getHeight() - 10, 5, 5);
      g2.setColor(Color.BLACK);
      g2.setStroke(new BasicStroke(2));
      g2.drawRoundRect(5, 5, getWidth() - 10, getHeight() - 10, 5, 5);

      g.setColor(TEXT_COLOR);
View Full Code Here

Examples of java.awt.Graphics2D.fillRoundRect()

            g2d.setColor(fSelected
                    ? getSelectedBadgeColor()
                    : getUnselectedBadgeColor(WindowUtils.isParentWindowFocused(this)));

            // draw the badge.
            g2d.fillRoundRect(0, 0, getWidth(), getHeight(), getHeight(), getHeight());

            // set the color to use for the text - note this color is always
            // the same, though it won't always show because of the composite
            // set below.
            g2d.setColor(fTextColor);
View Full Code Here

Examples of java.awt.Graphics2D.fillRoundRect()

            q1 = getTransform().transform(p1);
            q2 = getTransform().transform(p2);
        }
       
        g2.setColor(getColor());
        g2.fillRoundRect((int)q1.getX(), (int)q1.getY(), (int)(q2.getX() - q1.getX()), (int)(q2.getY() - q1.getY()), 10, 10);
        g2.setColor(oldColor);
       
    }

    public String getXML() {
View Full Code Here

Examples of java.awt.Graphics2D.fillRoundRect()

      }

      // Draw border
      if ((xMin < xMax) && (yMin < yMax)) {
        g2.setColor(textBackground);
        g2.fillRoundRect((int) xMin, (int) yMin, (int) (xMax - xMin), (int) (yMax - yMin), 10, 10);
        g2.setColor(textBorder);
        g2.drawRoundRect((int) xMin, (int) yMin, (int) (xMax - xMin), (int) (yMax - yMin), 10, 10);
      }

      // Draw text
View Full Code Here

Examples of java.awt.Graphics2D.fillRoundRect()

                    offs1,Position.Bias.Backward,
                    bounds);
        Rectangle r = (shape instanceof Rectangle) ?
                (Rectangle)shape : shape.getBounds();
        if (roundedEdges) {
          g2d.fillRoundRect(r.x,r.y, r.width,r.height, ARCWIDTH,
                          ARCHEIGHT);
        }
        else {
          g2d.fillRect(r.x, r.y, r.width, r.height);
        }
View Full Code Here

Examples of java.awt.Graphics2D.fillRoundRect()

        // draw shadow shape
        Graphics2D g2 = (Graphics2D)img1.getGraphics();
        g2.setRenderingHint(RenderingHints.KEY_ANTIALIASING,
                RenderingHints.VALUE_ANTIALIAS_ON);
        g2.setColor(color);
        g2.fillRoundRect(2,0,26,26,RADIUS,RADIUS);
        g2.dispose();
        // draw shadow
        InnerShadowEffect effect = new InnerShadowEffect();
        effect.setDistance(1);
        effect.setSize(3);
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.