コード例 #1
0
  public final void drawU(UGraphic ug) {
    final StringBounder stringBounder = ug.getStringBounder();
    final TextBlockInEllipse ellipse = new TextBlockInEllipse(desc, stringBounder);
    if (getSkinParam().shadowing()) {
      ellipse.setDeltaShadow(3);
    }

    if (url != null) {
      ug.startUrl(url);
    }

    ug =
        ug.apply(stroke)
            .apply(
                new UChangeColor(
                    SkinParamUtils.getColor(
                        getSkinParam(), ColorParam.usecaseBorder, getStereo())));
    HtmlColor backcolor = getEntity().getSpecificBackColor();
    if (backcolor == null) {
      backcolor =
          SkinParamUtils.getColor(getSkinParam(), ColorParam.usecaseBackground, getStereo());
    }
    ug = ug.apply(new UChangeBackColor(backcolor));
    final UGraphic ug2 = new MyUGraphicEllipse(ug, 0, 0, ellipse.getUEllipse());

    ellipse.drawU(ug2);

    if (url != null) {
      ug.closeAction();
    }
  }
コード例 #2
0
  public final void drawU(UGraphic ug) {
    final UEllipse circle = new UEllipse(SIZE, SIZE);
    if (getSkinParam().shadowing()) {
      circle.setDeltaShadow(4);
    }
    ug =
        ug.apply(
                new UChangeBackColor(
                    SkinParamUtils.getColor(
                        getSkinParam(), ColorParam.classBackground, getStereo())))
            .apply(
                new UChangeColor(
                    SkinParamUtils.getColor(getSkinParam(), ColorParam.classBorder, getStereo())));
    if (url != null) {
      ug.startUrl(url);
    }
    ug.apply(new UStroke(1.5)).draw(circle);

    final Dimension2D dimDesc = desc.calculateDimension(ug.getStringBounder());
    final double widthDesc = dimDesc.getWidth();
    // final double totalWidth = Math.max(widthDesc, SIZE);

    final double x = SIZE / 2 - widthDesc / 2;
    final double y = SIZE;
    desc.drawU(ug.apply(new UTranslate(x, y)));
    if (url != null) {
      ug.closeAction();
    }
  }
コード例 #3
0
 private UGraphic applyColors(UGraphic ug) {
   ug =
       ug.apply(
           new UChangeColor(
               SkinParamUtils.getColor(getSkinParam(), ColorParam.activityBorder, getStereo())));
   HtmlColor backcolor = getEntity().getColors(getSkinParam()).getColor(ColorType.BACK);
   if (backcolor == null) {
     backcolor =
         SkinParamUtils.getColor(getSkinParam(), ColorParam.activityBackground, getStereo());
   }
   ug = ug.apply(new UChangeBackColor(backcolor));
   return ug;
 }
コード例 #4
0
  public final void drawU(UGraphic ug) {
    ug =
        ug.apply(
            new UChangeColor(
                SkinParamUtils.getColor(getSkinParam(), ColorParam.classBorder, getStereo())));
    ug =
        ug.apply(
            new UChangeBackColor(
                SkinParamUtils.getColor(getSkinParam(), ColorParam.classBackground, getStereo())));
    if (url != null) {
      ug.startUrl(url);
    }
    final double sizeSmall = 14;
    final double diff = (SIZE - sizeSmall) / 2;
    final UEllipse circle1 = new UEllipse(sizeSmall, sizeSmall);
    if (getSkinParam().shadowing()) {
      // circle.setDeltaShadow(4);
    }
    ug.apply(new UStroke(1.5)).apply(new UTranslate(diff, diff)).draw(circle1);
    ug = ug.apply(new UChangeBackColor(null));

    Point2D pos = bibliotekon.getShape(getEntity()).getPosition();

    final List<Line> lines = bibliotekon.getAllLineConnectedTo(getEntity());
    final UTranslate reverse = new UTranslate(pos).reverse();
    final ConnectedCircle connectedCircle = new ConnectedCircle(SIZE / 2);
    for (Line line : lines) {
      Point2D pt = line.getMyPoint(getEntity());
      pt = reverse.getTranslated(pt);
      connectedCircle.addSecondaryConnection(pt);
    }
    // connectedCircle.drawU(ug.apply(new UStroke(1.5)));
    connectedCircle.drawU(ug);

    //
    // final Dimension2D dimDesc = desc.calculateDimension(ug.getStringBounder());
    // final double widthDesc = dimDesc.getWidth();
    // // final double totalWidth = Math.max(widthDesc, SIZE);
    //
    // final double x = SIZE / 2 - widthDesc / 2;
    // final double y = SIZE;
    // desc.drawU(ug.apply(new UTranslate(x, y)));
    if (url != null) {
      ug.closeAction();
    }
  }
コード例 #5
0
  public final void drawU(UGraphic ug) {
    final UPolygon diams = new UPolygon();
    if (getSkinParam().shadowing()) {
      diams.setDeltaShadow(5);
    }
    diams.addPoint(SIZE, 0);
    diams.addPoint(SIZE * 2, SIZE);
    diams.addPoint(SIZE, SIZE * 2);
    diams.addPoint(0, SIZE);
    diams.addPoint(SIZE, 0);

    ug.apply(
            new UChangeColor(
                SkinParamUtils.getColor(getSkinParam(), ColorParam.activityBorder, getStereo())))
        .apply(
            new UChangeBackColor(
                SkinParamUtils.getColor(
                    getSkinParam(), ColorParam.activityBackground, getStereo())))
        .apply(new UStroke(1.5))
        .draw(diams);
  }