Package ag.ion.bion.officelayer.text

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


      textTable.getCell(0,0).setValue(12412);
      textTable.getCell(0,1).setValue(4444444);
     
      // to place text in a cell we need the text service of the individual cell.
      ITextService textService = textTable.getCell(0,2).getTextService();
      IText cellText = textService.getText();
      cellText.setText("Hello World!");
     
      // so now that we have seen it in detail, there is no problem in doing
      // it the short way.
      textTable.getCell(2,2).getTextService().getText().setText("A");
      textTable.getCell(3,2).getTextService().getText().setText("Simple");
View Full Code Here


      textDocument.getTextService().getTextContentService().insertTextContent(textTable);
      textTable.setHeaderRows(3);
      //set some text
      for(int i = 0, n = rows; i < n; i++) {
        for(int j = 0, m = cols; j < m; j++) {
          IText cellText = textTable.getCell(j,i).getTextService().getText();
          cellText.setText("Line "+(i+1)+" Col "+(j+1));
        }
      }
    }
    catch (Throwable exception) {
      exception.printStackTrace();
View Full Code Here

   * @author Sebastian R�sgen
   * @author Markus Kr�ger
   */
  private void analyseCell(ITextTableCell cell) throws CloneException {
    try {
      IText text = cell.getTextService().getText();
      ITextField fields[] = text.getTextContentEnumeration().getTextFields();
      String textCell = text.getText();       
      if(textCell != null) {
        //check for fields and replace their labels
        for(int i = 0; i < fields.length; i++) {
          String displayText = fields[i].getDisplayText();
          if(displayText != null) {
View Full Code Here

      if (adoptContent) { // there could be text content to be set
        if (cellFormula != null) { // otherwise there could be a formula
          tableCell.getFormulaService().setFormula(cellFormula);
        }
        else if (cellValue != null) {
          IText cellText = tableCell.getTextService().getText();
          String cellTextString = cellText.getText();
          //no overwrite allowed
          if(cellTextString == null || cellTextString.length() == 0)
            cellText.setText(cellValue);
        }
      }
     
      //copy cell properties
      String[] propertyKeysToCopy = null;     
View Full Code Here

   */
  public void setCellParagraphStyle(String cellParagraphStyle) throws TextException {
    if(cellParagraphStyle == null)
      return;
    try {   
      IText cellText = getTextService().getText();
      IParagraph[] paragraphs = cellText.getTextContentEnumeration().getParagraphs();
      int len = paragraphs.length;
      if(len > 1)
        len = len - 1;
      for(int i = 0; i < len; i++) {
        paragraphs[i].getParagraphProperties().setParaStyleName(cellParagraphStyle);
View Full Code Here

   *
   * @throws TextException if the property is not available
   */
  public String getCellParagraphStyle() throws TextException {
    try {   
      IText cellText = getTextService().getText();
      IParagraph[] paragraphs = cellText.getTextContentEnumeration().getParagraphs();
      if(paragraphs.length > 0)
        return paragraphs[0].getParagraphProperties().getParaStyleName();
      return null;
    }
    catch(Exception exception) {
View Full Code Here

  public void setCellParagraphStyle(String cellParagraphStyle)
      throws TextException {
    if (cellParagraphStyle == null)
      return;
    try {
      IText cellText = getTextService().getText();
      IParagraph[] paragraphs = cellText.getTextContentEnumeration()
          .getParagraphs();
      int len = paragraphs.length;
      if (len > 1)
        len = len - 1;
      for (int i = 0; i < len; i++) {
View Full Code Here

   * @throws TextException
   *             if the property is not available
   */
  public String getCellParagraphStyle() throws TextException {
    try {
      IText cellText = getTextService().getText();
      IParagraph[] paragraphs = cellText.getTextContentEnumeration()
          .getParagraphs();
      if (paragraphs.length > 0)
        return paragraphs[0].getParagraphProperties()
            .getParaStyleName();
      return null;
View Full Code Here

   * @author Sebastian R�sgen
   * @author Markus Kr�ger
   */
  private void analyseCell(ITextTableCell cell) throws CloneException {
    try {
      IText text = cell.getTextService().getText();
      ITextField fields[] = text.getTextContentEnumeration()
          .getTextFields();
      String textCell = text.getText();
      if (textCell != null) {
        // check for fields and replace their labels
        for (int i = 0; i < fields.length; i++) {
          String displayText = fields[i].getDisplayText();
          if (displayText != null) {
View Full Code Here

    try {
      if (adoptContent) { // there could be text content to be set
        if (cellFormula != null) { // otherwise there could be a formula
          tableCell.getFormulaService().setFormula(cellFormula);
        } else if (cellValue != null) {
          IText cellText = tableCell.getTextService().getText();
          String cellTextString = cellText.getText();
          // no overwrite allowed
          if (cellTextString == null || cellTextString.length() == 0)
            cellText.setText(cellValue);
        }
      }

      // copy cell properties
      String[] propertyKeysToCopy = null;
View Full Code Here

TOP

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

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.