Package com.google.gdt.eclipse.designer.model.widgets

Examples of com.google.gdt.eclipse.designer.model.widgets.CompositeInfo.refresh()


    assertHierarchy(
        "{this: com.google.gwt.user.client.ui.Composite} {this} {/initWidget(panel)/}",
        "  {new: com.google.gwt.user.client.ui.HTMLPanel} {local-unique: panel} {/new HTMLPanel('<div id=\\'one\\'></div>')/ /initWidget(panel)/ /panel.add(button, 'one')/}",
        "    {new: com.google.gwt.user.client.ui.Button} {local-unique: button} {/new Button()/ /panel.add(button, 'one')/}");
    // refresh
    composite.refresh();
    assertNoErrors(composite);
  }

  public void test_flowContainers() throws Exception {
    ComplexPanelInfo panel =
View Full Code Here


            "  protected Widget createMyWidget() {",
            "    Button button = new Button();",
            "    return button;",
            "  }",
            "}");
    composite.refresh();
    assertHierarchy(
        "{this: test.client.MyComposite} {this} {}",
        "  {new: com.google.gwt.user.client.ui.Button} {local-unique: button} {/new Button()/ /button/}");
  }
View Full Code Here

    // check hierarchy
    assertHierarchy(
        "{this: com.google.gwt.user.client.ui.Composite} {this} {/initWidget(image)/}",
        "  {opaque} {local-unique: image} {/images.first().createImage()/ /initWidget(image)/}");
    // refresh
    composite.refresh();
    assertNoErrors(composite);
  }

  ////////////////////////////////////////////////////////////////////////////
  //
View Full Code Here

    assertHierarchy(
        "{this: com.google.gwt.user.client.ui.ResizeComposite} {this} {/initWidget(panel)/}",
        "  {new: com.google.gwt.user.client.ui.LayoutPanel} {local-unique: panel} {/new LayoutPanel()/ /initWidget(panel)/}");
    WidgetInfo panel = composite.getWidget();
    // do refresh()
    composite.refresh();
    assertNoErrors(composite);
    assertFalse(composite.isEmpty());
    // check Composite bounds
    {
      Rectangle bounds = composite.getBounds();
View Full Code Here

            "  public Test() {",
            "  }",
            "}");
    assertHierarchy("{this: com.google.gwt.user.client.ui.ResizeComposite} {this} {}");
    // do refresh()
    composite.refresh();
    assertTrue(composite.isEmpty());
    assertNull(composite.getWidget());
    // no properties
    assertThat(composite.getProperties()).isEmpty();
  }
View Full Code Here

    assertHierarchy(
        "{this: com.google.gwt.user.client.ui.Composite} {this} {/initWidget(button)/}",
        "  {new: com.google.gwt.user.client.ui.Button} {local-unique: button} {/new Button()/ /initWidget(button)/}");
    WidgetInfo button = composite.getWidget();
    // do refresh()
    composite.refresh();
    assertFalse(composite.isEmpty());
    // check Composite bounds
    {
      Rectangle bounds = composite.getBounds();
      assertEquals(new Rectangle(0, 0, 450, 300), bounds);
View Full Code Here

      assertEquals(new Rectangle(0, 0, 450, 300), bounds);
    }
    // set new bounds
    {
      composite.getTopBoundsSupport().setSize(500, 250);
      composite.refresh();
      assertEquals(new Rectangle(0, 0, 500, 250), composite.getBounds());
    }
  }

  public void test_withVerticalPanel() throws Exception {
View Full Code Here

            "public class Test extends Composite {",
            "  public Test() {",
            "    initWidget(new VerticalPanel());",
            "  }",
            "}");
    composite.refresh();
    assertNoErrors(composite);
    assertHierarchy(
        "{this: com.google.gwt.user.client.ui.Composite} {this} {/initWidget(new VerticalPanel())/}",
        "  {new: com.google.gwt.user.client.ui.VerticalPanel} {empty} {/initWidget(new VerticalPanel())/}");
  }
View Full Code Here

            "  public Test() {",
            "  }",
            "}");
    assertHierarchy("{this: test.client.MyComposite} {this} {}");
    // do refresh()
    composite.refresh();
    assertFalse(composite.isEmpty());
    assertNull(composite.getWidget());
  }

  public void test_empty() throws Exception {
View Full Code Here

            "  public Test() {",
            "  }",
            "}");
    assertHierarchy("{this: com.google.gwt.user.client.ui.Composite} {this} {}");
    // do refresh()
    composite.refresh();
    assertTrue(composite.isEmpty());
    assertNull(composite.getWidget());
    // no properties
    assertThat(composite.getProperties()).isEmpty();
  }
View Full Code Here

TOP
Copyright © 2018 www.massapi.com. 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.