Package org.eclipse.wb.internal.core.model.generic

Examples of org.eclipse.wb.internal.core.model.generic.SimpleContainer


        "  }",
        "}");
    // place Button on Tab
    CanvasInfo newButton = createJavaInfo("com.smartgwt.client.widgets.Button");
    {
      SimpleContainer simpleContainer = new SimpleContainerFactory(newTab, false).get().get(1);
      assertTrue(simpleContainer.validateComponent(newButton));
      simpleContainer.command_CREATE(newButton);
    }
    assertEditor(
        "public class Test implements EntryPoint {",
        "  public void onModuleLoad() {",
        "    RootPanel rootPanel = RootPanel.get();",
View Full Code Here


            "    setLayout(new CenterLayout());",
            "  }",
            "}");
    container.refresh();
    CenterLayoutInfo layout = (CenterLayoutInfo) container.getLayout();
    SimpleContainer simpleContainer = new SimpleContainerFactory(layout, true).get().get(0);
    // empty initially
    assertTrue(simpleContainer.isEmpty());
    // add new Button
    ComponentInfo newButton = createButton();
    assertTrue(simpleContainer.validateComponent(newButton));
    simpleContainer.command_CREATE(newButton);
    assertEditor(
        "public class Test extends LayoutContainer {",
        "  public Test() {",
        "    setLayout(new CenterLayout());",
        "    {",
        "      Button button = new Button();",
        "      add(button);",
        "    }",
        "  }",
        "}");
    // has child
    assertFalse(simpleContainer.isEmpty());
  }
View Full Code Here

            "// filler filler filler filler filler",
            "<ui:UiBinder>",
            "  <g:SimplePanel/>",
            "</ui:UiBinder>");
    refresh();
    SimpleContainer simpleContainer = getSimpleContainer(panel);
    // no child Widget initially
    assertTrue(simpleContainer.isEmpty());
    // do CREATE
    WidgetInfo newButton = createButton();
    simpleContainer.command_CREATE(newButton);
    assertXML(
        "// filler filler filler filler filler",
        "<ui:UiBinder>",
        "  <g:SimplePanel>",
        "    <g:Button width='100%' height='100%'/>",
        "  </g:SimplePanel>",
        "</ui:UiBinder>");
    assertSame(newButton, panel.getWidget());
    assertFalse(simpleContainer.isEmpty());
  }
View Full Code Here

        "  </g:FlowPanel>",
        "</ui:UiBinder>");
    refresh();
    SimplePanelInfo panel = getObjectByName("panel");
    WidgetInfo button = getObjectByName("button");
    SimpleContainer simpleContainer = getSimpleContainer(panel);
    // do ADD
    simpleContainer.command_ADD(button);
    assertXML(
        "<ui:UiBinder>",
        "  <g:FlowPanel>",
        "    <g:SimplePanel wbp:name='panel'>",
        "      <g:Button wbp:name='button' width='100%' height='100%'/>",
View Full Code Here

            "    setLayout(new FitLayout());",
            "  }",
            "}");
    container.refresh();
    FitLayoutInfo layout = (FitLayoutInfo) container.getLayout();
    SimpleContainer simpleContainer = new SimpleContainerFactory(layout, true).get().get(0);
    // empty initially
    assertTrue(simpleContainer.isEmpty());
    // add new Button
    ComponentInfo newButton = createButton();
    assertTrue(simpleContainer.validateComponent(newButton));
    simpleContainer.command_CREATE(newButton);
    assertEditor(
        "public class Test extends LayoutContainer {",
        "  public Test() {",
        "    setLayout(new FitLayout());",
        "    {",
        "      Button button = new Button();",
        "      add(button);",
        "    }",
        "  }",
        "}");
    // has child
    assertFalse(simpleContainer.isEmpty());
  }
View Full Code Here

            "public class Test extends SimplePanel {",
            "  public Test() {",
            "  }",
            "}");
    refresh();
    SimpleContainer simpleContainer = getSimpleContainer(panel);
    // no child Widget initially
    assertTrue(simpleContainer.isEmpty());
    // do CREATE
    WidgetInfo newButton = createButton();
    simpleContainer.command_CREATE(newButton);
    assertEditor(
        "// filler filler filler filler filler",
        "public class Test extends SimplePanel {",
        "  public Test() {",
        "    {",
        "      Button button = new Button();",
        "      setWidget(button);",
        "      button.setSize('100%', '100%');",
        "    }",
        "  }",
        "}");
    assertSame(newButton, panel.getWidget());
    assertFalse(simpleContainer.isEmpty());
  }
View Full Code Here

        "  }",
        "}");
    refresh();
    WidgetInfo button = getJavaInfoByName("button");
    SimplePanelInfo panel = getJavaInfoByName("panel");
    SimpleContainer simpleContainer = getSimpleContainer(panel);
    // do ADD
    simpleContainer.command_ADD(button);
    assertEditor(
        "public class Test implements EntryPoint {",
        "  public void onModuleLoad() {",
        "    RootPanel rootPanel = RootPanel.get();",
        "    {",
View Full Code Here

TOP

Related Classes of org.eclipse.wb.internal.core.model.generic.SimpleContainer

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.