public EntityImageUseCase(ILeaf entity, ISkinParam skinParam) {
    super(entity, skinParam);
    final Stereotype stereotype = entity.getStereotype();

    final TextBlock tmp =
        new BodyEnhanced(
            entity.getDisplay(),
            FontParam.USECASE,
            skinParam,
            HorizontalAlignment.CENTER,
            stereotype,
            true,
            false);

    if (stereotype == null || stereotype.getLabel() == null) {
      this.desc = tmp;
    } else {
      final TextBlock stereo =
          TextBlockUtils.create(
              Display.getWithNewlines(stereotype.getLabel()),
              new FontConfiguration(
                  SkinParamUtils.getFont(getSkinParam(), FontParam.ACTOR_STEREOTYPE, stereotype),
                  SkinParamUtils.getFontColor(getSkinParam(), FontParam.ACTOR_STEREOTYPE, null),
                  getSkinParam().getHyperlinkColor()),
              HorizontalAlignment.CENTER,
              skinParam);
      this.desc = TextBlockUtils.mergeTB(stereo, tmp, HorizontalAlignment.CENTER);
    }
    this.url = entity.getUrl99();
  }
Exemple #2
0
 public TextBlock getTimeHeader(double dayWith) {
   final TimeHeaderDay day = new TimeHeaderDay(getStart(), getEnd(), timeline, dayWith);
   final TimeHeaderMonth month = new TimeHeaderMonth(getStart(), getEnd(), timeline, dayWith);
   return TextBlockUtils.mergeTB(month, day, HorizontalAlignement.CENTER);
 }