Package java.awt

Examples of java.awt.Graphics.fillOval()


                }

            }
        } else if (AppPreferences.ADD_SHOW_GHOSTS.getBoolean() && inCanvas) {
            g.setColor(Color.GRAY);
            g.fillOval(cur.getX() - 2, cur.getY() - 2, 5, 5);
        }
    }

    @Override
    public void mouseEntered(Canvas canvas, Graphics g,
View Full Code Here


        if (toolIcon != null) {
            toolIcon.paintIcon(c.getDestination(), g, x + 2, y + 2);
        } else {
            g.setColor(java.awt.Color.black);
            g.drawLine(x + 3, y + 13, x + 17, y + 7);
            g.fillOval(x + 1, y + 11, 5, 5);
            g.fillOval(x + 15, y + 5, 5, 5);
        }
    }

    @Override
View Full Code Here

            toolIcon.paintIcon(c.getDestination(), g, x + 2, y + 2);
        } else {
            g.setColor(java.awt.Color.black);
            g.drawLine(x + 3, y + 13, x + 17, y + 7);
            g.fillOval(x + 1, y + 11, 5, 5);
            g.fillOval(x + 15, y + 5, 5, 5);
        }
    }

    @Override
    public Cursor getCursor() { return cursor; }
View Full Code Here

                g.drawLine(x0, y0 + parms.getSpine1Y() / 4, x0, spine0y);
            }
            // spine is empty
            if (fanout <= 1) {
                int diam = SPINE_DOT;
                g.fillOval(spine0x - diam / 2, spine0y - diam / 2, diam, diam);
            } else {
                g.drawLine(spine0x, spine0y, spine1x, spine1y);
            }
        } else {
            int[] xSpine = { spine0x, spine1x, x0 + parms.getSpine1X() / 4 };
View Full Code Here

   
    public void fillEllipse(Color color, float x, float y, int w, int h)
    {
        Graphics g = getGraphics();
        g.setColor(color);
        g.fillOval((int)x, (int)y, w, h);       
    }
   
    public void drawPixel(Color color, float x, float y)
    {
        fillRectangle(color, x, y, 1, 1);       
View Full Code Here

            GraphicsUtil.drawCenteredText(g, "" + v, 10, 9);
        } else {
            g.setFont(g.getFont().deriveFont(9.0f));
            GraphicsUtil.drawCenteredText(g, "x" + w, 10, 9);
        }
        g.fillOval(pinx, piny, 3, 3);
    }

    @Override
    public void paintGhost(InstancePainter painter) {
        int v = painter.getAttributeValue(ATTR_VALUE).intValue();
View Full Code Here

        String vStr = Integer.toHexString(v);
        Bounds bds = getOffsetBounds(painter.getAttributeSet());

        Graphics g = painter.getGraphics();
        GraphicsUtil.switchToWidth(g, 2);
        g.fillOval(-2, -2, 5, 5);
        GraphicsUtil.drawCenteredText(g, vStr, bds.getX() + bds.getWidth() / 2,
                bds.getY() + bds.getHeight() / 2);
    }

    @Override
View Full Code Here

                GraphicsUtil.switchToWidth(g, SPINE_WIDTH);
                g.setColor(Color.BLACK);
                g.drawLine(x1 + dx, ySpine, x1 + (fanout - 2) * dx, ySpine);
            } else {
                g.setColor(Color.BLACK);
                g.fillOval(x0 - SPINE_DOT / 2, ySpine - SPINE_DOT / 2,
                        SPINE_DOT, SPINE_DOT);
            }
        } else {
            int xSpine = (x0 + x1) / 2;
            GraphicsUtil.switchToWidth(g, Wire.WIDTH);
View Full Code Here

                GraphicsUtil.switchToWidth(g, SPINE_WIDTH);
                g.setColor(Color.BLACK);
                g.drawLine(xSpine, y1 + dy, xSpine, y1 + (fanout - 2) * dy);
            } else {
                g.setColor(Color.BLACK);
                g.fillOval(xSpine - SPINE_DOT / 2, y0 - SPINE_DOT / 2,
                        SPINE_DOT, SPINE_DOT);
            }
        }
        GraphicsUtil.switchToWidth(g, 1);
    }
View Full Code Here

            if (mouseDown) {
                g.setColor(MAGNIFYING_INTERIOR_DOWN);
            } 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);
        }
    }
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.