Beispiel #1
0
  private void drawDarkerSide(
      Graphics graphics, Color[] br, int top, int left, int bottom, int right) {
    graphics.setLineWidth(1);
    graphics.setAlpha(200);
    Color color;
    for (int i = 0; i < br.length; i++) {
      color = br[i];
      graphics.setForegroundColor(color);

      graphics.drawArc(
          right - i - corner.width,
          bottom - i - corner.height,
          corner.width,
          corner.height,
          270,
          90);
      Point rightButtomRight = new Point(right - i, bottom - i - corner.height / 2);
      Point rightTopRight = new Point(right - i, top + i + corner.height / 2);
      graphics.drawLine(rightButtomRight, rightTopRight);
      graphics.drawArc(right - i - corner.width, top - i, corner.width, corner.height, 0, 45);

      Point rightButtomButtom = new Point(right - i - corner.width / 2, bottom - i);
      Point leftBottomLeft = new Point(left + i + corner.width / 2, bottom - i);
      graphics.drawLine(rightButtomButtom, leftBottomLeft);
      graphics.drawArc(
          left - i, bottom - i - corner.height, corner.width, corner.height, 180 + 45, 45);
    }
  }
Beispiel #2
0
  private void drawLighterSide(
      Graphics graphics, Color[] tl, int top, int left, int bottom, int right) {
    graphics.setAlpha(255);
    right--;
    bottom--;
    Color color;
    graphics.setLineWidth(1);

    for (int i = 0; i < tl.length; i++) {
      color = tl[i];
      graphics.setForegroundColor(color);

      graphics.drawArc(left - i, top - i, corner.width, corner.height, 90, 90);
      Point leftTopLeft = new Point(left - i, top - i + corner.height / 2);
      Point leftBottomLeft = new Point(left - i, bottom + i - corner.height / 2);
      graphics.drawLine(leftTopLeft, leftBottomLeft);
      graphics.drawArc(left - i, bottom - i - corner.height, corner.width, corner.height, 180, 45);

      Point rightTopTop = new Point(right - i - corner.width / 2, top - i);
      Point leftTopTop = new Point(left + i + corner.width / 2, top - i);
      graphics.drawLine(rightTopTop, leftTopTop);
      graphics.drawArc(right - i - corner.width, top - i, corner.width, corner.height, 0 + 45, 45);
    }
  }