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

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


  //
  // Size
  //
  ////////////////////////////////////////////////////////////////////////////
  public void test_sizeFromResource() throws Exception {
    WindowInfo window =
        parseJavaInfo(
            "// filler filler filler",
            "public class Test extends Window {",
            "  public Test() {",
            "  }",
            "}");
    window.refresh();
    // default size
    {
      Rectangle bounds = window.getBounds();
      assertEquals(450, bounds.width);
      assertEquals(300, bounds.height);
    }
    // set new size
    {
      window.getTopBoundsSupport().setSize(400, 200);
      window.refresh();
      //
      Rectangle bounds = window.getBounds();
      assertEquals(400, bounds.width);
      assertEquals(200, bounds.height);
    }
  }
View Full Code Here


      assertEquals(200, bounds.height);
    }
  }

  public void test_setSize_Integer() throws Exception {
    WindowInfo window =
        parseJavaInfo(
            "public class Test extends Window {",
            "  public Test() {",
            "    setSize(350, 250);",
            "  }",
            "}");
    window.refresh();
    // source size
    {
      Rectangle bounds = window.getBounds();
      assertEquals(350, bounds.width);
      assertEquals(250 + HEIGHT_DELTA, bounds.height);
    }
    // set new size
    {
      window.getTopBoundsSupport().setSize(400, 200);
      window.refresh();
      Rectangle bounds = window.getBounds();
      assertEquals(400, bounds.width);
      assertEquals(200 + HEIGHT_DELTA, bounds.height);
      // check source
      assertEditor(
          "public class Test extends Window {",
View Full Code Here

   * position.
   * <p>
   * http://fogbugz.instantiations.com/fogbugz/default.php?43341
   */
  public void test_setSize_Integer_big() throws Exception {
    WindowInfo window =
        parseJavaInfo(
            "public class Test extends Window {",
            "  public Test() {",
            "    setSize(200, 300);",
            "  }",
            "}");
    window.refresh();
    // set new size
    window.getTopBoundsSupport().setSize(200, 600);
    window.refresh();
    {
      Rectangle bounds = window.getBounds();
      assertEquals(200, bounds.width);
      assertEquals(600 + HEIGHT_DELTA, bounds.height);
    }
    assertEditor(
        "public class Test extends Window {",
View Full Code Here

        "  }",
        "}");
  }

  public void test_setSize_String() throws Exception {
    WindowInfo window =
        parseJavaInfo(
            "public class Test extends Window {",
            "  public Test() {",
            "    setSize('350px', '250px');",
            "  }",
            "}");
    window.refresh();
    // source size
    {
      Rectangle bounds = window.getBounds();
      assertEquals(350, bounds.width);
      assertEquals(250 + HEIGHT_DELTA, bounds.height);
    }
    // set new size
    {
      window.getTopBoundsSupport().setSize(400, 200);
      window.refresh();
      // check source
      assertEditor(
          "public class Test extends Window {",
          "  public Test() {",
          "    setSize('400px', '200px');",
          "  }",
          "}");
      // check values
      Rectangle bounds = window.getBounds();
      assertEquals(400, bounds.width);
      assertEquals(200 + HEIGHT_DELTA, bounds.height);
    }
  }
View Full Code Here

      assertEquals(200 + HEIGHT_DELTA, bounds.height);
    }
  }

  public void test_setWH_Integer() throws Exception {
    WindowInfo window =
        parseJavaInfo(
            "public class Test extends Window {",
            "  public Test() {",
            "    setWidth(350);",
            "    setHeight(250);",
            "  }",
            "}");
    window.refresh();
    // source size
    {
      Rectangle bounds = window.getBounds();
      assertEquals(350, bounds.width);
      assertEquals(250 + HEIGHT_DELTA, bounds.height);
    }
    // set new size
    {
      window.getTopBoundsSupport().setSize(400, 200);
      window.refresh();
      Rectangle bounds = window.getBounds();
      assertEquals(400, bounds.width);
      assertEquals(200 + HEIGHT_DELTA, bounds.height);
      // check source
      assertEditor(
          "public class Test extends Window {",
View Full Code Here

          "}");
    }
  }

  public void test_setWH_String() throws Exception {
    WindowInfo window =
        parseJavaInfo(
            "public class Test extends Window {",
            "  public Test() {",
            "    setWidth('350px');",
            "    setHeight('250px');",
            "  }",
            "}");
    window.refresh();
    // source size
    {
      Rectangle bounds = window.getBounds();
      assertEquals(350, bounds.width);
      assertEquals(250 + HEIGHT_DELTA, bounds.height);
    }
    // set new size
    {
      window.getTopBoundsSupport().setSize(400, 200);
      window.refresh();
      Rectangle bounds = window.getBounds();
      assertEquals(400, bounds.width);
      assertEquals(200 + HEIGHT_DELTA, bounds.height);
      // check source
      assertEditor(
          "public class Test extends Window {",
View Full Code Here

  /**
   * There is problem that <code>Window.setLayout()</code> complains that widget is already
   * rendered.
   */
  public void test_setLayout() throws Exception {
    WindowInfo window =
        parseJavaInfo(
            "public class Test extends Window {",
            "  public Test() {",
            "    setLayout(new RowLayout());",
            "  }",
            "}");
    assertNoErrors(window);
    // refresh
    window.refresh();
    assertNoErrors(window);
  }
View Full Code Here

   * There was problem with <code>BorderLayout</code>.
   * <p>
   * http://fogbugz.instantiations.com/fogbugz/default.php?41241
   */
  public void test_BorderLayout() throws Exception {
    WindowInfo window =
        parseJavaInfo(
            "public class Test extends Window {",
            "  public Test() {",
            "    setLayout(new BorderLayout());",
            "  }",
            "}");
    assertNoErrors(window);
    // refresh
    window.refresh();
    assertNoErrors(window);
  }
View Full Code Here

TOP

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

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.