Package com.lowagie.text.rtf

Examples of com.lowagie.text.rtf.RtfElement


            }
            result.write(RtfParagraph.PARAGRAPH);
        }
       
        for(int i = 0; i < this.rows.size(); i++) {
          RtfElement re = this.rows.get(i);
            //.result.write(re.write());
          re.writeContent(result);
        }
       
        result.write(RtfParagraph.PARAGRAPH_DEFAULTS);
    }       
View Full Code Here


            }
            result.write(RtfParagraph.PARAGRAPH);
        }
       
        for(int i = 0; i < this.rows.size(); i++) {
          RtfElement re = (RtfElement)this.rows.get(i);
            //.result.write(re.write());
          re.writeContent(result);
        }
       
        result.write(RtfParagraph.PARAGRAPH_DEFAULTS);
    }       
View Full Code Here

        result.write(intToByteArray(this.listID));
        result.write(CLOSE_GROUP);
        this.document.outputDebugLinebreak(result);
        if(items != null) {
        for(int i = 0; i < items.size(); i++) {
            RtfElement rtfElement = (RtfElement) items.get(i);
            if(rtfElement instanceof RtfList) {
              RtfList rl = (RtfList)rtfElement;
              rl.writeDefinition(result);
                break;
            } else if(rtfElement instanceof RtfListItem) {
View Full Code Here

       
        int itemNr = 0;
        if(items != null) {
        for(int i = 0; i < items.size(); i++) {
         
            RtfElement thisRtfElement = (RtfElement) items.get(i);
           //thisRtfElement.writeContent(result);
            if(thisRtfElement instanceof RtfListItem) {
                itemNr++;
              RtfListItem rtfElement = (RtfListItem)thisRtfElement;
              RtfListLevel listLevel =  rtfElement.getParent();
View Full Code Here

            }
            result.write(RtfParagraph.PARAGRAPH);
        }
       
        for(int i = 0; i < this.rows.size(); i++) {
          RtfElement re = (RtfElement)this.rows.get(i);
            //.result.write(re.write());
          re.writeContent(result);
        }
       
        result.write(RtfParagraph.PARAGRAPH_DEFAULTS);
    }       
View Full Code Here

        result.write(intToByteArray(this.listID));
        result.write(CLOSE_GROUP);
        this.document.outputDebugLinebreak(result);
        if(items != null) {
        for(int i = 0; i < items.size(); i++) {
            RtfElement rtfElement = (RtfElement) items.get(i);
            if(rtfElement instanceof RtfList) {
              RtfList rl = (RtfList)rtfElement;
              rl.writeDefinition(result);
                break;
            } else if(rtfElement instanceof RtfListItem) {
View Full Code Here

       
        int itemNr = 0;
        if(items != null) {
        for(int i = 0; i < items.size(); i++) {
         
            RtfElement thisRtfElement = (RtfElement) items.get(i);
           //thisRtfElement.writeContent(result);
            if(thisRtfElement instanceof RtfListItem) {
                itemNr++;
              RtfListItem rtfElement = (RtfListItem)thisRtfElement;
              RtfListLevel listLevel =  rtfElement.getParent();
View Full Code Here

        if(!inHeader) {
            result.write(RtfParagraph.PARAGRAPH);
        }
       
        for(int i = 0; i < this.rows.size(); i++) {
          RtfElement re = (RtfElement)this.rows.get(i);
            //.result.write(re.write());
          re.writeContent(result);
        }
       
        result.write(RtfParagraph.PARAGRAPH_DEFAULTS);
    }       
View Full Code Here

        result.write(LIST_LEVEL_SYMBOL_INDENT);
        result.write(intToByteArray(this.leftIndent));
        result.write(CLOSE_GROUP);
        result.write("\n".getBytes());
        for(int i = 0; i < items.size(); i++) {
            RtfElement rtfElement = (RtfElement) items.get(i);
            if(rtfElement instanceof RtfList) {
              RtfList rl = (RtfList)rtfElement;
                //.result.write(((RtfList) rtfElement).writeDefinition());
              rl.writeDefinition(result);
                break;
View Full Code Here

    public void writeContent(final OutputStream result) throws IOException
    {
        result.write(OPEN_GROUP);
        int itemNr = 0;
        for(int i = 0; i < items.size(); i++) {
            RtfElement rtfElement = (RtfElement) items.get(i);
            if(rtfElement instanceof RtfListItem) {
                itemNr++;
                result.write(writeListBeginning());
                result.write(writeListNumbers());
                result.write(OPEN_GROUP);
                result.write(LIST_TEXT);
                result.write(RtfParagraph.PARAGRAPH_DEFAULTS);
                if(this.inTable) {
                    result.write(RtfParagraph.IN_TABLE);
                }
                result.write(RtfFontList.FONT_NUMBER);
                if(this.listType != LIST_TYPE_BULLET) {
                    result.write(intToByteArray(fontNumber.getFontNumber()));
                } else {
                    result.write(intToByteArray(fontBullet.getFontNumber()));
                }
                //.result.write(writeIndentations()); TODO Remove on deprecation
                writeIndentation(result);
                result.write(DELIMITER);
                if(this.listType != LIST_TYPE_BULLET) {
                    switch(this.listType) {
                        case LIST_TYPE_NUMBERED      : result.write(intToByteArray(itemNr)); break;
                        case LIST_TYPE_UPPER_LETTERS : result.write(RomanAlphabetFactory.getUpperCaseString(itemNr).getBytes()); break;
                        case LIST_TYPE_LOWER_LETTERS : result.write(RomanAlphabetFactory.getLowerCaseString(itemNr).getBytes()); break;
                        case LIST_TYPE_UPPER_ROMAN   : result.write(RomanNumberFactory.getUpperCaseString(itemNr).getBytes()); break;
                        case LIST_TYPE_LOWER_ROMAN   : result.write(RomanNumberFactory.getLowerCaseString(itemNr).getBytes()); break;
                    }
                    result.write(LIST_NUMBER_END);
                } else {
                    this.document.filterSpecialChar(result, this.bulletCharacter, true, false);
                }
                result.write(TAB);
                result.write(CLOSE_GROUP);               
                //result.write(rtfElement.write()); TODO Remove on deprecation
                rtfElement.writeContent(result);
                if(i < (items.size() - 1) || !this.inTable || this.listLevel > 0) { // TODO Fix no paragraph on last list item in tables
                    result.write(RtfParagraph.PARAGRAPH);
                }
                result.write("\n".getBytes());
            } else if(rtfElement instanceof RtfList) {
                //result.write(rtfElement.write()); TODO Remove on deprecation
              rtfElement.writeContent(result);
                result.write("\n".getBytes());
            }
        }
        result.write(CLOSE_GROUP);
       
View Full Code Here

TOP

Related Classes of com.lowagie.text.rtf.RtfElement

Copyright © 2018 www.massapicom. 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.