Exemplo n.º 1
0
 public void setFocus(Widget panel) {
   if (panel.getClass().equals(databaseOptionsPanel.getClass())) {
     deploymentOptionsPanel.setFocus();
   } else if (panel.getClass().equals(appBrowserPanel.getClass())) {
     projectOptionsPanel.setFocus();
   } else if (panel.getClass().equals(projectOptionsPanel.getClass())) {
     databaseOptionsPanel.setFocus();
   }
 }
 /** Checks the assertion for the properties of a {@link PropertyGrid} with specified widget ID. */
 public void assertPropertiesOf(final String widgetID) {
   final Widget widget = GWTTestUtil.getWidgetWithID(widgetID);
   assertTrue(
       "Expected WidgetComponent instead of " + widget.getClass(),
       widget instanceof WidgetComponent);
   final Widget wrappedWidget = ((WidgetComponent) widget).getWidget();
   assertTrue(
       "Expected PropertyGrid instead of " + wrappedWidget.getClass(),
       wrappedWidget instanceof PropertyGrid);
   assertProperties(((PropertyGrid) wrappedWidget).getProperties());
 }
Exemplo n.º 3
0
 public void testWest() {
   Widget west = root.getWidget(1);
   assertEquals(com.google.gwt.user.client.ui.DockPanel.WEST, root.getWidgetDirection(west));
   assertEquals(HTML.class, west.getClass());
   String html = ((HTML) west).getHTML();
   assertTrue(html.contains("side bar"));
 }
 protected void checkWidgetVisible(Widget widget, String objectLocalization) {
   Assert.assertTrue(
       csvRunner.getAssertionErrorMessagePrefix()
           + "Widget have to be visible : "
           + objectLocalization
           + ", "
           + widget.getClass().getCanonicalName(),
       WidgetUtils.isWidgetVisible(widget));
 }
Exemplo n.º 5
0
 @Override
 public void onTransitionEnd() {
   for (int i = 0; i < _panel.getWidgetCount(); i++) {
     Widget w = _panel.getWidget(i);
     if (Utils.isSubclassOf(w.getClass(), WidgetBase.class)) {
       ((WidgetBase) w).onTransitionEnd();
     }
   }
 }
Exemplo n.º 6
0
  public void testCenter() {
    // TODO(rjrjr) More of a test of HTMLPanelParser

    Widget center = getCenter();
    assertEquals(com.google.gwt.user.client.ui.DockPanel.CENTER, root.getWidgetDirection(center));
    assertEquals(HTMLPanel.class, center.getClass());
    String html = center.getElement().getInnerHTML();
    assertTrue(html.contains("main area"));
    assertTrue(html.contains("Button with"));
    assertTrue(html.contains("Of course"));

    assertEquals(center, widgetUi.myButton.getParent());
  }
Exemplo n.º 7
0
 public void testNorth() {
   Widget north = root.getWidget(0);
   assertEquals(com.google.gwt.user.client.ui.DockPanel.NORTH, root.getWidgetDirection(north));
   assertEquals(HTML.class, north.getClass());
   assertTrue(((HTML) north).getHTML().contains("Title area"));
 }