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

Examples of com.google.gdt.eclipse.designer.uibinder.model.widgets.WidgetInfo


            "// filler filler filler filler filler",
            "<ui:UiBinder>",
            "  <g:FlowPanel/>",
            "</ui:UiBinder>");
    refresh();
    WidgetInfo newButton = createObject("test.client.MyButton");
    // do CREATE
    try {
      flowContainer_CREATE(panel, newButton, null);
      fail();
    } catch (DesignerException e) {
View Full Code Here


        "  <g:FlowPanel>",
        "    <g:Button wbp:name='button' ui:field='button'/>",
        "  </g:FlowPanel>",
        "</ui:UiBinder>");
    refresh();
    WidgetInfo button = getObjectByName("button");
    // do delete
    button.delete();
    assertXML(
        "// filler filler filler filler filler",
        "// filler filler filler filler filler",
        "<ui:UiBinder>",
        "  <g:FlowPanel/>",
View Full Code Here

            "<ui:UiBinder>",
            "  <g:FlowPanel/>",
            "</ui:UiBinder>");
    refresh();
    // add new Button
    WidgetInfo newButton = createButton();
    flowContainer_CREATE(panel, newButton, null);
    // open listener
    {
      final Property property = PropertyUtils.getByPath(newButton, "Events/onClick");
      ExecutionUtils.run(newButton, new RunnableEx() {
        public void run() throws Exception {
          ReflectionUtils.invokeMethod(property, "openListener()");
        }
      });
      waitEventLoop(0);
    }
    assertJava(
        "public class Test extends Composite {",
        "  interface Binder extends UiBinder<Widget, Test> {}",
        "  private static final Binder binder = GWT.create(Binder.class);",
        "  @UiField Button button;",
        "  public Test() {",
        "    initWidget(binder.createAndBindUi(this));",
        "  }",
        "  @UiHandler('button')",
        "  void onButtonClick(ClickEvent event) {",
        "  }",
        "}");
    // do delete
    newButton.delete();
    assertXML(
        "// filler filler filler filler filler",
        "// filler filler filler filler filler",
        "<ui:UiBinder>",
        "  <g:FlowPanel/>",
View Full Code Here

            "    <g:Button/>",
            "    <g:Button ui:field='myButton'/>",
            "  </g:FlowPanel>",
            "</ui:UiBinder>");
    refresh();
    WidgetInfo button_1 = panel.getChildrenWidgets().get(0);
    WidgetInfo button_2 = panel.getChildrenWidgets().get(1);
    // check names
    assertEquals(null, NameSupport.getName(button_1));
    assertEquals("myButton", NameSupport.getName(button_2));
    // use getObject()
    assertSame(null, NameSupport.getObject(panel, "noSuchName"));
View Full Code Here

            "<ui:UiBinder xmlns:c='urn:import:com.google.gwt.user.cellview.client'>",
            "  <g:FlowPanel/>",
            "</ui:UiBinder>");
    refresh();
    //
    WidgetInfo newPager = createObject("com.google.gwt.user.cellview.client.PageSizePager");
    flowContainer_CREATE(panel, newPager, null);
    assertXML(
        "// filler filler filler filler filler",
        "// filler filler filler filler filler",
        "<ui:UiBinder xmlns:c='urn:import:com.google.gwt.user.cellview.client'>",
View Full Code Here

        "      <c:CellBrowser wbp:name='cellBrowser' ui:field='cellBrowser'/>",
        "    </g:at>",
        "  </g:AbsolutePanel>",
        "</ui:UiBinder>");
    refresh();
    WidgetInfo cellBrowser = getObjectByName("cellBrowser");
    // we have actual object
    Object cellBrowserObject = cellBrowser.getObject();
    assertEquals(
        "com.google.gwt.user.cellview.client.CellBrowser",
        cellBrowserObject.getClass().getName());
    // no check for size, because CellBrowser does not resize intself to show content
  }
View Full Code Here

            "<ui:UiBinder xmlns:c='urn:import:com.google.gwt.user.cellview.client'>",
            "  <g:FlowPanel/>",
            "</ui:UiBinder>");
    refresh();
    //
    WidgetInfo newBrowser = createObject("com.google.gwt.user.cellview.client.CellBrowser");
    flowContainer_CREATE(panel, newBrowser, null);
    assertXML(
        "// filler filler filler filler filler",
        "// filler filler filler filler filler",
        "<ui:UiBinder xmlns:c='urn:import:com.google.gwt.user.cellview.client'>",
View Full Code Here

            "<ui:UiBinder>",
            "  <g:FlowPanel/>",
            "</ui:UiBinder>");
    refresh();
    //
    WidgetInfo newButton = createObject("com.google.gwt.widget.client.TextButton");
    flowContainer_CREATE(panel, newButton, null);
    assertXML(
        "// filler filler filler filler filler",
        "// filler filler filler filler filler",
        "<ui:UiBinder xmlns:w='urn:import:com.google.gwt.widget.client'>",
        "  <g:FlowPanel>",
        "    <w:TextButton>New button</w:TextButton>",
        "  </g:FlowPanel>",
        "</ui:UiBinder>");
    // has properties
    assertNotNull(newButton.getPropertyByTitle("decoration"));
    assertNotNull(newButton.getPropertyByTitle("text"));
  }
View Full Code Here

            "<ui:UiBinder xmlns:c='urn:import:com.google.gwt.user.cellview.client'>",
            "  <g:FlowPanel/>",
            "</ui:UiBinder>");
    refresh();
    //
    WidgetInfo newPager = createObject("com.google.gwt.user.cellview.client.SimplePager");
    flowContainer_CREATE(panel, newPager, null);
    assertXML(
        "// filler filler filler filler filler",
        "// filler filler filler filler filler",
        "<ui:UiBinder xmlns:c='urn:import:com.google.gwt.user.cellview.client'>",
View Full Code Here

TOP

Related Classes of com.google.gdt.eclipse.designer.uibinder.model.widgets.WidgetInfo

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.