Package java.awt

Examples of java.awt.Graphics.fillOval()


    } else {
      PinState state = getState(painter);
      if (attrs.width.getWidth() <= 1) {
        Value receiving = state.receiving;
        g.setColor(receiving.getColor());
        g.fillOval(x + 4, y + 4, 13, 13);
 
        if (attrs.width.getWidth() == 1) {
          g.setColor(Color.WHITE);
          GraphicsUtil.drawCenteredText(g,
            state.sending.toDisplayString(), x + 11, y + 9);
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, 1);
          g.setColor(COLOR_UNMATCHED);
          for (Location conn : result.getUnconnectedLocations()) {
            int connX = conn.getX();
            int connY = conn.getY();
            g.fillOval(connX - 3, connY - 3, 6, 6);
            g.fillOval(connX + dx - 3, connY + dy - 3, 6, 6);
          }
        }
      }
    } else if (state == RECT_SELECT) {
View Full Code Here

          g.setColor(COLOR_UNMATCHED);
          for (Location conn : result.getUnconnectedLocations()) {
            int connX = conn.getX();
            int connY = conn.getY();
            g.fillOval(connX - 3, connY - 3, 6, 6);
            g.fillOval(connX + dx - 3, connY + dy - 3, 6, 6);
          }
        }
      }
    } else if (state == RECT_SELECT) {
      int left = start.getX();
View Full Code Here

              else         g.setColor(state.getValue(loc).getColor());
            } 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(state.getValue(loc).getColor());
              } 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

    } else if (dir == Direction.WEST) { pinx = 3;
    } else if (dir == Direction.NORTH) { pinx = 8; piny = 3;
    } else if (dir == Direction.SOUTH) { pinx = 8; piny = 15;
    }
    g.setColor(Value.TRUE.getColor());
    g.fillOval(pinx, piny, 3, 3);
  }

  @Override
  public void paintInstance(InstancePainter painter) {
    java.awt.Graphics g = painter.getGraphics();
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.