Example #1
0
 public DisplayPositionned getTitle() {
   if (source == null) {
     return new DisplayPositionned(
         Display.empty(), HorizontalAlignment.CENTER, VerticalAlignment.TOP);
   }
   return new DisplayPositionned(
       source.getTitle(), HorizontalAlignment.CENTER, VerticalAlignment.TOP);
 }
 private Display getLabelOfMessage(MessageExo message) {
   if (message.getMessageNumber() == null) {
     return message.getLabel();
   }
   Display result = Display.empty();
   result = result.add(new MessageNumber(message.getMessageNumber()));
   result = result.addAll(message.getLabel());
   return result;
 }
Example #3
0
 private static Display breakLines(
     Display texts,
     FontConfiguration fontConfiguration,
     SpriteContainer spriteContainer,
     double maxWidth) {
   if (texts.size() != 1) {
     return texts;
   }
   final CharSequence s = texts.get(0);
   Display result = Display.empty();
   final int nb = s.length() / 2;
   result = result.add(s.subSequence(0, nb));
   result = result.add(s.subSequence(nb + 1, s.length()));
   return result;
 }
Example #4
0
 public Display getTitle() {
   if (source == null) {
     return Display.empty();
   }
   return source.getTitle();
 }