Package com.lowagie.text

Examples of com.lowagie.text.Element.type()


                int columns = 0;
                Table table;
                Cell cell;
                while (true) {
                    Element element = (Element) stack.pop();
                    if (element.type() == Element.CELL) {
                        cell = (Cell) element;
                        columns += cell.getColspan();
                        cells.add(cell);
                    } else {
                        table = (Table) element;
View Full Code Here


                        // with that of enclosing cell
                        if (element instanceof Paragraph && ((Paragraph) element).getAlignment() == Element.ALIGN_UNDEFINED) {
                            ((Paragraph) element).setAlignment(store.getHorizontalAlignment());
                        }
                        writer.addElement(element, os);
                        if (element.type() == Element.PARAGRAPH && cellIterator.hasNext()) {
                            os.write(RtfWriter.escape);
                            os.write(RtfWriter.paragraph);
                        }
                    }
                }
View Full Code Here

        ListIterator listItems = list.getItems().listIterator();
        Element listElem;
        int count = 1;
        while (listItems.hasNext()) {
            listElem = (Element) listItems.next();
            if (listElem.type() == Element.CHUNK) {
                listElem = new ListItem((Chunk) listElem);
            }
            if (listElem.type() == Element.LISTITEM) {
                out.write(openGroup);
                out.write(escape);
View Full Code Here

        while (listItems.hasNext()) {
            listElem = (Element) listItems.next();
            if (listElem.type() == Element.CHUNK) {
                listElem = new ListItem((Chunk) listElem);
            }
            if (listElem.type() == Element.LISTITEM) {
                out.write(openGroup);
                out.write(escape);
                out.write(listTextOld);
                out.write(escape);
                out.write(paragraphDefaults);
View Full Code Here

                out.write(escape);
                out.write(tab);
                out.write(closeGroup);
                writeListElement((ListItem) listElem, out);
                count++;
            } else if (listElem.type() == Element.LIST) {
                listLevel++;
                writeList((com.lowagie.text.List) listElem, out);
                listLevel--;
                out.write(escape);
                out.write(paragraphDefaults);
View Full Code Here

            if(document.getAutogenerateTOCEntries()) {
                StringBuffer titleText = new StringBuffer();
                Iterator it = section.getTitle().iterator();
                while(it.hasNext()) {
                    Element element = (Element) it.next();
                    if(element.type() == Element.CHUNK) {
                        titleText.append(((Chunk) element).getContent());
                    }
                }
                if(titleText.toString().trim().length() > 0) {
                    RtfTOCEntry tocEntry = new RtfTOCEntry(titleText.toString());
View Full Code Here

        }
       
        for(int i = 0; i < list.getItems().size(); i++) {
            try {
                Element element = (Element) list.getItems().get(i);
                if(element.type() == Element.CHUNK) {
                    element = new ListItem((Chunk) element);
                }
                if(element instanceof ListItem) {
                    this.alignment = ((ListItem) element).getAlignment();
                }
View Full Code Here

        main_loop:
        while (true) {
            if (compositeElements.isEmpty())
                return NO_MORE_TEXT;
            Element element = (Element)compositeElements.getFirst();
            if (element.type() == Element.PARAGRAPH) {
                Paragraph para = (Paragraph)element;
                int status = 0;
                for (int keep = 0; keep < 2; ++keep) {
                    float lastY = yLine;
                    boolean createHere = false;
View Full Code Here

            // cellWidth is an absolute argument
            // it's based on the absolute of this row and the proportional
            // width of this column
            int cellWidth = (int) (width * propWidths[i] / 100);
            if (cell != null) {
                if (cell.type() == Element.CELL) {
                    RtfCell rtfCell = (RtfCell) cells.get(i);
                    cellLeft = rtfCell.importCell((Cell) cell, cellLeft, cellWidth, i, y, cellpadding);
                }
            } else {
                RtfCell rtfCell = (RtfCell) cells.get(i);
View Full Code Here

                }
                if ((status & NO_MORE_COLUMN) != 0) {
                    return NO_MORE_COLUMN;
                }
            }
            else if (element.type() == Element.LIST) {
                com.lowagie.text.List list = (com.lowagie.text.List)element;
                ArrayList items = list.getItems();
                ListItem item = null;
                float listIndentation = list.getIndentationLeft();
                int count = 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.