Exemplo n.º 1
0
    /** Display this shape on the screen. */
    private void paint(Graphics2D pen) {
      if (myVisibilityStatus) {
        myView.paint(pen, myCenter, mySize, myDirection);
      }
      if (highlight) {
        pen.setColor(Color.RED);
        pen.drawRect(
            (int) myCenter.getX() - WIDTH_OF_TURTLE_ICON / 2,
            (int) myCenter.getY() - HEIGHT_OF_TURTLE_ICON / 2,
            WIDTH_OF_TURTLE_ICON,
            HEIGHT_OF_TURTLE_ICON);
      }

      for (StraightLine l : myLines) {
        l.paint(pen);
      }
      for (Location l : myStamps) {
        myView.paint(pen, l, mySize, myDirection);
      }
    }