Package com.google.gwt.dom.client

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


      // Arrange
      e.createTHead();
      e.createTFoot();

      // Act
      TableCaptionElement caption = e.createCaption();

      // Assert
      assertEquals(caption, e.getCaption());
      assertEquals("caption", caption.getTagName());
      assertEquals(3, e.getChildCount());
      // caption should be inserted at first rank
      assertEquals(caption, e.getChild(0));

      // Act 2
View Full Code Here


   }

   @Test
   public void createCaption() {
      // Act
      TableCaptionElement elem = TableCaptionElement.as(DOM.createCaption());

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

   private static final String TFOOT = "tFoot";
   private static final String THEAD = "tHead";

   @PatchMethod
   static TableCaptionElement createCaption(TableElement e) {
      TableCaptionElement caption = JavaScriptObjects.getObject(e, TCAPTION);
      if (caption == null) {
         caption = Document.get().createCaptionElement();
         JavaScriptObjects.setProperty(e, TCAPTION, caption);
         e.insertFirst(caption);
      }
View Full Code Here

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

   @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);
         } else {
            e.insertAfter(thead, caption);
         }
View Full Code Here

      return thead;
   }

   @PatchMethod
   static void deleteCaption(TableElement e) {
      TableCaptionElement caption = JavaScriptObjects.getObject(e, TCAPTION);
      if (caption != null) {
         JavaScriptObjects.remove(e, TCAPTION);
         e.removeChild(caption);
      }
   }
View Full Code Here

TOP

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

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.