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

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


  /**
   * @return the {@link LayoutEditPolicy} configured for {@link FormItemInfo}.
   */
  private LayoutEditPolicy createFlowContainerPolicy() {
    return GenericEditPolicyFactory.createFlow(m_form, new FlowContainer() {
      ContainerObjectValidator m_validator = ContainerObjectValidators.forList(new String[]{
          "com.smartgwt.client.widgets.form.fields.FormItem",
          "com.smartgwt.client.widgets.Canvas"});

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


            "  public Test() {",
            "  }",
            "}");
    window.refresh();
    // prepare FlowContainer
    FlowContainer flowContainer;
    {
      List<FlowContainer> flowContainers = new FlowContainerFactory(window, true).get();
      assertThat(flowContainers).hasSize(1);
      flowContainer = flowContainers.get(0);
      assertTrue(!flowContainer.isHorizontal());
    }
    // do create
    WidgetInfo newButton = createButton();
    assertTrue(flowContainer.validateComponent(newButton));
    flowContainer.command_CREATE(newButton, null);
    assertEditor(
        "// filler filler filler",
        "public class Test extends Window {",
        "  public Test() {",
        "    {",
View Full Code Here

            "  <g:HorizontalPanel/>",
            "</ui:UiBinder>");
    WidgetInfo newButton = createButton();
    // canvas
    {
      FlowContainer flowContainer = getFlowContainer(panel, true);
      flowContainer.validateComponent(newButton);
      assertTrue(flowContainer.isHorizontal());
    }
    // tree
    {
      FlowContainer flowContainer = getFlowContainer(panel, false);
      flowContainer.validateComponent(newButton);
    }
  }
View Full Code Here

            "  <g:VerticalPanel/>",
            "</ui:UiBinder>");
    WidgetInfo newButton = createButton();
    // canvas
    {
      FlowContainer flowContainer = getFlowContainer(panel, true);
      flowContainer.validateComponent(newButton);
      assertFalse(flowContainer.isHorizontal());
    }
    // tree
    {
      FlowContainer flowContainer = getFlowContainer(panel, false);
      flowContainer.validateComponent(newButton);
    }
  }
View Full Code Here

            "  public Test() {",
            "  }",
            "}");
    bar.refresh();
    //
    FlowContainer flowContainer = new FlowContainerFactory(bar, true).get().get(0);
    flowContainer.command_CREATE(createButton(), null);
    assertEditor(
        "// filler filler filler",
        "public class Test extends ToolBar {",
        "  public Test() {",
        "    {",
View Full Code Here

        NonVisualBeanContainerInfo.get(calendar).getChildren(DataSourceInfo.class).get(0);
    // create new DataSourceField
    DataSourceFieldInfo dataSourceField =
        createJavaInfo("com.smartgwt.client.data.fields.DataSourceBooleanField");
    {
      FlowContainer flowContainer = new FlowContainerFactory(dataSource, false).get().get(0);
      assertTrue(flowContainer.validateComponent(dataSourceField));
      flowContainer.command_CREATE(dataSourceField, null);
    }
    assertEditor(
        "public class Test implements EntryPoint {",
        "  public void onModuleLoad() {",
        "    Calendar calendar = new Calendar();",
View Full Code Here

    assertThat(canvas.getChildren(CalendarInfo.class).size()).isEqualTo(1);
    // create new DataSourceField
    DataSourceFieldInfo dataSourceField =
        createJavaInfo("com.smartgwt.client.data.fields.DataSourceBooleanField");
    {
      FlowContainer flowContainer = new FlowContainerFactory(dataSource, false).get().get(0);
      assertTrue(flowContainer.validateComponent(dataSourceField));
      flowContainer.command_CREATE(dataSourceField, null);
    }
    assertEditor(
        "public class Test implements EntryPoint {",
        "  public void onModuleLoad() {",
        "    Canvas canvas = new Canvas();",
View Full Code Here

    canvas.refresh();
    MenuInfo menu = canvas.getChildren(MenuInfo.class).get(0);
    // create new MenuItem
    MenuItemInfo newItem = createJavaInfo("com.smartgwt.client.widgets.menu.MenuItem");
    {
      FlowContainer flowContainer = new FlowContainerFactory(menu, false).get().get(0);
      assertTrue(flowContainer.validateComponent(newItem));
      flowContainer.command_CREATE(newItem, null);
    }
    assertThat(newItem.getMenu()).isSameAs(menu);
    assertEditor(
        "public class Test implements EntryPoint {",
        "  public void onModuleLoad() {",
View Full Code Here

    List<MenuItemInfo> items = menu.getItems();
    assertThat(items.size()).isEqualTo(2);
    MenuItemInfo item = items.get(0);
    MenuItemInfo separator = items.get(1);
    {
      FlowContainer flowContainer = new FlowContainerFactory(menu, false).get().get(0);
      flowContainer.command_MOVE(separator, item);
    }
    assertEditor(
        "public class Test implements EntryPoint {",
        "  public void onModuleLoad() {",
        "    Canvas canvas = new Canvas();",
View Full Code Here

            "    setLayout(new FormLayout());",
            "  }",
            "}");
    container.refresh();
    FormLayoutInfo layout = (FormLayoutInfo) container.getLayout();
    FlowContainer flowContainer = new FlowContainerFactory(layout, false).get().get(0);
    // add new LabelField
    FieldInfo newField = createJavaInfo("com.extjs.gxt.ui.client.widget.form.LabelField", "empty");
    assertTrue(flowContainer.validateComponent(newField));
    flowContainer.command_CREATE(newField, null);
    assertEditor(
        "public class Test extends LayoutContainer {",
        "  public Test() {",
        "    setLayout(new FormLayout());",
        "    {",
View Full Code Here

TOP

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

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.