Package ag.ion.bion.officelayer.text

Examples of ag.ion.bion.officelayer.text.ITextCursor


  }

  @Override
  public ICharacterProperties getCharacterProperties(int begin, int length) {
    try {
      ITextCursor cursor = textAdaptee.getTextCursorService()
          .getTextCursor();
      cursor.gotoStart(false);
      cursor.goRight((short) begin, false);
      cursor.goRight((short) length, true);
      return cursor.getCharacterProperties();
    } catch (TextException e) {
      // TODO Auto-generated catch block
      e.printStackTrace();
    }
    return null;
View Full Code Here


    if (!document.getDocumentType().equals(IDocument.WRITER))
      return false;

    IViewCursor viewCursor = ((ITextDocument) document)
        .getViewCursorService().getViewCursor();
    ITextCursor textCursor = viewCursor.getTextCursorFromEnd();
    try {
      if (tag.length() > 0) {
        textCursor.setString(tag);
        document.setModified(true);
      }
    } catch (DocumentException e) {
      // TODO Auto-generated catch block
      e.printStackTrace();
View Full Code Here

       * Ok, now we gonna place the text in the document, each of the staves (stanzas)
       * of the poem will be a separate paragprah. This will serve us well since our
       * intention is to format every paragprah in a different way.
       */
      for(int i=0;i<allTexts2BePlaced.length;i++) {
        ITextCursor textCursor =
          textDocument.getTextService().getText().getTextCursorService().getTextCursor();
       
        textCursor.gotoEnd(false);     
        IParagraph paragraph =
          textDocument.getTextService().getTextContentService().constructNewParagraph();     
        textCursor.gotoEnd(false);
        textDocument.getTextService().getTextContentService().insertTextContent(textCursor.getEnd(),paragraph);
        StringBuffer bufferedString = new StringBuffer();
        for(int j=0;j<allTexts2BePlaced[i].length;j++ ) {
          bufferedString.append(allTexts2BePlaced[i][j] +"\n");
        }
       
View Full Code Here

      }

      ITextContentService textContentService = textDocument.getTextService()
          .getTextContentService();

      ITextCursor textCursor = textDocument.getTextService().getText()
          .getTextCursorService().getTextCursor();

      ITextDocumentImage textDocumentImage = textContentService
          .constructNewImage(graphicInfo);
      textContentService.insertTextContent(textCursor.getEnd(),
          textDocumentImage);

      officeAplication.deactivate();
    }
    catch(OfficeApplicationException exception) {
View Full Code Here

      "Till the dirges of his hope that melancholy burden bore",
      "Of \"Never-nevermore.\"'"
    };
   
    try {
      ITextCursor textCursor =
        textDocument.getTextService().getText().getTextCursorService().getTextCursor();
     
      textCursor.gotoEnd(false);
     
      for(int i=0;i<text2BePlaced.length;i++ ) {
        textCursor.getEnd().setText(text2BePlaced[i]); //we place the text
        textCursor.getEnd().setText("\n"); // and we wrap the line
      }
    }
    catch(TextException exception) {
      exception.printStackTrace();
    }
View Full Code Here

    textDocument = getCurrentTextDocument();

    IViewCursor viewCursor = textDocument.getViewCursorService()
        .getViewCursor();
    ITextCursor textCursor = viewCursor.getTextCursorFromEnd();
    textCursor.goLeft((short) DUMMY_INSERT_STRING.length(), true);
    textCursor.setString(""); //$NON-NLS-1$
  }
View Full Code Here

      "Till the dirges of his hope that melancholy burden bore",
      "Of \"Never-nevermore.\"'"
    };
   
    try {
      ITextCursor textCursor =
        textDocument.getTextService().getText().getTextCursorService().getTextCursor();
     
      textCursor.gotoEnd(false);
     
      for(int i=0;i<text2BePlaced.length;i++ ) {
        textCursor.getEnd().setText(text2BePlaced[i]); //we place the text
        textCursor.getEnd().setText("\n"); // and we wrap the line
      }
     
      // Now some new stuff. We will set the align of the poem -- which should be centered
      // as it fits for a good poem -- afterwards we will     
      IParagraph[] paragraphs =
View Full Code Here

   *
   * @author Markus Kr�ger
   */
  public ICharacterProperties getCharacterProperties() {
    if(characterProperties == null) {
      ITextCursor cursor = getTextService().getCursorService().getTextCursor();
      cursor.gotoStart(false);
      cursor.gotoEnd(true);
      characterProperties = cursor.getCharacterProperties();
    }
    return characterProperties;
  }
View Full Code Here

   *
   * @author Markus Kr�ger
   */
  public ICharacterPropertyStore getCharacterPropertyStore() throws TextException {
    if(characterPropertyStore == null) {     
      ITextCursor cursor = getTextService().getCursorService().getTextCursor();
      cursor.gotoStart(false);
      characterPropertyStore = new CharacterPropertyStore(cursor);
    }
    return characterPropertyStore;
  }
View Full Code Here

   *
   * @author Markus Kr�ger
   */
  public ICharacterProperties getCharacterProperties() {
    if (characterProperties == null) {
      ITextCursor cursor = getTextService().getCursorService()
          .getTextCursor();
      cursor.gotoStart(false);
      cursor.gotoEnd(true);
      characterProperties = cursor.getCharacterProperties();
    }
    return characterProperties;
  }
View Full Code Here

TOP

Related Classes of ag.ion.bion.officelayer.text.ITextCursor

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.