Examples of RtfBasicElement


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 = this.content.get(i);
                if(rtfElement instanceof RtfParagraph) {
                    ((RtfParagraph) rtfElement).setKeepTogetherWithNext(this.parentRow.getParentTable().getTableFitToPage());
                }
                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

    public RtfBasicElement[] mapElement(Element element) throws DocumentException
    {
      ArrayList<RtfBasicElement> rtfElements = new ArrayList<RtfBasicElement>();
      if (element instanceof RtfBasicElement)
      {
        RtfBasicElement rtfElement = (RtfBasicElement) element;
        rtfElement.setRtfDocument(rtfDoc);
        return new RtfBasicElement[]{rtfElement};
      }
      switch (element.type())
      {
        case Element.CHUNK:
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());
                }
                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

        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

        result.write(RtfParagraph.PARAGRAPH);
        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);
        }
    }       
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

        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

            this.paragraphStyle.writeBegin(result);
        }
        result.write(DocWriter.getISOBytes("\\plain"));
       
        for(int i = 0; i < chunks.size(); i++) {
          RtfBasicElement rbe = (RtfBasicElement)chunks.get(i);
          rbe.writeContent(result);
        }
       
        if(this.paragraphStyle != null) {
            this.paragraphStyle.writeEnd(result);
        }
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
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.