Beispiel #1
0
 protected void addOptionalPageLines(OptionalContents optionalContent, GlyphText sprite) {
   if (optionalPageLines == null) {
     optionalPageLines = new LinkedHashMap<OptionalContents, PageText>(10);
   }
   PageText pageText = optionalPageLines.get(optionalContent);
   if (pageText == null) {
     // create a text object add the glyph.
     pageText = new PageText();
     pageText.addGlyph(sprite);
     optionalPageLines.put(optionalContent, pageText);
   } else {
     pageText.addGlyph(sprite);
   }
 }
Beispiel #2
0
 public void newLine(LinkedList<OptionalContents> oCGs) {
   if (oCGs != null && oCGs.size() > 0) {
     if (optionalPageLines == null) {
       optionalPageLines = new LinkedHashMap<OptionalContents, PageText>(10);
     }
     OptionalContents optionalContent = oCGs.peek();
     PageText pageText = optionalPageLines.get(optionalContent);
     if (pageText == null) {
       // create a text object add the glyph.
       pageText = new PageText();
       pageText.newLine();
       optionalPageLines.put(optionalContent, pageText);
     } else {
       pageText.newLine();
     }
   }
 }