Package org.eclipse.wb.core.model

Examples of org.eclipse.wb.core.model.JavaInfo


        openPanel("public class Test extends Panel {", "  public Test() {", "    "
            + setLayoutSource, "  }", "}");
    // CREATE "label_1"
    GraphicalEditPart labelPart_1;
    {
      JavaInfo label_1 = loadCreationTool("com.gwtext.client.widgets.form.Label");
      canvas.moveTo(panel, 0, 0);
      canvas.assertEmptyFlowContainerFeedback(panel, horizontal);
      // click, so finish creation
      canvas.click();
      canvas.assertNoFeedbacks();
      label_1.getPropertyByTitle("text").setValue("111111111");
      label_1.getVariableSupport().setName("label_1");
      //
      labelPart_1 = canvas.getEditPart(label_1);
      isExistingAndSelectedPart(labelPart_1);
    }
    assertEditor(
        "public class Test extends Panel {",
        "  public Test() {",
        "    " + setLayoutSource,
        "    {",
        "      Label label_1 = new Label('111111111');",
        "      add(label_1);",
        "    }",
        "  }",
        "}");
    // CREATE "label_2" before "label_1"
    GraphicalEditPart labelPart_2;
    {
      JavaInfo label_2 = loadCreationTool("com.gwtext.client.widgets.form.Label");
      canvas.moveTo(labelPart_1);
      assertBeforeFeedback(labelPart_1, horizontal);
      // click, so finish creation
      canvas.click();
      canvas.assertNoFeedbacks();
      label_2.getPropertyByTitle("text").setValue("222222222");
      label_2.getVariableSupport().setName("label_2");
      //
      labelPart_2 = canvas.getEditPart(label_2);
      isExistingAndSelectedPart(labelPart_2);
    }
    assertEditor(
View Full Code Here


            "    calendar.draw();",
            "  }",
            "}"});
    calendar.refresh();
    assertNoErrors(calendar);
    JavaInfo dataSource = getJavaInfoByName("dataSource");
    assertNoErrors(dataSource);
    // no error messages must be popped
  }
View Full Code Here

            "}");
    MenuBarInfo bar = (MenuBarInfo) container.getWidgets().get(0);
    MenuBarItemInfo barItem = bar.getItems().get(0);
    MenuInfo menu = barItem.getSubMenu();
    // drop MenuItem
    JavaInfo newItem = loadCreationTool("com.extjs.gxt.ui.client.widget.menu.MenuItem");
    // "menu" not open
    canvas.assertNullEditPart(menu);
    // open "menu"
    canvas.target(barItem).in(0.5, 0.5).move();
    canvas.assertNotNullEditPart(menu);
View Full Code Here

            "}");
    MenuBarInfo bar = (MenuBarInfo) container.getWidgets().get(0);
    MenuBarItemInfo barItem = bar.getItems().get(0);
    MenuInfo menu = barItem.getSubMenu();
    // drop MenuItem
    JavaInfo newItem = loadCreationTool("com.extjs.gxt.ui.client.widget.menu.MenuItem");
    m_viewerTree.expandAll();
    tree.moveOn(menu);
    tree.assertFeedback_on(menu);
    tree.click();
    assertEditor(
View Full Code Here

            "    }",
            "  }",
            "}");
    WidgetInfo panel = frame.getChildrenWidgets().get(0);
    // begin creating Button
    JavaInfo newButton = loadCreationTool("com.google.gwt.user.client.ui.Button");
    // move on "panel": feedback appears, command not null
    canvas.moveTo(panel, 0, 0);
    canvas.assertFeedbacks(canvas.getTargetPredicate(panel));
    canvas.assertCommandNotNull();
    // click, so finish creation
View Full Code Here

    // create new Section
    FlowContainer flowContainer = new FlowContainerFactory(stack, true).get().get(0);
    {
      assertFalse(flowContainer.isHorizontal());
    }
    JavaInfo newSection = createJavaInfo("com.smartgwt.client.widgets.layout.SectionStackSection");
    assertTrue(flowContainer.validateComponent(newSection));
    flowContainer.command_CREATE(newSection, null);
    assertEditor(
        "public class Test implements EntryPoint {",
        "  public void onModuleLoad() {",
        "    RootPanel rootPanel = RootPanel.get();",
        "    SectionStack stack = new SectionStack();",
        "    {",
        "      SectionStackSection sectionStackSection = new SectionStackSection('New Section');",
        "      stack.addSection(sectionStackSection);",
        "    }",
        "    rootPanel.add(stack, 41, 42);",
        "    stack.setSize('270px', '200px');",
        "  }",
        "}");
    // add widget on Section
    CanvasInfo newCanvas = createJavaInfo("com.smartgwt.client.widgets.Canvas");
    flowContainer_CREATE(newSection, newCanvas, null);
    assertEditor(
        "public class Test implements EntryPoint {",
        "  public void onModuleLoad() {",
        "    RootPanel rootPanel = RootPanel.get();",
        "    SectionStack stack = new SectionStack();",
        "    {",
        "      SectionStackSection sectionStackSection = new SectionStackSection('New Section');",
        "      {",
        "        Canvas canvas = new Canvas();",
        "        sectionStackSection.addItem(canvas);",
        "      }",
        "      stack.addSection(sectionStackSection);",
        "    }",
        "    rootPanel.add(stack, 41, 42);",
        "    stack.setSize('270px', '200px');",
        "  }",
        "}");
    newSection.getPropertyByTitle("expanded").setValue(false);
    assertEditor(
        "public class Test implements EntryPoint {",
        "  public void onModuleLoad() {",
        "    RootPanel rootPanel = RootPanel.get();",
        "    SectionStack stack = new SectionStack();",
View Full Code Here

            "  }",
            "}");
    WidgetInfo panel = frame.getChildrenWidgets().get(0);
    WidgetInfo existingButton = panel.getChildren(WidgetInfo.class).get(0);
    // begin creating Button
    JavaInfo newButton = loadCreationTool("com.google.gwt.user.client.ui.Button");
    // move on "panel": feedback appears, command not null
    canvas.moveTo(existingButton, 0, 0);
    canvas.assertFeedbacks(canvas.getLinePredicate(existingButton, IPositionConstants.LEFT));
    canvas.assertCommandNotNull();
    // click, so finish creation
View Full Code Here

        "  {new: com.gwtext.client.widgets.Toolbar} {local-unique: toolbar} {/new Toolbar()/ /toolbar.setAutoHeight(true)/ /toolbar.addButton(button)/ /add(toolbar)/}",
        "    {new: com.gwtext.client.widgets.ToolbarMenuButton} {local-unique: button} {/new ToolbarMenuButton()/ /button.setMenu(menu)/ /toolbar.addButton(button)/}",
        "      {new: com.gwtext.client.widgets.menu.Menu} {local-unique: menu} {/new Menu()/ /menu.addSeparator()/ /button.setMenu(menu)/}",
        "        {void} {void} {/menu.addSeparator()/}");
    // find addSeparator()
    JavaInfo separator;
    {
      ContainerInfo toolbar = (ContainerInfo) panel.getChildrenWidgets().get(0);
      WidgetInfo button = toolbar.getChildrenWidgets().get(0);
      MenuInfo menu = button.getChildren(MenuInfo.class).get(0);
      separator = menu.getChildrenJava().get(0);
    }
    // check properties
    Property[] properties = separator.getProperties();
    assertThat(properties).isEmpty();
  }
View Full Code Here

TOP

Related Classes of org.eclipse.wb.core.model.JavaInfo

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.