Package java.awt

Examples of java.awt.Graphics2D.fillOval()


                g.translate(-compBounds.x, -compBounds.y);
                g.clip(compBounds);
                Color ledColor = Color.WHITE;
                if ((state & ON_STATE) != 0) {
                        g.setColor(ledColor = type == READ ? Color.GREEN.brighter() : Color.RED.brighter());
                        g.fillOval(bounds.x, bounds.y, bounds.width, bounds.height);
                }
                if ((state & ERROR_STATE) != 0) {
                        g.setColor(ledColor = Color.ORANGE.brighter());
                        g.fillOval(bounds.x, bounds.y, bounds.width, bounds.height);
                }
View Full Code Here


                        g.setColor(ledColor = type == READ ? Color.GREEN.brighter() : Color.RED.brighter());
                        g.fillOval(bounds.x, bounds.y, bounds.width, bounds.height);
                }
                if ((state & ERROR_STATE) != 0) {
                        g.setColor(ledColor = Color.ORANGE.brighter());
                        g.fillOval(bounds.x, bounds.y, bounds.width, bounds.height);
                }
                if ((state & (ERROR_STATE | ON_STATE)) == 0) {
                        g.setColor(Color.BLACK);
                        g.fillOval(bounds.x, bounds.y, bounds.width, bounds.height);
                }
View Full Code Here

                        g.setColor(ledColor = Color.ORANGE.brighter());
                        g.fillOval(bounds.x, bounds.y, bounds.width, bounds.height);
                }
                if ((state & (ERROR_STATE | ON_STATE)) == 0) {
                        g.setColor(Color.BLACK);
                        g.fillOval(bounds.x, bounds.y, bounds.width, bounds.height);
                }
                mask.setBounds(bounds);
                mask.clearImageGraphics();
                Graphics2D gm = Sprite.wrapRendering(Sprite._createImageGraphics(mask.getImage(this)));
                gm.clip(new Ellipse2D.Float(-.5f, -.5f, bounds.width + 1, bounds.height + 1));
View Full Code Here

                gm.clip(new Ellipse2D.Float(-.5f, -.5f, bounds.width + 1, bounds.height + 1));
                gm.setColor(ledColor);
                gm.fill(gm.getClip());
                Composite cpsm = gm.getComposite();
                gm.setComposite(AlphaComposite.getInstance(AlphaComposite.DST_OUT, .3f));
                gm.fillOval(-(int) ((float) bounds.width / 4f), (int) ((float) bounds.height / 4f), bounds.width, bounds.height);
                gm.setComposite(cpsm);
                gm.setColor(Color.BLACK);
                Insets in = getInsets();
                if (style == PaintStyle.STYLE_GLOW) {
                        gm.drawOval(in.left, in.top, bounds.width - in.right, bounds.height - in.bottom);
View Full Code Here

        if (current == 0 || current == 1) {
            g.setColor(Color.RED);
        } else {
            g.setColor(Color.GRAY);
        }
        g2d.fillOval(40, 40, 100, 100);
        switch (current) {
            case 1:
            case 3:
                g.setColor(Color.YELLOW);
                break;
View Full Code Here

                g.setColor(Color.YELLOW);
                break;
            default:
                g.setColor(Color.GRAY);
        }
        g2d.fillOval(40, 160, 100, 100);
        if (current == 2) {
            g.setColor(Color.GREEN);
        } else {
            g.setColor(Color.GRAY);
        }
View Full Code Here

        if (current == 2) {
            g.setColor(Color.GREEN);
        } else {
            g.setColor(Color.GRAY);
        }
        g2d.fillOval(40, 280, 100, 100);
    }

    public void doNext() {
        int delay;
        switch (current) {
View Full Code Here

    final int leftUpperCornerY = topLeftCoordinates.getIntY();
    final int diameter = 2 * radius;

    // Could be image, but it would be the same.
    g2.setColor(ballConfig.getOutsideColor()); // new Color(22, 119, 140);
    g2.fillOval(leftUpperCornerX, leftUpperCornerY, diameter, diameter);
    g2.setColor(ballConfig.getInsideColor()); // new Color(39, 217, 255);
    g2.fillOval(leftUpperCornerX + 2, leftUpperCornerY + 2, diameter - 4, diameter - 4);
  }

  /**
 
View Full Code Here

    // Could be image, but it would be the same.
    g2.setColor(ballConfig.getOutsideColor()); // new Color(22, 119, 140);
    g2.fillOval(leftUpperCornerX, leftUpperCornerY, diameter, diameter);
    g2.setColor(ballConfig.getInsideColor()); // new Color(39, 217, 255);
    g2.fillOval(leftUpperCornerX + 2, leftUpperCornerY + 2, diameter - 4, diameter - 4);
  }

  /**
   * Zmienia stan na podstawie
   * makiety stanu piłki z modelu.
View Full Code Here

       
        // Pinto la esfera del reloj;
        g2.setPaint(this.isEnabled()
            ? new GradientPaint(-1200, -1200, Color.BLUE, 1200, 1200, Color.CYAN)
            : new GradientPaint(-1200, -1200, Color.GRAY, 1200, 1200, Color.LIGHT_GRAY));
        g2.fillOval(-1000, -1000, 2000, 2000);
        g2.setPaint(this.isEnabled()
            ? new GradientPaint(-1200, -1200, Color.CYAN, 1200, 1200, Color.BLUE)
            : new GradientPaint(-1200, -1200, Color.LIGHT_GRAY, 1200, 1200, Color.GRAY));
        g2.fillOval(-900, -900, 1800, 1800);
        g2.setColor(Color.BLACK);
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.