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); } }
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(); } } }