Package com.google.gwt.dom.client

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


    // Check the rendered element.
    TableElement table = tableBuilder.finish().cast();
    assertEquals(5, table.getRows().getLength());
    for (int r = 0; r < 5; r++) {
      TableRowElement tr = table.getRows().getItem(r);
      assertEquals(3, tr.getCells().getLength());
      for (int c = 0; c < 3; c++) {
        TableCellElement td = tr.getCells().getItem(c);
        assertEquals(r + ":" + c, td.getInnerText());
      }
    }
  }
View Full Code Here


   *
   * @param rowIndex the index of the row from which the cell will be deleted
   * @param cellIndex the index of the cell to be deleted
   */
  public void deleteCell(int rowIndex, int cellIndex) {
    TableRowElement tr = tbody.getRows().getItem(rowIndex);
    tr.deleteCell(cellIndex);
  }
View Full Code Here

   * @param row the cell's row index
   * @param col the cell's column index
   * @return the cell element
   */
  public TableCellElement getTableCellElement(int row, int col) {
    TableRowElement tr = getTableRowElement(row);
    return tr.getCells().getItem(col);
  }
View Full Code Here

   *          inserted (<code>-1</code> will append the new cell to the end)
   * @return the table cell element that was inserted at the specified row
   *          and column indices
   */
  public TableCellElement insertCell(int rowIndex, int colIndex) {
    TableRowElement tr = tbody.getRows().getItem(rowIndex);
    return tr.insertCell(colIndex);
  }
View Full Code Here

    this.delayTestFinish(TEST_FINISH_DELAY);
  }

  private void checkHasClassName(SourceViewer viewer, int lineNumber,
      String className, boolean shouldHaveClassName) {
    TableRowElement lineRow = viewer.getTableRowElement(lineNumber);
    boolean found = (lineRow.getClassName().indexOf(className) >= 0);

    assertTrue("Highlight failed for line: " + lineNumber,
        (found == shouldHaveClassName));
  }
View Full Code Here

      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));
        }
      }
    }

    templateOnAllColumnWidthsUpdated(ws, tw);
View Full Code Here

        // element.
        Element trElem = tableCell.getParentElement();
        if (trElem == null) {
            return -1;
        }
        TableRowElement tr = TableRowElement.as(trElem);
        Element sectionElem = tr.getParentElement();
        if (sectionElem == null) {
            return -1;
        }

        int row = tr.getSectionRowIndex();
        return row;

    }
View Full Code Here

         */
        public void setColWidth(int colIndex, int w) {
            NodeList<TableRowElement> rows2 = tBodyElement.getRows();
            final int rows = rows2.getLength();
            for (int i = 0; i < rows; i++) {
                TableRowElement row = rows2.getItem(i);
                TableCellElement cell = row.getCells().getItem(colIndex);
                cell.getFirstChildElement().getStyle()
                        .setPropertyPx("width", w);
                cell.getStyle().setPropertyPx("width", w);
            }
        }
View Full Code Here

                tBodyElement.appendChild(scrollTableRow.getElement());
                detectExtrawidth();
                tBodyElement.removeChild(scrollTableRow.getElement());
            } else {
                boolean noCells = false;
                TableRowElement item = rows.getItem(0);
                TableCellElement firstTD = item.getCells().getItem(0);
                if (firstTD == null) {
                    // content is currently empty, we need to add a fake cell
                    // for measuring
                    noCells = true;
                    VScrollTableRow next = (VScrollTableRow) iterator().next();
                    next.addCell("", ALIGN_LEFT, "", true);
                    firstTD = item.getCells().getItem(0);
                }
                com.google.gwt.dom.client.Element wrapper = firstTD
                        .getFirstChildElement();
                cellExtraWidth = firstTD.getOffsetWidth()
                        - wrapper.getOffsetWidth();
View Full Code Here

      addStore(s);
    }
  }

  private void addStore(Store store) {
    TableRowElement row = table.insertRow(-1);
    row.insertCell(-1).setInnerText(store.getName());
  }
View Full Code Here

TOP

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

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.