Package com.google.gwt.user.client.ui

Examples of com.google.gwt.user.client.ui.ComplexPanel


   }

   @Test
   public void count() {
      // Arrange
      ComplexPanel panel = new FlowPanel();
      panel.add(new Button());
      panel.add(new Button());

      // Act & Assert
      assertEquals(2, panel.getWidgetCount());
   }
View Full Code Here


   }

   @Test
   public void remove() {
      // Arrange
      ComplexPanel panel = new FlowPanel();
      Button b = new Button();
      panel.add(b);
      // Pre-Assert
      assertEquals(1, panel.getWidgetCount());
      assertEquals(panel, b.getParent());

      // Act
      panel.remove(b);

      // Assert
      assertEquals(0, panel.getWidgetCount());
      assertNull(b.getParent());
   }
View Full Code Here

   }

   @Test
   public void remove_ByIndex() {
      // Arrange
      ComplexPanel panel = new FlowPanel();
      Button b0 = new Button();
      panel.add(b0);
      Button b1 = new Button();
      panel.add(b1);

      // Act
      panel.remove(1);

      // Assert
      assertEquals(1, panel.getWidgetCount());
      assertEquals(b0, panel.getWidget(0));
      assertEquals(panel, b0.getParent());
      assertNull(b1.getParent());
   }
View Full Code Here

   }

   @Test
   public void title() {
      // Arrange
      ComplexPanel panel = new FlowPanel();

      // Act
      panel.setTitle("title");

      // Assert
      assertEquals("title", panel.getTitle());
   }
View Full Code Here

   }

   @Test
   public void visible() {
      // Arrange
      ComplexPanel panel = new FlowPanel();
      // Pre-Assert
      assertEquals(true, panel.isVisible());

      // Act
      panel.setVisible(false);

      // Assert
      assertEquals(false, panel.isVisible());
   }
View Full Code Here

   }

   @Test
   public void objectWithNodeFinder() {
      // Arrange
      ComplexPanel panel = new FlowPanel();
      RootPanel.get().add(panel);

      // registers a NodeObjectFinder for "root" prefix
      GwtFinder.registerNodeFinder("root", new NodeObjectFinder() {
View Full Code Here

      if (c.getItemCount() > 0) {
        focusWidget(forward ? c.getItem(0) : c.getItem(c.getItemCount() - 1));
      }
    } else if (w instanceof ComplexPanel) {
      if (pe != null) pe.stopEvent();
      ComplexPanel panel = (ComplexPanel) w;
      if (panel.getWidgetCount() > 0) {
        focusWidget(panel.getWidget(0));
      }
    }
  }
View Full Code Here

      if (c.getItemCount() > 0) {
        focusWidget(forward ? c.getItem(0) : c.getItem(c.getItemCount() - 1));
      }
    } else if (w instanceof ComplexPanel) {
      if (pe != null) pe.stopEvent();
      ComplexPanel panel = (ComplexPanel) w;
      if (panel.getWidgetCount() > 0) {
        focusWidget(panel.getWidget(0));
      }
    }
  }
View Full Code Here

      if (c.getItemCount() > 0) {
        focusWidget(forward ? c.getItem(0) : c.getItem(c.getItemCount() - 1));
      }
    } else if (w instanceof ComplexPanel) {
      if (pe != null) pe.stopEvent();
      ComplexPanel panel = (ComplexPanel) w;
      if (panel.getWidgetCount() > 0) {
        focusWidget(panel.getWidget(0));
      }
    }
  }
View Full Code Here

    }

    @Override
    public void setText(String text) {
      if (getCellIndex() == 0 && !treeTable.isFlattened()) {
        ComplexPanel treeNode = renderTreeNode(getRowIndex());
        if (text != null && text.length() > 0) {
          treeNode.add(new Label(text));
        }
        treeNode.setStyleName("treeNodeWrapper");
        treeTable.getDataTable().setWidget(getRowIndex(), getCellIndex(),
            treeNode);
      } else {
        super.setText(text);
      }
View Full Code Here

TOP

Related Classes of com.google.gwt.user.client.ui.ComplexPanel

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.