Examples of RtfBasicElement


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);
                ((RtfList) rtfElement).setListLevel(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

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

Examples of com.lowagie.text.rtf.RtfBasicElement

                }
            }
            Iterator iterator = section.iterator();
            while(iterator.hasNext()) {
                Element element = (Element) iterator.next();
                RtfBasicElement rtfElement = doc.getMapper().mapElement(element);
                if(rtfElement != null) {
                    items.add(rtfElement);
                }
            }
           
View Full Code Here

Examples of com.lowagie.text.rtf.RtfBasicElement

        if(this.title != null) {
            //.result.write(this.title.write());
            this.title.writeContent(result);
        }
        for(int i = 0; i < items.size(); i++) {
          RtfBasicElement rbe = (RtfBasicElement) items.get(i);
            //.result.write((rbe).write());
            rbe.writeContent(result);
        }
    }       
View Full Code Here

Examples of com.lowagie.text.rtf.RtfBasicElement

        if(this.title != null) {
            this.title.setIndentLeft((int) (this.title.getIndentLeft() + indentLeft * RtfElement.TWIPS_FACTOR));
            this.title.setIndentRight((int) (this.title.getIndentRight() + indentRight * RtfElement.TWIPS_FACTOR));
        }
        for(int i = 0; i < this.items.size(); i++) {
            RtfBasicElement rtfElement = (RtfBasicElement) this.items.get(i);
            if(rtfElement instanceof RtfSection) {
                ((RtfSection) rtfElement).updateIndentation(indentLeft + indentContent, indentRight, 0);
            } else if(rtfElement instanceof RtfParagraph) {
                ((RtfParagraph) rtfElement).setIndentLeft((int) (((RtfParagraph) rtfElement).getIndentLeft() + (indentLeft + indentContent) * RtfElement.TWIPS_FACTOR));
                ((RtfParagraph) rtfElement).setIndentRight((int) (((RtfParagraph) rtfElement).getIndentRight() + indentRight * RtfElement.TWIPS_FACTOR));
 
View Full Code Here

Examples of com.lowagie.text.rtf.RtfBasicElement

                    element = new ListItem((Chunk) element);
                }
                if(element instanceof ListItem) {
                    this.alignment = ((ListItem) element).getAlignment();
                }
                RtfBasicElement rtfElement = doc.getMapper().mapElement(element);
                if(rtfElement instanceof RtfList) {
                    ((RtfList) rtfElement).setListNumber(listNumber);
                    ((RtfList) rtfElement).setListLevel(listLevel + 1);
                    ((RtfList) rtfElement).setParent(this);
                } else if(rtfElement instanceof RtfListItem) {
View Full Code Here

Examples of com.lowagie.text.rtf.RtfBasicElement

            result.write(this.paragraphStyle.writeBegin());
        }
        result.write("\\plain".getBytes());
       
        for(int i = 0; i < chunks.size(); i++) {
          RtfBasicElement rbe = (RtfBasicElement)chunks.get(i);
            //.result.write((rbe).write());
          rbe.writeContent(result);
        }
       
        if(this.paragraphStyle != null) {
            result.write(this.paragraphStyle.writeEnd());
        }
View Full Code Here

Examples of com.lowagie.text.rtf.RtfBasicElement

        if(this.lineLeading > 0) {
            result.write(LINE_SPACING);
            result.write(intToByteArray(this.lineLeading));
        }
        for(int i = 0; i < chunks.size(); i++) {
          RtfBasicElement rbe = (RtfBasicElement) chunks.get(i);
            //.result.write((rbe).write());
          rbe.writeContent(result);
        }
    }       
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.