Examples of newTextPElement()


Examples of org.odftoolkit.odfdom.dom.element.office.OfficeTextElement.newTextPElement()

   * @see Paragraph#newParagraph(ParagraphContainer)
   * @see #addParagraph(String)
   */
  public OdfTextParagraph newParagraph() throws Exception {
    OfficeTextElement odfText = getContentRoot();
    return (OdfTextParagraph) odfText.newTextPElement();
  }

  /**
   * Append text to the end of a text document. If there is no paragraph at
   * the end of a document, a new one will be created.
View Full Code Here

Examples of org.odftoolkit.odfdom.dom.element.office.OfficeTextElement.newTextPElement()

      style.newStyleParagraphPropertiesElement().setFoBreakBeforeAttribute(breakAttribute);
      if(refParagraph == null){
        pEle = getContentRoot().newTextPElement();
      } else {
        OfficeTextElement contentRoot = getContentRoot();
        pEle = contentRoot.newTextPElement();
        OdfElement refEle = refParagraph.getOdfElement();
        contentRoot.insertBefore(pEle, refEle.getNextSibling());
      }
      pEle.setStyleName(style.getStyleNameAttribute());
    } catch (Exception e) {
View Full Code Here

Examples of org.odftoolkit.odfdom.dom.element.office.OfficeTextElement.newTextPElement()

      if (refParagraph == null) {
        pEle = getContentRoot().newTextPElement();
      } else {
        OfficeTextElement contentRoot = getContentRoot();
        pEle = contentRoot.newTextPElement();
        OdfElement refEle = refParagraph.getOdfElement();
        contentRoot.insertBefore(pEle, refEle.getNextSibling());
      }
      pEle.setStyleName(style.getStyleNameAttribute());
    } catch (Exception e) {
View Full Code Here

Examples of org.odftoolkit.odfdom.dom.element.table.TableHelpMessageElement.newTextPElement()

        validationElement.removeChild(helpMessageElement);
      }
      helpMessageElement = validationElement.newTableHelpMessageElement();
      helpMessageElement.setTableTitleAttribute(title);
      helpMessageElement.setTableDisplayAttribute(true);
      helpMessageElement.newTextPElement().setTextContent(text);
    } catch (Exception e) {
      Logger.getLogger(Cell.class.getName()).log(Level.SEVERE, null, e);
    }
  }
 
View Full Code Here

Examples of org.odftoolkit.odfdom.dom.element.table.TableHelpMessageElement.newTextPElement()

        validationElement.removeChild(helpMessageElement);
      }
      helpMessageElement = validationElement.newTableHelpMessageElement();
      helpMessageElement.setTableTitleAttribute(title);
      helpMessageElement.setTableDisplayAttribute(true);
      helpMessageElement.newTextPElement().setTextContent(text);
    } catch (Exception e) {
      Logger.getLogger(Cell.class.getName()).log(Level.SEVERE, null, e);
    }
  }
 
View Full Code Here

Examples of org.odftoolkit.odfdom.dom.element.table.TableHelpMessageElement.newTextPElement()

        validationElement.removeChild(helpMessageElement);
      }
      helpMessageElement = validationElement.newTableHelpMessageElement();
      helpMessageElement.setTableTitleAttribute(title);
      helpMessageElement.setTableDisplayAttribute(true);
      helpMessageElement.newTextPElement().setTextContent(text);
    } catch (Exception e) {
      Logger.getLogger(Cell.class.getName()).log(Level.SEVERE, null, e);
    }
  }
 
View Full Code Here

Examples of org.odftoolkit.odfdom.dom.element.table.TableTableCellElement.newTextPElement()

    Object[] valueCellRange = getValueCellRange();
    for (int i = 0; i < numColumns; i++) {
      TableTableCellElement cell = headerRow.newTableTableCellElement(0.0, "string");
      cell.setOfficeValueTypeAttribute(OfficeValueTypeAttribute.Value.STRING.toString());
      String[] cellContents = dataset.getLocalTableFirstRow();
      OdfTextParagraph paragraph = (OdfTextParagraph) cell.newTextPElement();

      if (isFirstRowAsLabel && !isRowAsSeries) {
        if ((String) labelCellRange[i] != null) {
          paragraph.setTextIdAttribute((String) labelCellRange[i]);
        }
View Full Code Here

Examples of org.odftoolkit.odfdom.dom.element.table.TableTableCellElement.newTextPElement()

    Double[][] cellValues = dataset.getLocalTableData();
    for (int i = 0; i < numRows; i++) {
      TableTableRowElement row = rows.newTableTableRowElement();
      TableTableCellElement nameCell = row.newTableTableCellElement(0.0, "string");
      nameCell.setOfficeValueTypeAttribute(OfficeValueTypeAttribute.Value.STRING.toString());
      OdfTextParagraph paragraph = (OdfTextParagraph) nameCell.newTextPElement();
      String[] cellContents = dataset.getLocalTableFirstColumn();
      if (cellContents[i] != null) {
        if (isFirstColumnAsLabel) {
          if (isRowAsSeries) {
            paragraph.setTextIdAttribute((String) labelCellRange[i]);
View Full Code Here

Examples of org.odftoolkit.odfdom.dom.element.table.TableTableCellElement.newTextPElement()

      for (int j = 0; j < numColumns; j++) {
        TableTableCellElement cell = row.newTableTableCellElement(0.0, "string");
        cell.setOfficeValueTypeAttribute(OfficeValueTypeAttribute.Value.FLOAT.toString());
        if (cellValues[i][j] != null) {
          cell.setOfficeValueAttribute(cellValues[i][j]);
          OdfTextParagraph paragraph1 = (OdfTextParagraph) cell.newTextPElement();
          paragraph1.setTextContent(cellValues[i][j].toString());
          if (isRowAsSeries && j == 0) {
            paragraph1.setTextIdAttribute((String) valueCellRange[i]);
          }
          if (!isRowAsSeries && i == 0) {
View Full Code Here

Examples of org.odftoolkit.odfdom.dom.element.table.TableTableCellElement.newTextPElement()

          if (!isRowAsSeries && i == 0) {
            paragraph1.setTextIdAttribute((String) valueCellRange[j]);
          }
        } else {
          cell.setOfficeValueAttribute(new Double(Double.NaN));
          OdfTextParagraph paragraph1 = (OdfTextParagraph) cell.newTextPElement();
          paragraph1.setTextContent("1.#NAN");
          if (isRowAsSeries && j == 0) {
            paragraph1.setTextIdAttribute((String) valueCellRange[i]);
          }
          if (!isRowAsSeries && i == 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.