Examples of RtfBasicElement


Examples of com.lowagie.text.rtf.RtfBasicElement

            }
        }
        result.write(DELIMITER);
        for(int i = 0; i < this.content.length; i++) {
            if(this.content[i] instanceof RtfBasicElement) {
              RtfBasicElement rbe = (RtfBasicElement)this.content[i];
              rbe.writeContent(result);
            }
        }
        result.write(CLOSE_GROUP);
    }       
View Full Code Here

Examples of com.lowagie.text.rtf.RtfBasicElement

        document.getDocumentHeader().writeSectionDefinition(result);
        if(this.title != null) {
            this.title.writeContent(result);
        }
        for(int i = 0; i < items.size(); i++) {
          RtfBasicElement rbe = (RtfBasicElement)items.get(i);
          rbe.writeContent(result);
        }
        result.write(DocWriter.getISOBytes("\\sect"));
    }       
View Full Code Here

Examples of com.lowagie.text.rtf.RtfBasicElement

        if(this.paragraphStyle.getLineLeading() > 0) {
          result.write(RtfParagraph.LINE_SPACING);
          result.write(intToByteArray(this.paragraphStyle.getLineLeading()));
        }
        for(int i = 0; i < chunks.size(); i++) {
            RtfBasicElement rtfElement = (RtfBasicElement) chunks.get(i);
            if(rtfElement instanceof RtfChunk) {
                ((RtfChunk) rtfElement).setSoftLineBreaks(true);
            } else if(rtfElement instanceof RtfList) {
                result.write(RtfParagraph.PARAGRAPH);
                this.containsInnerList = true;
            }
            rtfElement.writeContent(result);
            if(rtfElement instanceof RtfList) {
                switch(this.parentList.getLevelFollowValue()) {
                case RtfListLevel.LIST_LEVEL_FOLLOW_NOTHING:
                  break;
                case RtfListLevel.LIST_LEVEL_FOLLOW_TAB:
View Full Code Here

Examples of com.lowagie.text.rtf.RtfBasicElement

     * @throws IOException
     */
    public boolean writeDefinition(OutputStream out) throws IOException
    {
        for(int i = 0; i < chunks.size(); i++) {
            RtfBasicElement rtfElement = (RtfBasicElement)chunks.get(i);
            if(rtfElement instanceof RtfList) {
              RtfList rl = (RtfList)rtfElement;
              rl.writeDefinition(out);
                return true;
            }
View Full Code Here

Examples of com.lowagie.text.rtf.RtfBasicElement

     * @param listNumber The list number to inherit.
     * @param listLevel The list level to inherit.
     */
    public void inheritListSettings(int listNumber, int listLevel) {
        for(int i = 0; i < chunks.size(); i++) {
            RtfBasicElement rtfElement = (RtfBasicElement) chunks.get(i);
            if(rtfElement instanceof RtfList) {
                ((RtfList) rtfElement).setListNumber(listNumber);
                setLevel(listLevel);
//                ((RtfList) rtfElement).setParent(this.parentList);
            }
View Full Code Here

Examples of com.lowagie.text.rtf.RtfBasicElement

     * Correct the indentation of RtfLists in this RtfListItem by adding left/first line indentation
     * from the parent RtfList. Also calls correctIndentation on all child RtfLists.
     */
    protected void correctIndentation() {
        for(int i = 0; i < chunks.size(); i++) {
            RtfBasicElement rtfElement = (RtfBasicElement) chunks.get(i);
            if(rtfElement instanceof RtfList) {
                ((RtfList) rtfElement).correctIndentation();
            }
        }
    }
View Full Code Here

Examples of com.lowagie.text.rtf.RtfBasicElement

                        container.setAlignment(cell.getHorizontalAlignment());
                        container.add(element);
                    }
                } else {
                    if(container != null) {
                        RtfBasicElement rtfElement = this.document.getMapper().mapElement(container);
                        rtfElement.setInTable(true);
                        this.content.add(rtfElement);
                        container = null;
                    }
                    // if horizontal alignment is undefined overwrite
                    // with that of enclosing cell
                    if (element instanceof Paragraph && ((Paragraph) element).getAlignment() == Element.ALIGN_UNDEFINED) {
                        ((Paragraph) element).setAlignment(cell.getHorizontalAlignment());
                    }

                    RtfBasicElement rtfElement = this.document.getMapper().mapElement(element);
                    rtfElement.setInTable(true);
                    this.content.add(rtfElement);
                }
            } catch(DocumentException de) {
                de.printStackTrace();
            }
        }
        if(container != null) {
            try {
                RtfBasicElement rtfElement = this.document.getMapper().mapElement(container);
                rtfElement.setInTable(true);
                this.content.add(rtfElement);
            } catch(DocumentException de) {
                de.printStackTrace();
            }
        }
View Full Code Here

Examples of com.lowagie.text.rtf.RtfBasicElement

                result.write(RtfParagraphStyle.KEEP_TOGETHER_WITH_NEXT);
            }
            result.write(RtfParagraph.IN_TABLE);
        } else {
            for(int i = 0; i < this.content.size(); i++) {
                RtfBasicElement rtfElement = (RtfBasicElement) this.content.get(i);
                if(rtfElement instanceof RtfParagraph) {
                    ((RtfParagraph) rtfElement).setKeepTogetherWithNext(this.parentRow.getParentTable().getTableFitToPage());
                }
                //.result.write(rtfElement.write());
                rtfElement.writeContent(result);
                if(rtfElement instanceof RtfParagraph && i < (this.content.size() - 1)) {
                    result.write(RtfParagraph.PARAGRAPH);
                }
            }
        }
View Full Code Here

Examples of com.lowagie.text.rtf.RtfBasicElement

        if(this.paragraphStyle.getSpacingAfter() > 0) {
            result.write(RtfParagraphStyle.SPACING_AFTER);
            result.write(intToByteArray(this.paragraphStyle.getSpacingAfter()));
        }
        for(int i = 0; i < chunks.size(); i++) {
            RtfBasicElement rtfElement = (RtfBasicElement) chunks.get(i);
            if(rtfElement instanceof RtfChunk) {
                ((RtfChunk) rtfElement).setSoftLineBreaks(true);
            } else if(rtfElement instanceof RtfList) {
                result.write(RtfParagraph.PARAGRAPH);
                this.containsInnerList = true;
            }
            //.result.write(rtfElement.write());
            rtfElement.writeContent(result);
            if(rtfElement instanceof RtfList) {
                result.write(this.parentList.writeListBeginning());
                result.write("\\tab".getBytes());
            }
        }
View Full Code Here

Examples of com.lowagie.text.rtf.RtfBasicElement

     * @deprecated As of iText 2.0.6 or earlier, replaced by
     * {@link #writeDefinition(OutputStream)}, scheduled for removal at or after 2.1.0
     */
    public byte[] writeDefinition() {
        for(int i = 0; i < chunks.size(); i++) {
            RtfBasicElement rtfElement = (RtfBasicElement) chunks.get(i);
            if(rtfElement instanceof RtfList) {
                return ((RtfList) rtfElement).writeDefinition();
            }
        }
        return new byte[0];
View Full Code Here
TOP
Copyright © 2018 www.massapi.com. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.