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

Examples of com.google.gdt.eclipse.designer.gwtext.model.widgets.FormPanelInfo


  //
  // Tests
  //
  ////////////////////////////////////////////////////////////////////////////
  public void test_parse() throws Exception {
    FormPanelInfo form =
        parseJavaInfo(
            "public class Test extends FormPanel {",
            "  public Test() {",
            "    {",
            "      TextField field_1 = new TextField();",
            "      add(field_1);",
            "    }",
            "  }",
            "}");
    form.refresh();
    assertNoErrors(form);
    //
    assertTrue(form.hasLayout());
    assertInstanceOf(FormLayoutInfo.class, form.getLayout());
  }
View Full Code Here


   * ensure that <code>Element</code> creation does not happen too early.
   * <p>
   * http://fogbugz.instantiations.com/fogbugz/default.php?42815
   */
  public void test_parseTimeField() throws Exception {
    FormPanelInfo form =
        parseJavaInfo(
            "public class Test extends FormPanel {",
            "  public Test() {",
            "    {",
            "      TimeField field = new TimeField();",
View Full Code Here

            "    RootPanel rootPanel = RootPanel.get();",
            "  }",
            "}");
    frame.refresh();
    // create FormPanel
    FormPanelInfo form = (FormPanelInfo) createWidget("com.gwtext.client.widgets.form.FormPanel");
    // add FormPanel on root panel
    frame.command_CREATE2(form, null);
    assertEditor(
        "public class Test implements EntryPoint {",
        "  public void onModuleLoad() {",
View Full Code Here

            "    }",
            "  }",
            "}");
    frame.refresh();
    // initial state
    FormPanelInfo form = frame.getChildren(FormPanelInfo.class).get(0);
    List<FieldInfo> fields = form.getFields();
    assertThat(fields).hasSize(2);
    FieldInfo field_1 = fields.get(0);
    FieldInfo field_2 = fields.get(1);
    // delete "field_1", "field_2" still alive
    {
      field_1.delete();
      assertEditor(
          "public class Test implements EntryPoint {",
          "  public void onModuleLoad() {",
          "    RootPanel rootPanel = RootPanel.get();",
          "    {",
          "      FormPanel form = new FormPanel();",
          "      {",
          "        TextField field_2 = new TextField();",
          "        form.add(field_2);",
          "      }",
          "      rootPanel.add(form);",
          "    }",
          "  }",
          "}");
    }
    // delete "field_2", some default Field should be added
    field_2.delete();
    assertEditor(
        "public class Test implements EntryPoint {",
        "  public void onModuleLoad() {",
        "    RootPanel rootPanel = RootPanel.get();",
        "    {",
        "      FormPanel form = new FormPanel();",
        "      {",
        "        TextField textField = new TextField('New text field', 'text_field', 100);",
        "        form.add(textField);",
        "      }",
        "      rootPanel.add(form);",
        "    }",
        "  }",
        "}");
    // delete "form" itself
    form.delete();
    assertEditor(
        "public class Test implements EntryPoint {",
        "  public void onModuleLoad() {",
        "    RootPanel rootPanel = RootPanel.get();",
        "  }",
View Full Code Here

TOP

Related Classes of com.google.gdt.eclipse.designer.gwtext.model.widgets.FormPanelInfo

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.