/** * Returns the content as a String object. * This method differs from toString because toString will return an ArrayList with the toString value of the Chunks in this Phrase. * @return the content */ public String getContent() { StringBuffer buf = new StringBuffer(); for (Chunk c: getChunks()) { buf.append(c.toString()); } return buf.toString(); }
/** * Returns the content as a String object. * This method differs from toString because toString will return an ArrayList with the toString value of the Chunks in this Phrase. * @return the content */ public String getContent() { StringBuffer buf = new StringBuffer(); for (Chunk c: getChunks()) { buf.append(c.toString()); } return buf.toString(); }
/** * Adds a <CODE>Phrase</CODE> to the current text array. * @param phrase the text */ public void addText(Phrase phrase) { for (Chunk c: phrase.getChunks()) { chunks.add(new PdfChunk(c, null)); } }
/** * Adds a <CODE>Phrase</CODE> to the current text array. * @param phrase the text */ public void addText(Phrase phrase) { for (Chunk c: phrase.getChunks()) { chunks.add(new PdfChunk(c, null)); } }
private void addWaitingPhrase() { if (bidiLine == null && waitPhrase != null) { bidiLine = new BidiLine(); for (Chunk c : waitPhrase.getChunks()) { bidiLine.addChunk(new PdfChunk(c, null, waitPhrase.getTabSettings())); } waitPhrase = null; } }
private void addWaitingPhrase() { if (bidiLine == null && waitPhrase != null) { bidiLine = new BidiLine(); for (Chunk c : waitPhrase.getChunks()) { bidiLine.addChunk(new PdfChunk(c, null, waitPhrase.getTabSettings())); } waitPhrase = null; } }
/** * Adds a <CODE>Phrase</CODE> to the current text array. Will not have any * effect if addElement() was called before. * * @param phrase the text */ public void addText(final Phrase phrase) { if (phrase == null || composite) { return; } addWaitingPhrase(); if (bidiLine == null) { waitPhrase = phrase; return; } for (Object element : phrase.getChunks()) { bidiLine.addChunk(new PdfChunk((Chunk) element, null, phrase.getTabSettings())); } }
/** * Adds a <CODE>Phrase</CODE> to the current text array. Will not have any * effect if addElement() was called before. * * @param phrase the text */ public void addText(final Phrase phrase) { if (phrase == null || composite) { return; } addWaitingPhrase(); if (bidiLine == null) { waitPhrase = phrase; return; } for (Object element : phrase.getChunks()) { bidiLine.addChunk(new PdfChunk((Chunk) element, null, phrase.getTabSettings())); } }