Package com.google.gwt.dom.client

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


   }

   @Test
   public void createTBody() {
      // Act
      TableSectionElement elem = TableSectionElement.as(DOM.createTBody());

      // Assert
      assertEquals("tbody", elem.getTagName());
   }
View Full Code Here


   }

   @Test
   public void createTFoot() {
      // Act
      TableSectionElement elem = TableSectionElement.as(DOM.createTFoot());

      // Assert
      assertEquals("tfoot", elem.getTagName());
   }
View Full Code Here

   }

   @Test
   public void createTHead() {
      // Act
      TableSectionElement elem = TableSectionElement.as(DOM.createTHead());

      // Assert
      assertEquals("thead", elem.getTagName());
   }
View Full Code Here

      return caption;
   }

   @PatchMethod
   static TableSectionElement createTFoot(TableElement e) {
      TableSectionElement tfoot = JavaScriptObjects.getObject(e, TFOOT);
      if (tfoot == null) {
         tfoot = Document.get().createTFootElement();

         TableSectionElement thead = e.getTHead();
         if (thead != null) {
            e.insertAfter(tfoot, thead);
         } else {
            TableCaptionElement caption = e.getCaption();
            if (caption == null) {
View Full Code Here

      return tfoot;
   }

   @PatchMethod
   static TableSectionElement createTHead(TableElement e) {
      TableSectionElement thead = JavaScriptObjects.getObject(e, THEAD);
      if (thead == null) {
         thead = Document.get().createTHeadElement();
         TableCaptionElement caption = e.getCaption();
         if (caption == null) {
            e.insertFirst(thead);
View Full Code Here

      e.removeChild(rowToDelete);
   }

   @PatchMethod
   static void deleteTFoot(TableElement e) {
      TableSectionElement tfoot = JavaScriptObjects.getObject(e, TFOOT);
      if (tfoot != null) {
         JavaScriptObjects.remove(e, TFOOT);
         e.removeChild(tfoot);
      }
   }
View Full Code Here

      }
   }

   @PatchMethod
   static void deleteTHead(TableElement e) {
      TableSectionElement thead = JavaScriptObjects.getObject(e, THEAD);
      if (thead != null) {
         JavaScriptObjects.remove(e, THEAD);
         e.removeChild(thead);
      }
   }
View Full Code Here

   @PatchMethod
   static TableRowElement insertRow(TableElement e, int index) {
      NodeList<TableRowElement> rows = e.getRows();
      TableRowElement newRow = Document.get().createTRElement();
      if (rows.getLength() < 1) {
         TableSectionElement tbody = Document.get().createTBodyElement();
         e.appendChild(tbody);
         tbody.appendChild(newRow);
      } else {

         if (index == -1 || index >= rows.getLength()) {
            TableRowElement after = rows.getItem(rows.getLength() - 1);
            after.getParentElement().insertAfter(newRow, after);
View Full Code Here

      return newRow;
   }

   @PatchMethod
   static void setTFoot(TableElement e, TableSectionElement tFoot) {
      TableSectionElement old = JavaScriptObjects.getObject(e, TFOOT);

      if (old != null && tFoot != null) {
         e.replaceChild(tFoot, old);
      } else if (tFoot != null) {
         e.appendChild(tFoot);
View Full Code Here

   }

   @PatchMethod
   static void setTHead(TableElement e, TableSectionElement tHead) {
      TableSectionElement old = JavaScriptObjects.getObject(e, THEAD);

      if (old != null && tHead != null) {
         e.replaceChild(tHead, old);
      } else if (tHead != null) {
         e.appendChild(tHead);
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.