Package java.awt

Examples of java.awt.Graphics.fillOval()


            StateData myState = (StateData) painter.getData();
            if (myState != null) {
                int x = loc.getX();
                int y = loc.getY();
                g.setColor(myState.curValue.getColor());
                g.fillOval(x - 26, y + 4, 13, 13);
                g.setColor(Color.WHITE);
                GraphicsUtil.drawCenteredText(g,
                    myState.curValue.toDisplayString(), x - 19, y + 9);
                g.setColor(Color.BLACK);
            }
View Full Code Here


                        } else {
                            g.setColor(Color.BLACK);
                        }
                        if (highlighted.containsLocation(loc)) {
                            g.fillOval(loc.getX() - 5, loc.getY() - 5, 10, 10);
                        } else {
                            g.fillOval(loc.getX() - 4, loc.getY() - 4, 8, 8);
                        }
                    }
                }
View Full Code Here

                            g.setColor(Color.BLACK);
                        }
                        if (highlighted.containsLocation(loc)) {
                            g.fillOval(loc.getX() - 5, loc.getY() - 5, 10, 10);
                        } else {
                            g.fillOval(loc.getX() - 4, loc.getY() - 4, 8, 8);
                        }
                    }
                }
            }
        } else {
View Full Code Here

                            } else {
                                g.setColor(Color.BLACK);
                            }
                            if (highlighted.containsLocation(loc)) {
                                g.fillOval(loc.getX() - 5, loc.getY() - 5, 10, 10);
                            } else {
                                g.fillOval(loc.getX() - 4, loc.getY() - 4, 8, 8);
                            }
                        }
                    }
View Full Code Here

                                g.setColor(Color.BLACK);
                            }
                            if (highlighted.containsLocation(loc)) {
                                g.fillOval(loc.getX() - 5, loc.getY() - 5, 10, 10);
                            } else {
                                g.fillOval(loc.getX() - 4, loc.getY() - 4, 8, 8);
                            }
                        }
                    }
                }
            }
View Full Code Here

            if (i < 7) {
                Bounds seg = SEGMENTS[i];
                g.fillRect(x + seg.getX(), y + seg.getY(), seg.getWidth(), seg.getHeight());
            } else {
                // draw decimal point
                g.fillOval(x + 28, y + 48, 5, 5);
            }
        }
        painter.drawPorts();
    }
View Full Code Here

            g.drawOval(4, 4, 13, 13);
        } else {
            g.drawRect(4, 4, 13, 13);
        }
        g.setColor(Value.TRUE.getColor());
        g.fillOval(7, 788);
        g.fillOval(pinx, piny, 3, 3);
    }

    @Override
    public void paintGhost(InstancePainter painter) {
View Full Code Here

        } else {
            g.drawRect(4, 4, 13, 13);
        }
        g.setColor(Value.TRUE.getColor());
        g.fillOval(7, 788);
        g.fillOval(pinx, piny, 3, 3);
    }

    @Override
    public void paintGhost(InstancePainter painter) {
        PinAttributes attrs = (PinAttributes) painter.getAttributeSet();
View Full Code Here

            Color onColor = painter.getAttributeValue(Io.ATTR_ON_COLOR);
            Color offColor = painter.getAttributeValue(Io.ATTR_OFF_COLOR);
            Boolean activ = painter.getAttributeValue(Io.ATTR_ACTIVE);
            Object desired = activ.booleanValue() ? Value.TRUE : Value.FALSE;
            g.setColor(val == desired ? onColor : offColor);
            g.fillOval(bds.getX(), bds.getY(), bds.getWidth(), bds.getHeight());
        }
        g.setColor(Color.BLACK);
        GraphicsUtil.switchToWidth(g, 2);
        g.drawOval(bds.getX(), bds.getY(), bds.getWidth(), bds.getHeight());
        GraphicsUtil.switchToWidth(g, 1);
View Full Code Here

        } else {
            PinState state = getState(painter);
            if (attrs.width.getWidth() <= 1) {
                Value found = state.foundValue;
                g.setColor(found.getColor());
                g.fillOval(x + 4, y + 4, 13, 13);

                if (attrs.width.getWidth() == 1) {
                    g.setColor(Color.WHITE);
                    GraphicsUtil.drawCenteredText(g,
                        state.intendedValue.toDisplayString(), x + 11, y + 9);
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.