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

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


            "    RootPanel rootPanel = RootPanel.get();",
            "  }",
            "}");
    frame.refresh();
    // create Editor
    EditorInfo editor = (EditorInfo) createWidget("com.gwtext.client.widgets.Editor");
    // add Editor on root panel
    frame.command_CREATE2(editor, null);
    assertEditor(
        "import com.gwtext.client.widgets.Editor;",
        "import com.gwtext.client.widgets.form.TextField;",
        "public class Test implements EntryPoint {",
        "  public void onModuleLoad() {",
        "    RootPanel rootPanel = RootPanel.get();",
        "    {",
        "      Editor editor = new Editor();",
        "      {",
        "        TextField textField = new TextField('New text field', 'text_field', 150);",
        "        editor.setField(textField);",
        "      }",
        "      rootPanel.add(editor);",
        "    }",
        "  }",
        "}");
    // Editor already contains one Field (TextField by default)
    List<FieldInfo> children = editor.getChildren(FieldInfo.class);
    assertThat(children).hasSize(1);
    assertThat(children.get(0).getDescription().getComponentClass().getCanonicalName()).isEqualTo(
        "com.gwtext.client.widgets.form.TextField");
  }
View Full Code Here


            "    }",
            "  }",
            "}");
    frame.refresh();
    // initial state
    EditorInfo editor = frame.getChildren(EditorInfo.class).get(0);
    assertThat(editor.getChildren(FieldInfo.class)).hasSize(1);
    // remove field
    FieldInfo field = editor.getChildren(FieldInfo.class).get(0);
    field.delete();
    frame.refresh();
    // in background default field was set to Editor
    assertEditor(
        "import com.gwtext.client.widgets.Editor;",
        "import com.gwtext.client.widgets.form.TextField;",
        "public class Test implements EntryPoint {",
        "  public void onModuleLoad() {",
        "    RootPanel rootPanel = RootPanel.get();",
        "    {",
        "      Editor editor = new Editor();",
        "      {",
        "        TextField textField = new TextField('New text field', 'text_field', 150);",
        "        editor.setField(textField);",
        "      }",
        "      rootPanel.add(editor);",
        "    }",
        "  }",
        "}");
    //
    List<FieldInfo> children = editor.getChildren(FieldInfo.class);
    assertThat(children).hasSize(1);
    assertThat(children.get(0).getDescription().getComponentClass().getCanonicalName()).isEqualTo(
        "com.gwtext.client.widgets.form.TextField");
  }
View Full Code Here

            "    }",
            "  }",
            "}");
    frame.refresh();
    // initial state
    EditorInfo editor = frame.getChildren(EditorInfo.class).get(0);
    assertThat(editor.getChildren(FieldInfo.class)).hasSize(1);
    // change field
    // TODO
    assertThat(true).isFalse();
  }
View Full Code Here

TOP

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

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.