Package java.awt

Examples of java.awt.Graphics.drawOval()


        int y = bds.getY();
        g.setColor(Color.WHITE);
        g.fillRect(x + 5, y + 5, bds.getWidth() - 10, bds.getHeight() - 10);
        g.setColor(Color.GRAY);
        if (value.getWidth() <= 1) {
            g.drawOval(x + 1, y + 1,
                bds.getWidth() - 2, bds.getHeight() - 2);
        } else {
            g.drawRoundRect(x + 1, y + 1,
                bds.getWidth() - 2, bds.getHeight() - 2, 6, 6);
        }
View Full Code Here


        Graphics g = context.getGraphics();
        GraphicsUtil.switchToWidth(g, 2);
        for (Entry e : data) {
            if (e.state == state) {
                Location p = e.loc;
                g.drawOval(p.getX() - 4, p.getY() - 4, 8, 8);
            } else if (stateMap.containsKey(e.state)) {
                CircuitState substate = stateMap.get(e.state);
                Component subcirc = substate.getSubcircuit();
                Bounds b = subcirc.getBounds();
                g.drawRect(b.getX(), b.getY(), b.getWidth(), b.getHeight());
View Full Code Here

                        gCopy.drawRect(x, y, w, h);
                    } else {
                        if (b.getWidth() > 25) {
                            gCopy.drawRoundRect(x, y, w, h, 4, 4);
                        } else {
                            gCopy.drawOval(x, y, w, h);
                        }
                    }
                }
            }
            gCopy.dispose();
View Full Code Here

            xp[0] =  -6; yp[0] 0;
            xp[1] = -19; yp[1] = -6;
            xp[2] = -19; yp[2] 6;
            xp[3] =  -6; yp[3] 0;
            g.drawPolyline(xp, yp, 4);
            g.drawOval(-6, -3, 6, 6);
        } else {
            int[] xp = new int[4];
            int[] yp = new int[4];
            xp[0] = -10; yp[0] = 0;
            xp[1] = -29; yp[1] = -7;
View Full Code Here

            xp[0] = -10; yp[0] = 0;
            xp[1] = -29; yp[1] = -7;
            xp[2] = -29; yp[2] = 7;
            xp[3] = -10; yp[3] = 0;
            g.drawPolyline(xp, yp, 4);
            g.drawOval(-9, -4, 9, 9);
        }
    }

    static void paintXor(InstancePainter painter, int width, int height) {
        Graphics g = painter.getGraphics();
View Full Code Here

            if (toolIconRect != null) {
                toolIconRect.paintIcon(painter.getDestination(), g, 2, 2);
            } else {
                g.drawRect(0, 2, 16, 16);
                GraphicsUtil.drawCenteredText(g, RECT_LABEL, 8, 8);
                g.drawOval(16, 8, 4, 4);
            }
        } else if (painter.getGateShape() == AppPreferences.SHAPE_DIN40700) {
            if (toolIconDin != null) {
                toolIconDin.paintIcon(painter.getDestination(), g, 2, 2);
            } else {
View Full Code Here

            if (toolIconDin != null) {
                toolIconDin.paintIcon(painter.getDestination(), g, 2, 2);
            } else {
                g.drawRect(0, 2, 16, 16);
                GraphicsUtil.drawCenteredText(g, RECT_LABEL, 8, 8);
                g.drawOval(16, 8, 4, 4);
            }
        } else {
            if (toolIcon != null) {
                toolIcon.paintIcon(painter.getDestination(), g, 2, 2);
            } else {
View Full Code Here

                xp[0] = 15; yp[0] = 10;
                xp[1] 1; yp[1] 3;
                xp[2] 1; yp[2] = 17;
                xp[3] = 15; yp[3] = 10;
                g.drawPolyline(xp, yp, 4);
                g.drawOval(15, 8, 4, 4);
            }
        }
    }

    @Override
View Full Code Here

            int x = loc.getX();
            int y = loc.getY();
            Graphics g = context.getGraphics();
            g.setColor(Value.TRUE_COLOR);
            GraphicsUtil.switchToWidth(g, 2);
            g.drawOval(x - 5, y - 5, 10, 10);
            g.setColor(Color.BLACK);
            GraphicsUtil.switchToWidth(g, 1);
        }
        current.draw(canvas, context);
    }
View Full Code Here

            } else {
                g.setColor(MAGNIFYING_INTERIOR);
            }
            g.fillOval(cx - 5, cy - 5, 10, 10);
            g.setColor(Color.BLACK);
            g.drawOval(cx - 5, cy - 5, 10, 10);
            g.fillPolygon(xp, yp, xp.length);
        }
    }

    @Override
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.