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

Examples of org.odftoolkit.odfdom.dom.element.table.TableTableHeaderRowsElement


        Node child = null;
        if (nextRowElement == null) {
          child = ownerTable.getOdfElement().getFirstChild();
          while (child != null) {
            if (child instanceof TableTableHeaderRowsElement) {
              TableTableHeaderRowsElement headers = (TableTableHeaderRowsElement) child;
              Node header = headers.getFirstChild();
              while (header != null) {
                if (header instanceof TableTableRowElement) {
                  tempRowElement = (TableTableRowElement) header;
                  break;
                }
View Full Code Here


  TableTableRowElement getRowElementByIndex(int rowIndex) {
    int result = 0;
    TableTableRowElement rowEle = null;
    for (Node n : new DomNodeList(mTableElement.getChildNodes())) {
      if (n instanceof TableTableHeaderRowsElement) {
        TableTableHeaderRowsElement headers = (TableTableHeaderRowsElement) n;
        for (Node m : new DomNodeList(headers.getChildNodes())) {
          if (m instanceof TableTableRowElement) {
            rowEle = (TableTableRowElement) m;
            result += rowEle.getTableNumberRowsRepeatedAttribute();
          }
          if (result > rowIndex) {
View Full Code Here

      setRightBottomBorderStylesProperties(rightbottomStyle);
    }

    // 3.1 create header row elements
    if (headerRowNumber > 0) {
      TableTableHeaderRowsElement headerrows = (TableTableHeaderRowsElement) OdfXMLFactory.newOdfElement(dom,
          OdfName.newName(OdfDocumentNamespace.TABLE, "table-header-rows"));
      for (int i = 0; i < headerRowNumber; i++) {
        TableTableRowElement aRow = (TableTableRowElement) OdfXMLFactory.newOdfElement(dom, OdfName.newName(
            OdfDocumentNamespace.TABLE, "table-row"));
        for (int j = 0; j < numCols; j++) {
          TableTableCellElement aCell = (TableTableCellElement) OdfXMLFactory.newOdfElement(dom, OdfName
              .newName(OdfDocumentNamespace.TABLE, "table-cell"));
          if (isTextDocument) {
            if ((j + 1 == numCols) && (i == 0)) {
              aCell.setStyleName(righttopStyle.getStyleNameAttribute());
            } else if (i == 0) {
              aCell.setStyleName(lefttopStyle.getStyleNameAttribute());
            } else if ((j + 1 == numCols) && (i > 0)) {
              aCell.setStyleName(rightbottomStyle.getStyleNameAttribute());
            } else {
              aCell.setStyleName(leftbottomStyle.getStyleNameAttribute());
            }
          }
          aRow.appendChild(aCell);
        }
        headerrows.appendChild(aRow);
      }
      newTEle.appendChild(headerrows);
    }

    // 3.2 create common row elements
View Full Code Here

  public List<Row> getRowList() {
    ArrayList<Row> list = new ArrayList<Row>();
    TableTableRowElement rowEle = null;
    for (Node n : new DomNodeList(mTableElement.getChildNodes())) {
      if (n instanceof TableTableHeaderRowsElement) {
        TableTableHeaderRowsElement headers = (TableTableHeaderRowsElement) n;
        for (Node m : new DomNodeList(headers.getChildNodes())) {
          if (m instanceof TableTableRowElement) {
            rowEle = (TableTableRowElement) m;
            for (int i = 0; i < rowEle.getTableNumberRowsRepeatedAttribute(); i++) {
              list.add(getRowInstance(rowEle, i));
            }
View Full Code Here

   *
   * @return the number of header rows.
   */
  public int getHeaderRowCount() {

    TableTableHeaderRowsElement headers = OdfElement.findFirstChildNode(TableTableHeaderRowsElement.class,
        mTableElement);
    return getHeaderRowCount(headers);
  }
View Full Code Here

      return null;
    }

    for (Node m : new DomNodeList(group.getChildNodes())) {
      if (m instanceof TableTableHeaderRowsElement) {
        TableTableHeaderRowsElement headers = (TableTableHeaderRowsElement) m;
        TableTableRowElement returnEle = findRowInTableHeaderRows(headers, tr, resultIndexs);
        result += resultIndexs[0];
        if (returnEle != null) {//find
          indexs[0] = result;
          return returnEle;
View Full Code Here

      return null;
    }

    for (Node m : new DomNodeList(group.getChildNodes())) {
      if (m instanceof TableTableHeaderRowsElement) {
        TableTableHeaderRowsElement headers = (TableTableHeaderRowsElement) m;
        TableTableRowElement returnEle = findRowInTableHeaderRows(headers, tr, resultIndexs);
        result += resultIndexs[0];
        if (returnEle != null) {// find
          indexs[0] = result;
          return returnEle;
View Full Code Here

    int result = 0;
    TableTableElement mTableElement = getTableElement();
    TableTableRowElement rowEle = null;
    for (Node n : new DomNodeList(mTableElement.getChildNodes())) {
      if (n instanceof TableTableHeaderRowsElement) {
        TableTableHeaderRowsElement headers = (TableTableHeaderRowsElement) n;
        for (Node m : new DomNodeList(headers.getChildNodes())) {
          if (m instanceof TableTableRowElement) {
            rowEle = (TableTableRowElement) m;
            if (rowEle == getOdfElement()) {
              return result + mnRepeatedIndex;
            }
View Full Code Here

      return null;
    }

    for (Node m : new DomNodeList(group.getChildNodes())) {
      if (m instanceof TableTableHeaderRowsElement) {
        TableTableHeaderRowsElement headers = (TableTableHeaderRowsElement) m;
        TableTableRowElement returnEle = findRowInTableHeaderRows(headers, tr, resultIndexs);
        result += resultIndexs[0];
        if (returnEle != null) {// find
          indexs[0] = result;
          return returnEle;
View Full Code Here

        Node child = null;
        if (nextRowElement == null) {
          child = ownerTable.getOdfElement().getFirstChild();
          while (child != null) {
            if (child instanceof TableTableHeaderRowsElement) {
              TableTableHeaderRowsElement headers = (TableTableHeaderRowsElement) child;
              Node header = headers.getFirstChild();
              while (header != null) {
                if (header instanceof TableTableRowElement) {
                  tempRowElement = (TableTableRowElement) header;
                  break;
                }
View Full Code Here

TOP

Related Classes of org.odftoolkit.odfdom.dom.element.table.TableTableHeaderRowsElement

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.