Examples of CanvasInfo


Examples of com.google.gdt.eclipse.designer.smart.model.CanvasInfo

        "  }",
        "}");
  }

  public void test_setSize_setRect_intWidth() throws Exception {
    CanvasInfo canvas =
        parseJavaInfo(
            "public class Test extends Canvas {",
            "  public Test() {",
            "    {",
            "      Button button = new Button('My Button');",
            "      addChild(button);",
            "      button.setRect(1, 2, 50, 25);",
            "    }",
            "  }",
            "}");
    canvas.refresh();
    CanvasInfo button = getJavaInfoByName("button");
    //
    button.getSizeSupport().setSize("100px", null);
    assertEditor(
        "public class Test extends Canvas {",
        "  public Test() {",
        "    {",
        "      Button button = new Button('My Button');",
View Full Code Here

Examples of com.google.gdt.eclipse.designer.smart.model.CanvasInfo

        "  }",
        "}");
  }

  public void test_setSize_setRect_intHeight() throws Exception {
    CanvasInfo canvas =
        parseJavaInfo(
            "public class Test extends Canvas {",
            "  public Test() {",
            "    {",
            "      Button button = new Button('My Button');",
            "      addChild(button);",
            "      button.setRect(1, 2, 50, 25);",
            "    }",
            "  }",
            "}");
    canvas.refresh();
    CanvasInfo button = getJavaInfoByName("button");
    //
    button.getSizeSupport().setSize(null, "75px");
    assertEditor(
        "public class Test extends Canvas {",
        "  public Test() {",
        "    {",
        "      Button button = new Button('My Button');",
View Full Code Here

Examples of com.google.gdt.eclipse.designer.smart.model.CanvasInfo

        "  }",
        "}");
  }

  public void test_setSize_setRect_stringWidthHeight() throws Exception {
    CanvasInfo canvas =
        parseJavaInfo(
            "public class Test extends Canvas {",
            "  public Test() {",
            "    {",
            "      Button button = new Button('My Button');",
            "      addChild(button);",
            "      button.setRect(1, 2, 50, 25);",
            "    }",
            "  }",
            "}");
    canvas.refresh();
    CanvasInfo button = getJavaInfoByName("button");
    //
    button.getSizeSupport().setSize("75%", "50px");
    assertEditor(
        "public class Test extends Canvas {",
        "  public Test() {",
        "    {",
        "      Button button = new Button('My Button');",
View Full Code Here

Examples of com.google.gdt.eclipse.designer.smart.model.CanvasInfo

        "  }",
        "}");
  }

  public void test_setSize_setRect_stringWidth() throws Exception {
    CanvasInfo canvas =
        parseJavaInfo(
            "public class Test extends Canvas {",
            "  public Test() {",
            "    {",
            "      Button button = new Button('My Button');",
            "      addChild(button);",
            "      button.setRect(1, 2, 50, 25);",
            "    }",
            "  }",
            "}");
    canvas.refresh();
    CanvasInfo button = getJavaInfoByName("button");
    //
    button.getSizeSupport().setSize("75%", null);
    assertEditor(
        "public class Test extends Canvas {",
        "  public Test() {",
        "    {",
        "      Button button = new Button('My Button');",
View Full Code Here

Examples of com.google.gdt.eclipse.designer.smart.model.CanvasInfo

  //
  // BOUNDS
  //
  ////////////////////////////////////////////////////////////////////////////
  public void test_BOUNDS_setLocationSize_removeExistingInvocations() throws Exception {
    CanvasInfo canvas =
        parseJavaInfo(
            "public class Test extends Canvas {",
            "  public Test() {",
            "    {",
            "      Button button = new Button('My Button');",
            "      addChild(button);",
            "      button.setRect(1, 2, 3, 4);",
            "      button.moveTo(1, 2);",
            "      button.setLeft(1);",
            "      button.setLeft('1px');",
            "      button.setTop(2);",
            "      button.setTop('2px');",
            "      button.resizeTo(3, 4);",
            "      button.setSize('3px', '4px');",
            "      button.setWidth(3);",
            "      button.setHeight(4);",
            "      button.setWidth('3px');",
            "      button.setHeight('4px');",
            "    }",
            "  }",
            "}");
    canvas.refresh();
    CanvasInfo button = getJavaInfoByName("button");
    //
    canvas.command_BOUNDS(button, new Point(10, 20), new Dimension(50, 25));
    assertEditor(
        "public class Test extends Canvas {",
        "  public Test() {",
View Full Code Here

Examples of com.google.gdt.eclipse.designer.smart.model.CanvasInfo

        "  }",
        "}");
  }

  public void test_BOUNDS_setRect_updateLocation() throws Exception {
    CanvasInfo canvas =
        parseJavaInfo(
            "public class Test extends Canvas {",
            "  public Test() {",
            "    {",
            "      Button button = new Button('My Button');",
            "      addChild(button);",
            "      button.setRect(1, 2, 50, 25);",
            "    }",
            "  }",
            "}");
    canvas.refresh();
    CanvasInfo button = getJavaInfoByName("button");
    //
    canvas.command_BOUNDS(button, new Point(10, 20), null);
    assertEditor(
        "public class Test extends Canvas {",
        "  public Test() {",
View Full Code Here

Examples of com.google.gdt.eclipse.designer.smart.model.CanvasInfo

        "  }",
        "}");
  }

  public void test_BOUNDS_setRect_setSize() throws Exception {
    CanvasInfo canvas =
        parseJavaInfo(
            "public class Test extends Canvas {",
            "  public Test() {",
            "    {",
            "      Button button = new Button('My Button');",
            "      addChild(button);",
            "      button.setRect(1, 2, 3, 4);",
            "    }",
            "  }",
            "}");
    canvas.refresh();
    CanvasInfo button = getJavaInfoByName("button");
    //
    canvas.command_BOUNDS(button, null, new Dimension(100, 25));
    assertEditor(
        "public class Test extends Canvas {",
        "  public Test() {",
View Full Code Here

Examples of com.google.gdt.eclipse.designer.smart.model.CanvasInfo

        "  }",
        "}");
  }

  public void test_BOUNDS_moveTo_updateLocation() throws Exception {
    CanvasInfo canvas =
        parseJavaInfo(
            "public class Test extends Canvas {",
            "  public Test() {",
            "    {",
            "      Button button = new Button('My Button');",
            "      addChild(button);",
            "      button.moveTo(1, 2);",
            "    }",
            "  }",
            "}");
    canvas.refresh();
    CanvasInfo button = getJavaInfoByName("button");
    //
    canvas.command_BOUNDS(button, new Point(10, 20), null);
    assertEditor(
        "public class Test extends Canvas {",
        "  public Test() {",
View Full Code Here

Examples of com.google.gdt.eclipse.designer.smart.model.CanvasInfo

        "  }",
        "}");
  }

  public void test_BOUNDS_setLocation() throws Exception {
    CanvasInfo canvas =
        parseJavaInfo(
            "public class Test extends Canvas {",
            "  public Test() {",
            "    {",
            "      Button button = new Button('My Button');",
            "      addChild(button);",
            "    }",
            "  }",
            "}");
    canvas.refresh();
    CanvasInfo button = getJavaInfoByName("button");
    //
    canvas.command_BOUNDS(button, new Point(10, 20), null);
    assertEditor(
        "public class Test extends Canvas {",
        "  public Test() {",
View Full Code Here

Examples of com.google.gdt.eclipse.designer.smart.model.CanvasInfo

        "  }",
        "}");
  }

  public void test_BOUNDS_setLocation_removeLeftTop() throws Exception {
    CanvasInfo canvas =
        parseJavaInfo(
            "public class Test extends Canvas {",
            "  public Test() {",
            "    {",
            "      Button button = new Button('My Button');",
            "      addChild(button);",
            "      button.setLeft(1);",
            "      button.setTop(2);",
            "    }",
            "  }",
            "}");
    canvas.refresh();
    CanvasInfo button = getJavaInfoByName("button");
    //
    canvas.command_BOUNDS(button, new Point(10, 20), null);
    assertEditor(
        "public class Test extends Canvas {",
        "  public Test() {",
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.