Exemplo n.º 1
0
 private UGraphic drawOctagon(UGraphic ug) {
   final Shape shape = bibliotekon.getShape(getEntity());
   final Shadowable octagon = shape.getOctagon();
   if (getSkinParam().shadowing()) {
     octagon.setDeltaShadow(4);
   }
   ug = applyColors(ug);
   ug.apply(new UStroke(1.5)).draw(octagon);
   desc.drawU(ug.apply(new UTranslate(MARGIN, MARGIN)));
   return ug;
 }
Exemplo n.º 2
0
  private UGraphic drawNormal(UGraphic ug) {
    final StringBounder stringBounder = ug.getStringBounder();
    final Dimension2D dimTotal = calculateDimension(stringBounder);

    final double widthTotal = dimTotal.getWidth();
    final double heightTotal = dimTotal.getHeight();
    final Shadowable rect = new URectangle(widthTotal, heightTotal, CORNER, CORNER);
    if (getSkinParam().shadowing()) {
      rect.setDeltaShadow(4);
    }

    ug = applyColors(ug);
    ug.apply(new UStroke(1.5)).draw(rect);

    desc.drawU(ug.apply(new UTranslate(MARGIN, MARGIN)));
    return ug;
  }