Examples of addElement()


Examples of com.itextpdf.text.pdf.PdfPCell.addElement()

        Chunk par = new Chunk(this.reportSettingsProperties.loadTitle());
        par.setFont(new Font(this.fontMapper.awtToPdf(this.reportSettingsProperties.loadTitleFont())));
        Paragraph enc = new Paragraph(par);
        enc.setAlignment(Element.ALIGN_CENTER);
        PdfPCell cell = new PdfPCell();
        cell.addElement(enc);
        cell.setHorizontalAlignment(Element.ALIGN_CENTER);
        cell.setVerticalAlignment(Element.ALIGN_MIDDLE);
        table.addCell(cell);
        table.addCell(imageR);
        this.document.add(table);
View Full Code Here

Examples of com.itextpdf.text.pdf.PdfPHeaderCell.addElement()

    PdfPHeaderCell h1 = new PdfPHeaderCell();
    Phrase pHeader = new Phrase(text, Fonts.FONT_TITILE3);
    // TODO: 居中,没试出效果
    h1.setHorizontalAlignment(PdfPHeaderCell.ALIGN_CENTER);
    h1.setBackgroundColor(BaseColor.GRAY);
    h1.addElement(pHeader);
    return h1;
  }

  private PdfPCell buildCell(String text) {
    return buildCell(text, Fonts.FONT_MAIN_TEXT);
View Full Code Here

Examples of com.lowagie.text.SimpleTable.addElement()

            row.add(cell);
            cell = new SimpleCell(SimpleCell.CELL);
            cell.setWidth(50f);
            cell.add(new Paragraph("C"));
            row.add(cell);
            table.addElement(row);
            for (int i = 0; i < 100; i++) {
              row = new SimpleCell(SimpleCell.ROW);
              switch (i % 3) {
            case 0:
              row.setBackgroundColor(Color.red);
View Full Code Here

Examples of com.lowagie.text.pdf.ColumnText.addElement()

    ct.setYLine(pos[3]);
    try {
      ArrayList htmlObjs = HTMLWorker.parseToList(new StringReader(html),
          styles);
      for (int k = 0; k < htmlObjs.size(); ++k) {
        ct.addElement((Element) htmlObjs.get(k));
      }
      ct.go();
    } catch (Exception e) {
      throw new RuntimeException("Could not parse HTML", e);
    }
View Full Code Here

Examples of com.lowagie.text.pdf.LwgPdfPCell.addElement()

    if (Float.isNaN(p)) p = 0f;
    cell.setPaddingBottom(p + sp_bottom);
    LwgElement element;
    for (Iterator i = content.iterator(); i.hasNext(); ) {
      element = (LwgElement)i.next();
      cell.addElement(element);
    }
    return cell;
  }

  /**
 
View Full Code Here

Examples of com.lowagie.text.pdf.MultiColumnText.addElement()

            right = new float[] { document.right(), document.top(), document.right(), document.bottom() };
            mct.addColumn(left, right);

            // add text
            for (int i=0; i<8; i++) {
                mct.addElement(new Paragraph("GALLIA est omnis divisa in partes tres, quarum unam incolunt Belgae, aliam Aquitani, tertiam qui ipsorum lingua Celtae, nostra Galli appellantur.  Hi omnes lingua, institutis, legibus inter se differunt. Gallos ab Aquitanis Garumna flumen, a Belgis Matrona et Sequana dividit. Horum omnium fortissimi sunt Belgae, propterea quod a cultu atque humanitate provinciae longissime absunt, minimeque ad eos mercatores saepe commeant atque ea quae ad effeminandos animos pertinent important, proximique sunt Germanis, qui trans Rhenum incolunt, quibuscum continenter bellum gerunt.  Qua de causa Helvetii quoque reliquos Gallos virtute praecedunt, quod fere cotidianis proeliis cum Germanis contendunt, cum aut suis finibus eos prohibent aut ipsi in eorum finibus bellum gerunt.\n", FontFactory.getFont(FontFactory.HELVETICA, 12)));
                mct.addElement(new Paragraph("[Eorum una, pars, quam Gallos obtinere dictum est, initium capit a flumine Rhodano, continetur Garumna flumine, Oceano, finibus Belgarum, attingit etiam ab Sequanis et Helvetiis flumen Rhenum, vergit ad septentriones. Belgae ab extremis Galliae finibus oriuntur, pertinent ad inferiorem partem fluminis Rheni, spectant in septentrionem et orientem solem. Aquitania a Garumna flumine ad Pyrenaeos montes et eam partem Oceani quae est ad Hispaniam pertinet; spectat inter occasum solis et septentriones.]\n", FontFactory.getFont(FontFactory.HELVETICA, 12)));
                mct.addElement(new Paragraph("Apud Helvetios longe nobilissimus fuit et ditissimus Orgetorix.  Is M. Messala, [et P.] M.  Pisone consulibus regni cupiditate inductus coniurationem nobilitatis fecit et civitati persuasit ut de finibus suis cum omnibus copiis exirent:  perfacile esse, cum virtute omnibus praestarent, totius Galliae imperio potiri.  Id hoc facilius iis persuasit, quod undique loci natura Helvetii continentur:  una ex parte flumine Rheno latissimo atque altissimo, qui agrum Helvetium a Germanis dividit; altera ex parte monte Iura altissimo, qui est inter Sequanos et Helvetios; tertia lacu Lemanno et flumine Rhodano, qui provinciam nostram ab Helvetiis dividit.  His rebus fiebat ut et minus late vagarentur et minus facile finitimis bellum inferre possent; qua ex parte homines bellandi cupidi magno dolore adficiebantur.  Pro multitudine autem hominum et pro gloria belli atque fortitudinis angustos se fines habere arbitrabantur, qui in longitudinem milia passuum CCXL, in latitudinem CLXXX patebant.\n", FontFactory.getFont(FontFactory.HELVETICA, 12)));
                mct.addElement(new Paragraph("His rebus adducti et auctoritate Orgetorigis permoti constituerunt ea quae ad proficiscendum pertinerent comparare, iumentorum et carrorum quam maximum numerum coemere, sementes quam maximas facere, ut in itinere copia frumenti suppeteret, cum proximis civitatibus pacem et amicitiam confirmare.  Ad eas res conficiendas biennium sibi satis esse duxerunt; in tertium annum profectionem lege confirmant.  Ad eas res conficiendas Orgetorix deligitur.  Is sibi legationem ad civitates suscipit.  In eo itinere persuadet Castico, Catamantaloedis filio, Sequano, cuius pater regnum in Sequanis multos annos obtinuerat et a senatu populi Romani amicus appellatus erat, ut regnum in civitate sua occuparet, quod pater ante habuerit; itemque Dumnorigi Haeduo, fratri Diviciaci, qui eo tempore principatum in civitate obtinebat ac maxime plebi acceptus erat, ut idem conaretur persuadet eique filiam suam in matrimonium dat.  Perfacile factu esse illis probat conata perficere, propterea quod ipse suae civitatis imperium obtenturus esset:  non esse dubium quin totius Galliae plurimum Helvetii possent; se suis copiis suoque exercitu illis regna conciliaturum confirmat.  Hac oratione adducti inter se fidem et ius iurandum dant et regno occupato per tres potentissimos ac firmissimos populos totius Galliae sese potiri posse sperant.\n", FontFactory.getFont(FontFactory.HELVETICA, 12)));
                mct.addElement(new Paragraph("Ea res est Helvetiis per indicium enuntiata.  Moribus suis Orgetoricem ex vinculis causam dicere coegerunt; damnatum poenam sequi oportebat, ut igni cremaretur.  Die constituta causae dictionis Orgetorix ad iudicium omnem suam familiam, ad hominum milia decem, undique coegit, et omnes clientes obaeratosque suos, quorum magnum numerum habebat, eodem conduxit; per eos ne causam diceret se eripuit.  Cum civitas ob eam rem incitata armis ius suum exequi conaretur multitudinemque hominum ex agris magistratus cogerent, Orgetorix mortuus est; neque abest suspicio, ut Helvetii arbitrantur, quin ipse sibi mortem consciverit.", FontFactory.getFont(FontFactory.HELVETICA, 12)));
            }
View Full Code Here

Examples of com.lowagie.text.pdf.PdfPCell.addElement()

    if (Float.isNaN(p)) p = 0f;
    cell.setPaddingBottom(p + sp_bottom);
    Element element;
    for (Iterator i = content.iterator(); i.hasNext(); ) {
      element = (Element)i.next();
      cell.addElement(element);
    }
    return cell;
  }
 
  /**
 
View Full Code Here

Examples of com.nexirius.framework.datamodel.DataModelVector.addElement()

                DataModel model = (DataModel) cl.newInstance(); //create a new instance of the given type
                XFile file = new XFile(dir.getPath(), id);
                model.dropData(new String(file.getBytes()));
                model.setInstanceName(id);
                if (propertyValue == null || propertyValue.equals(model.getChildText(propertyName))) {
                    ret.addElement(model);
                }
            }
        } catch (Exception ex) {
            ex.printStackTrace();
        }
View Full Code Here

Examples of com.nexirius.util.SortedVector.addElement()

        while (e.hasMore()) {
            DataModel model = e.next();

            if (!model.getFlag(ModelFlag.INVISIBLE_TREE_NODE)) {
                v.addElement(model.getTreeHook());
            }
        }

        return v;
    }
View Full Code Here

Examples of com.redhat.ceylon.compiler.java.codegen.CollectionLiteralAnnotationTerm.addElement()

            return term;
        } else {
            CollectionLiteralAnnotationTerm result = new CollectionLiteralAnnotationTerm(ObjectLiteralAnnotationTerm.FACTORY);
            for (TypeMirror klass : getAnnotationClassValues(valueAnnotation, "value")) {
                ProducedType type = obtainType(moduleScope, klass, null, null, null);
                result.addElement(new ObjectLiteralAnnotationTerm(type));
            }
            return result;
        }
    }
    private LiteralAnnotationTerm readStringValuesAnnotation(
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.