Ejemplo n.º 1
0
 private TextBlock createStereotype(
     FontConfiguration fontConfiguration,
     HorizontalAlignment horizontalAlignment,
     SpriteContainer spriteContainer,
     int position,
     UFont fontForStereotype,
     HtmlColor htmlColorForStereotype) {
   final Stereotype stereotype = (Stereotype) get(position);
   if (stereotype.isSpotted()) {
     final CircledCharacter circledCharacter =
         new CircledCharacter(
             stereotype.getCharacter(),
             stereotype.getRadius(),
             stereotype.getCircledFont(),
             stereotype.getHtmlColor(),
             null,
             fontConfiguration.getColor());
     if (stereotype.getLabel(false) == null) {
       return new TextBlockSpotted(
           circledCharacter,
           this.subList(1, this.size()),
           fontConfiguration,
           horizontalAlignment,
           spriteContainer);
     }
     return new TextBlockSpotted(
         circledCharacter, this, fontConfiguration, horizontalAlignment, spriteContainer);
   }
   return new TextBlockSimple(
       this,
       fontConfiguration,
       horizontalAlignment,
       spriteContainer,
       0,
       fontForStereotype,
       htmlColorForStereotype);
 }