Examples of PanelInfo


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

    panel.refresh();
    assertNoErrors(panel);
  }

  public void test_CREATE() throws Exception {
    PanelInfo panel =
        parseJavaInfo(
            "public class Test extends Panel {",
            "  public Test() {",
            "    setLayout(new RowLayout());",
            "  }",
            "}");
    assertHierarchy(
        "{this: com.gwtext.client.widgets.Panel} {this} {/setLayout(new RowLayout())/}",
        "  {new: com.gwtext.client.widgets.layout.RowLayout} {empty} {/setLayout(new RowLayout())/}");
    panel.refresh();
    //
    PagingToolbarInfo toolbar = createJavaInfo("com.gwtext.client.widgets.PagingToolbar");
    panel.getLayout().command_CREATE(toolbar, null);
    assertEditor(
        "public class Test extends Panel {",
        "  public Test() {",
        "    setLayout(new RowLayout());",
        "    {",
View Full Code Here

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

  //
  // Tests
  //
  ////////////////////////////////////////////////////////////////////////////
  public void test_parse() throws Exception {
    PanelInfo panel =
        parseJavaInfo(
            "public class Test extends Panel {",
            "  public Test() {",
            "    setLayout(new FitLayout());",
            "  }",
            "}");
    panel.refresh();
    //
    TreePanelInfo treePanel =
        (TreePanelInfo) createWidget("com.gwtext.client.widgets.tree.TreePanel");
    panel.getLayout().command_CREATE(treePanel, null);
    assertEditor(
        "public class Test extends Panel {",
        "  public Test() {",
        "    setLayout(new FitLayout());",
        "    {",
        "      TreePanel treePanel = new TreePanel();",
        "      {",
        "        TreeNode treeNode = new TreeNode('(Root)', '');",
        "        treePanel.setRootNode(treeNode);",
        "      }",
        "      add(treePanel);",
        "    }",
        "  }",
        "}");
    panel.refresh();
  }
View Full Code Here

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

  /**
   * When delete root node, new one should be added, because <code>TreePanel</code> requires it.
   */
  public void test_delete() throws Exception {
    PanelInfo panel =
        parseJavaInfo(
            "public class Test extends Panel {",
            "  public Test() {",
            "    setLayout(new FitLayout());",
            "    {",
            "      TreePanel treePanel = new TreePanel();",
            "      {",
            "        TreeNode root = new TreeNode('Initial root');",
            "        treePanel.setRootNode(root);",
            "      }",
            "      add(treePanel);",
            "    }",
            "  }",
            "}");
    panel.refresh();
    TreePanelInfo treePanel = (TreePanelInfo) panel.getChildrenWidgets().get(0);
    // delete "root"
    treePanel.getRootNode().delete();
    assertEditor(
        "public class Test extends Panel {",
        "  public Test() {",
View Full Code Here

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

  //
  // Tests
  //
  ////////////////////////////////////////////////////////////////////////////
  public void test_parse() throws Exception {
    PanelInfo panel =
        parseJavaInfo(
            "public class Test extends Panel {",
            "  public Test() {",
            "    setLayout(new BorderLayout());",
            "    {",
            "      Label label = new Label();",
            "      add(label, new BorderLayoutData(RegionPosition.CENTER));",
            "    }",
            "  }",
            "}");
    assertHierarchy(
        "{this: com.gwtext.client.widgets.Panel} {this} {/setLayout(new BorderLayout())/ /add(label, new BorderLayoutData(RegionPosition.CENTER))/}",
        "  {new: com.gwtext.client.widgets.layout.BorderLayout} {empty} {/setLayout(new BorderLayout())/}",
        "  {new: com.gwtext.client.widgets.form.Label} {local-unique: label} {/new Label()/ /add(label, new BorderLayoutData(RegionPosition.CENTER))/}",
        "    {new: com.gwtext.client.widgets.layout.BorderLayoutData} {empty} {/add(label, new BorderLayoutData(RegionPosition.CENTER))/}");
    WidgetInfo label = panel.getChildrenWidgets().get(0);
    BorderLayoutDataInfo layoutData = BorderLayoutInfo.getBorderData(label);
    assertNotNull(layoutData);
    // check position
    assertEquals("center", layoutData.getPosition());
  }
View Full Code Here

Examples of com.google.gdt.eclipse.designer.model.widgets.panels.PanelInfo

            "    rootPanel.add(panel);",
            "  }",
            "}");
    frame.refresh();
    //
    PanelInfo panel = (PanelInfo) frame.getChildrenWidgets().get(0);
    assertTrue(panel.shouldDrawDotsBorder());
  }
View Full Code Here

Examples of com.google.gdt.eclipse.designer.model.widgets.panels.PanelInfo

            "    panel.setStyleName('my-Panel');",
            "  }",
            "}");
    frame.refresh();
    //
    PanelInfo panel = (PanelInfo) frame.getChildrenWidgets().get(0);
    assertFalse(panel.shouldDrawDotsBorder());
  }
View Full Code Here

Examples of com.google.gdt.eclipse.designer.model.widgets.panels.PanelInfo

    PanelInfo panel = (PanelInfo) frame.getChildrenWidgets().get(0);
    assertFalse(panel.shouldDrawDotsBorder());
  }

  public void test_extendPanel() throws Exception {
    PanelInfo panel =
        parseJavaInfo(
            "// filler filler filler",
            "public class Test extends HorizontalPanel {",
            "  public Test() {",
            "  }",
            "}");
    panel.refresh();
    assertNoErrors(panel);
    // bounds
    Rectangle bounds = panel.getBounds();
    assertThat(bounds.width).isEqualTo(450);
    assertThat(bounds.height).isEqualTo(300);
  }
View Full Code Here

Examples of com.google.gdt.eclipse.designer.model.widgets.panels.PanelInfo

   * <code>setSize()</code>.
   * <p>
   * http://jira.codehaus.org/browse/MVEL-151
   */
  public void test_extendPanel_MVEL151() throws Exception {
    PanelInfo panel =
        parseJavaInfo(
            "// filler filler filler",
            "public class Test extends VerticalPanel {",
            "  public Test() {",
            "  }",
            "}");
    panel.refresh();
    assertNoErrors(panel);
    // bounds
    Rectangle bounds = panel.getBounds();
    assertThat(bounds.width).isEqualTo(450);
    assertThat(bounds.height).isEqualTo(300);
  }
View Full Code Here

Examples of com.google.gdt.eclipse.designer.model.widgets.panels.PanelInfo

   * Panel. So, we need to have top bounds script.
   * <p>
   * http://fogbugz.instantiations.com/fogbugz/default.php?41093
   */
  public void test_renderPanel() throws Exception {
    PanelInfo panel =
        parseJavaInfo(
            "public class Test extends Composite {",
            "  public Test() {",
            "    VerticalPanel panel = new VerticalPanel();",
            "    panel.add(new Button());",
            "  }",
            "}");
    panel.refresh();
    //
    Rectangle bounds = panel.getBounds();
    assertEquals(450, bounds.width);
    assertEquals(300, bounds.height);
  }
View Full Code Here

Examples of com.google.gdt.eclipse.designer.model.widgets.panels.PanelInfo

   * We should not intercept method <code>HasWidgets.iterator()</code>.
   * <p>
   * http://fogbugz.instantiations.com/fogbugz/default.php?45034
   */
  public void test_dontIntercept_iterator() throws Exception {
    PanelInfo panel =
        parseJavaInfo(
            "public class Test extends VerticalPanel {",
            "  public Test() {",
            "  }",
            "  public java.util.Iterator iterator() {",
            "    return this.getChildren().iterator();",
            "  }",
            "}");
    panel.refresh();
    assertNoErrors(panel);
  }
View Full Code Here
TOP
Copyright © 2018 www.massapi.com. 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.