Package org.odftoolkit.odfdom.dom.element.table

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


    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

      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

          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

      TableTableRowElement tr = table.newTableTableRowElement();

      TableTableCellElement td1 = tr.newTableTableCellElement(0,"void");

      TextPElement p1 = td1.newTextPElement();
      p1.appendChild(contentDom.createTextNode("content 1"));

      p0.getParentNode().insertBefore(table, p0);

      table.setProperty(StyleTablePropertiesElement.Width, "12cm");
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.