Examples of Paragraph


Examples of com.lowagie.text.Paragraph

    }

    public static void createFirstPage(Document document,
                                       String currentDate,
                                       DrlPackageParser packageData) throws DocumentException {
        Paragraph title = new Paragraph( "\n\n\n\n\n" + packageData.getName().toUpperCase(),
                                         RULE_PACKAGE_TITLE );
        title.setAlignment( Element.ALIGN_CENTER );
        document.add( title );

        Paragraph date = new Paragraph( "Documentation created: " + currentDate,
                                        BODY_TEXT );
        date.setAlignment( Element.ALIGN_CENTER );
        document.add( date );

        document.add( new Paragraph( "\n\n\n\n\n" + packageData.getDescription(),
                                     BODY_TEXT ) );
        document.add( newTable( "Meta Data ",
                                packageData.getMetadata() ) );
        document.add( newTable( "Globals ",
                                packageData.getGlobals() ) );
View Full Code Here

Examples of com.nanolaba.surtur.core.Paragraph

                String[] lines = text.split("\n");

                int currentSymbol = 0;

                for (String line : lines) {
                    Paragraph paragraph = new Paragraph();
                    for (String word : line.split(" ")) {
                        if (isUserCancelled()) {
                            throw new IllegalStateException("Loading cancelled");
                        }
                        if (word != null) {
                            Word translate = getTranslator().translate(lang1, lang2, word);
                            paragraph.getWords().add(translate);
                            paragraph.getWords().add(Word.SPACE);
                        }
                    }
                    fireChangeCurrent(file, currentSymbol = currentSymbol + line.length() + 1, size, "");

                    document.getParagraphs().add(paragraph);
View Full Code Here

Examples of de.filiadata.lucene.spider.generated.msoffice2000.word.Paragraph

      // iterate through the paragraphs and extract the headlines
      StringBuffer headlines = null;
      if ((mHeadlineStyleNameSet != null) && (! mHeadlineStyleNameSet.isEmpty())) {
        Paragraphs paragraphs = doc.getParagraphs();
        for (int i = 1; i <= paragraphs.getCount(); i++) {
          Paragraph paragraph = paragraphs.item(i);
         
          // Get the name of the style for this paragraph
          // NOTE: See the Style class for getting other values from the style
          Object styleDispatch = paragraph.getFormat().getStyle().getDispatch();
          String formatName = Dispatch.get(styleDispatch, "NameLocal").toString();
         
          if (mHeadlineStyleNameSet.contains(formatName)) {
            // This paragraph is a headline -> add it to the headlines StringBuffer
           
            // Extract the text
            paragraph.getRange().select();
            String text = getSelection(mWordApplication);
            text = removeBinaryStuff(text);
           
            // Add it to the headlines
            if (headlines == null) {
View Full Code Here

Examples of kameleon.document.Paragraph

   * @throws  KameleonException
   *       if there was an error while generating the file
   */
  public void generate() throws KameleonException {
    //System.out.println("Generator.generate()");
    Paragraph previous = null ;
    Iterator<Paragraph> iter = this.document.iterator() ;
    boolean hasNext = true;
    /* The document is empty. */
    if (!iter.hasNext()) {
      return ;
    }// if
    /* The document has at least one Paragraph */
    Paragraph p = iter.next() ;
    while (hasNext) {
      try {
        Method methode = Generator.class.getDeclaredMethod(
            GENERATE_FUNC, p.getClass()) ;
        methode.invoke(this, p) ;
        previous = p ;
        hasNext = iter.hasNext();
        if (hasNext) {
          p = iter.next() ;
View Full Code Here

Examples of net.sf.jpluck.plucker.Paragraph

            src = URIUtil.fixURI(src);
            String url = ser.resolveLink(src);
            // As a precaution we remove any anchors. (These should not occur in image links in the first place.)
            url = URIUtil.removeAnchor(url);

            Paragraph p = ser.getCurrentParagraph();
            p.addEmbeddedImage(url, elem.getAttributes().getValue("alt"));
            if (ser.isIncludeImages()) {
                ser.addEmbeddedImageURL(url);
            }
        } catch (Exception e) {
            // Invalid URL or null
View Full Code Here

Examples of opennlp.tools.formats.ad.ADParagraphStream.Paragraph

    }
  }

  public ChunkSample read() throws IOException {

    Paragraph paragraph;
    while ((paragraph = this.adSentenceStream.read()) != null) {

      if (end > -1 && index >= end) {
        // leave
        return null;
      }

      if (start > -1 && index < start) {
        index++;
        // skip this one
      } else {
        Node root = paragraph.getRoot();
        List<String> sentence = new ArrayList<String>();
        List<String> tags = new ArrayList<String>();
        List<String> target = new ArrayList<String>();

        processRoot(root, sentence, tags, target);
View Full Code Here

Examples of org.apache.jackrabbit.ocm.testmodel.Paragraph

               page.setPath("/page");
               page.setTitle("Page Title");              
               ocm.insert(page);
               ocm.save();
              
               Paragraph p1 = new Paragraph("para1");
               p1.setPath("/page/paragraph");
               ocm.insert(p1);
              
               Paragraph p2 = new Paragraph("para1");
               p2.setPath("/page/paragraph");
               ocm.insert(p2);
             fail();              
              
             }
             catch(Exception e)
View Full Code Here

Examples of org.apache.pivot.wtk.TextArea.Paragraph

        textArea.getParagraphs().get(0).getParagraphListeners().add(paragraphListener);
        textArea.getTextAreaContentListeners().add(new TextAreaContentListener.Adapter() {
            @Override
            public void paragraphInserted(TextArea textAreaArgument, int index)
            {
                Paragraph paragraph = textAreaArgument.getParagraphs().get(index);
                System.out.println("Paragraph inserted\n\tparagraph content: '" + paragraph.getCharacters() + "'\n\tindex: " + index);

                paragraph.getParagraphListeners().add(paragraphListener);
            }
        });

        Window window = new Window(textArea);
        window.open(display);
View Full Code Here

Examples of org.apache.pivot.wtk.text.Paragraph

            delete(false);
        }

        if (document.getCharacterCount() == 0) {
            // the document is currently empty
            Paragraph paragraph = new Paragraph();
            paragraph.add(text);
            document.insert(paragraph, 0);
        } else {
            Node descendant = document.getDescendantAt(selectionStart);
            int offset = selectionStart - descendant.getDocumentOffset();

            if (descendant instanceof TextNode) {
                // The caret is positioned within an existing text node
                TextNode textNode = (TextNode)descendant;
                textNode.insertText(text, offset);
            } else if (descendant instanceof Paragraph) {
                // The caret is positioned on the paragraph terminator
                // so get to the bottom rightmost descendant and add there
                Paragraph paragraph = (Paragraph)descendant;

                Node node = getRightmostDescendant(paragraph);
                if (node instanceof TextNode) {
                    // Insert the text into the existing node
                    TextNode textNode = (TextNode)node;
                    textNode.insertText(text, selectionStart - textNode.getDocumentOffset());
                } else if (node instanceof Element) {
                    // Append a new text node
                    Element element = (Element)node;
                    element.add(new TextNode(text));
                } else {
                    // The paragraph is currently empty
                    paragraph.add(new TextNode(text));
                }
            } else {
                // The caret is positioned on a non-text character node; insert
                // the text into the descendant's parent
                Element parent = descendant.getParent();
View Full Code Here

Examples of org.apache.pivot.wtk.text.Paragraph

        while (!(descendant instanceof Paragraph)) {
            descendant = descendant.getParent();
        }

        // Split the paragraph at the insertion point
        Paragraph leadingSegment = (Paragraph)descendant;
        int offset = selectionStart - leadingSegment.getDocumentOffset();
        int characterCount = leadingSegment.getCharacterCount() - offset;

        Paragraph trailingSegment = (Paragraph)leadingSegment.removeRange(offset, characterCount);

        Element parent = leadingSegment.getParent();
        int index = parent.indexOf(leadingSegment);
        parent.insert(trailingSegment, index + 1);
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.