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

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


        "  }",
        "}");
    // 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 {",
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));
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));
View Full Code Here

   * <code>Widget</code>.
   */
  protected static void assertHasWidgetSimpleContainer(JavaInfo container,
      boolean forCanvas,
      boolean expected) throws Exception {
    SimpleContainerFactory factory = new SimpleContainerFactory(container, forCanvas);
    List<SimpleContainer> simpleContainers = factory.get();
    // check each factory
    WidgetInfo button = createButton();
    for (SimpleContainer simpleContainer : simpleContainers) {
      boolean valid = simpleContainer.validateComponent(button);
      assertThat(valid).isEqualTo(expected);
View Full Code Here

      WidgetInfo label = panel.getChildrenWidgets().get(0);
      assertNull(LayoutInfo.getLayoutData(label));
    }
    // no SimpleContainer
    {
      List<SimpleContainer> containers = new SimpleContainerFactory(layout, true).get();
      assertThat(containers).isEmpty();
    }
    {
      List<SimpleContainer> containers = new SimpleContainerFactory(layout, false).get();
      assertThat(containers).isEmpty();
    }
    // has FlowContainer for tree
    {
      List<FlowContainer> containers = new FlowContainerFactory(layout, false).get();
View Full Code Here

  ////////////////////////////////////////////////////////////////////////////
  /**
   * @return some {@link SimpleContainer} for given {@link JavaInfo}.
   */
  private static SimpleContainer getSimpleContainer(JavaInfo container) {
    List<SimpleContainer> containers = new SimpleContainerFactory(container, false).get();
    assertThat(containers).isNotEmpty();
    return containers.get(0);
  }
View Full Code Here

      WidgetInfo internalPanel = panel.getChildrenWidgets().get(0);
      assertNull(LayoutInfo.getLayoutData(internalPanel));
    }
    // no SimpleContainer
    {
      List<SimpleContainer> containers = new SimpleContainerFactory(layout, true).get();
      assertThat(containers).isEmpty();
    }
    {
      List<SimpleContainer> containers = new SimpleContainerFactory(layout, false).get();
      assertThat(containers).isEmpty();
    }
    // has FlowContainer
    {
      List<FlowContainer> containers = new FlowContainerFactory(layout, true).get();
View Full Code Here

            "  }",
            "}");
    container.refresh();
    //
    MenuInfo newMenu = createJavaInfo("com.extjs.gxt.ui.client.widget.menu.Menu");
    for (SimpleContainer simpleContainer : new SimpleContainerFactory(container, true).get()) {
      if (simpleContainer.validateComponent(newMenu)) {
        simpleContainer.command_CREATE(newMenu);
        break;
      }
    }
View Full Code Here

TOP

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

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.