Package com.google.gwt.dom.client

Examples of com.google.gwt.dom.client.TableSectionElement


  }

  @Override
  protected TableCellElement getHeaderElement(DataGrid<String> table, int column) {
    TableElement tableElem = table.tableHeader.getElement().cast();
    TableSectionElement thead = tableElem.getTHead();
    TableRowElement tr = thead.getRows().getItem(0);
    return tr.getCells().getItem(column);
  }
View Full Code Here


      // get the section of the row and confirm it is a tbody (as opposed
      // to a thead or tfoot)
      Element sectionElem = tr.getParentElement();
      if (sectionElem == null)
        return;
      TableSectionElement section = TableSectionElement.as(sectionElem);
      if (section != getTableBodyElement())
         return;
     
      // determine the row/item target
      int row = tr.getSectionRowIndex();
View Full Code Here

    table.setVisibleRange(0, 10);
    populateData(table);
    table.getPresenter().flush();

    // Verify the structure.
    TableSectionElement tbody = table.getTableBodyElement();
    assertEquals(14, tbody.getChildCount());
    assertEquals("child 0", getBodyElement(table, 6, 0).getInnerText());
    assertEquals("child 1", getBodyElement(table, 7, 0).getInnerText());
    assertEquals("child 2", getBodyElement(table, 8, 0).getInnerText());
    assertEquals("child 3", getBodyElement(table, 9, 0).getInnerText());
View Full Code Here

    table.setVisibleRange(0, 10);
    populateData(table);
    table.getPresenter().flush();

    // Verify the structure.
    TableSectionElement tbody = table.getTableBodyElement();
    assertEquals(9, tbody.getChildCount());

    // Verify the row values are accessible.
    assertEquals("test 5", table.getVisibleItem(5));
    assertEquals("test 9", table.getVisibleItem(9));
View Full Code Here

    table.setVisibleRange(0, 5);
    populateData(table);
    table.getPresenter().flush();

    // Verify the structure.
    TableSectionElement tbody = table.getTableBodyElement();
    assertEquals(25, tbody.getChildCount());

    // Test sub rows within range.
    assertEquals(0, table.getSubRowElement(0, 0).getSectionRowIndex());
    assertEquals(1, table.getSubRowElement(0, 1).getSectionRowIndex());
    assertEquals(4, table.getSubRowElement(0, 4).getSectionRowIndex());
View Full Code Here

    }

    // Convert the row html to child elements.
    tmpElem.setInnerHTML("<table><tbody>" + rowHtml + "</tbody></table>");
    TableElement tableElem = tmpElem.getFirstChildElement().cast();
    TableSectionElement newRows = tableElem.getTBodies().getItem(0);

    // Add new child elements.
    child = newRows.getFirstChildElement();
    while (child != null) {
      Element next = child.getNextSiblingElement();
      tbody.appendChild(child);
      child = next;
    }
View Full Code Here

    for (int i = 0, len = ns.getLength(); i < len; i++) {
      Element row = ns.getItem(i);
      row.getStyle().setPropertyPx("width", tw);
      if (row.getFirstChild() != null) {
        row.getFirstChildElement().getStyle().setPropertyPx("width", tw);
        TableSectionElement e = row.getFirstChild().cast();
        TableRowElement nodeList = e.getRows().getItem(0);
        for (int j = 0; j < clen; j++) {
          ((Element) nodeList.getChildNodes().getItem(j)).getStyle().setPropertyPx("width", ws.get(j));
        }
      }
    }
View Full Code Here

    NodeList<Element> ns = getRows();
    for (int i = 0, len = ns.getLength(); i < len; i++) {
      Element elem = ns.getItem(i);
      elem.getStyle().setProperty("width", tw + "px");
      TableSectionElement e = (TableSectionElement) elem.getFirstChild();
      if (e != null) {
        e.getStyle().setProperty("width", tw + "px");
        Element cell = e.getRows().getItem(0).getChildNodes().getItem(index).cast();
        cell.getStyle().setProperty("display", display);
      }
    }

    templateOnColumnHiddenUpdated(index, hidden, tw);
View Full Code Here

    for (int i = 0, len = ns.getLength(); i < len; i++) {
      Element row = ns.getItem(i);
      row.getStyle().setPropertyPx("width", tw);
      if (row.getFirstChild() != null) {
        row.getFirstChildElement().getStyle().setPropertyPx("width", tw);
        TableSectionElement e = row.getFirstChild().cast();
        ((Element) e.getRows().getItem(0).getChildNodes().getItem(col)).getStyle().setPropertyPx("width", w);
      }
    }

    templateOnColumnWidthUpdated(col, w, tw);
    syncHScroll();
View Full Code Here

    for (int i = 0, len = gs.getLength(); i < len; i++) {
      Element s = gs.getItem(i).getChildNodes().getItem(2).cast();
      El.fly(s).setWidth(tw);
      if (s.getFirstChild() == null) return;
      El.fly(s.getFirstChildElement()).setWidth(tw);
      TableSectionElement tse = s.getFirstChildElement().cast();
      NodeList<Element> cells = tse.getRows().getItem(0).getChildNodes().cast();
      for (int j = 0, wlen = ws.size(); j < wlen; j++) {
        El.fly(cells.getItem(j)).setWidth(ws.get(j));
      }
    }
  }
View Full Code Here

TOP

Related Classes of com.google.gwt.dom.client.TableSectionElement

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.