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

Examples of com.google.gdt.eclipse.designer.model.widgets.WidgetInfo


            "  }",
            "}");
    frame.refresh();
    TabLayoutPanelInfo panel = getJavaInfoByName("panel");
    //
    WidgetInfo newButton = createButton();
    panel.command_CREATE2(newButton, null);
    assertEditor(
        "public class Test implements EntryPoint {",
        "  public void onModuleLoad() {",
        "    RootLayoutPanel rootPanel = RootLayoutPanel.get();",
View Full Code Here


            "  }",
            "}");
    frame.refresh();
    TabLayoutPanelInfo panel = getJavaInfoByName("panel");
    //
    WidgetInfo button = getJavaInfoByName("button");
    panel.command_MOVE2(button, null);
    assertEditor(
        "public class Test implements EntryPoint {",
        "  public void onModuleLoad() {",
        "    RootLayoutPanel rootPanel = RootLayoutPanel.get();",
View Full Code Here

            "  }",
            "}");
    panel.refresh();
    //
    {
      WidgetInfo myButton = getJavaInfoByName("myButton");
      doCopyPaste(myButton, new PasteProcedure<WidgetInfo>() {
        public void run(WidgetInfo copy) throws Exception {
          panel.command_CREATE2(copy, null);
        }
      });
View Full Code Here

            "      add(button_2, 'B', false);",
            "    }",
            "  }",
            "}");
    container.refresh();
    WidgetInfo button_1 = getJavaInfoByName("button_1");
    WidgetInfo button_2 = getJavaInfoByName("button_2");
    // initially "button_1" is active
    assertActiveWidget(container, button_1);
    // notify about "button_2"
    {
      boolean shouldRefresh = notifySelecting(button_2);
View Full Code Here

            "    }",
            "  }",
            "}");
    frame.refresh();
    //
    WidgetInfo button = getJavaInfoByName("button");
    assertNotNull(PropertyUtils.getByPath(button, "Cell"));
  }
View Full Code Here

        "      Button button = new Button();",
        "      add(button);",
        "    }",
        "  }",
        "}");
    WidgetInfo button = getJavaInfoByName("button");
    // use canvas
    canvas.beginDrag(button).target(button).outX(+10).inY(0.5).drag().endDrag();
    assertEditor(
        "public class Test extends LayoutContainer {",
        "  public Test() {",
View Full Code Here

        "      add(button);",
        "    }",
        "  }",
        "}");
    LayoutContainerInfo container = getJavaInfoByName("container");
    WidgetInfo button = getJavaInfoByName("button");
    // use canvas
    canvas.beginDrag(button).dragTo(container, 10, 10).endDrag();
    assertEditor(
        "public class Test extends LayoutContainer {",
        "  public Test() {",
View Full Code Here

  //
  // Tests
  //
  ////////////////////////////////////////////////////////////////////////////
  public void test_noSizeInvocations() throws Exception {
    WidgetInfo panel =
        parseJavaInfo(
            "// filler filler filler filler filler",
            "public class Test extends HorizontalPanel {",
            "  public Test() {",
            "  }",
            "}");
    panel.refresh();
    // initial size
    {
      Rectangle bounds = panel.getBounds();
      assertEquals(450, bounds.width);
      assertEquals(300, bounds.height);
    }
    // set bounds
    int newWidth = 500;
    int newHeight = 350;
    panel.getTopBoundsSupport().setSize(newWidth, newHeight);
    assertEditor(
        "// filler filler filler filler filler",
        "public class Test extends HorizontalPanel {",
        "  public Test() {",
        "  }",
        "}");
    // check that size applied
    panel.refresh();
    {
      Rectangle bounds = panel.getBounds();
      assertEquals(newWidth, bounds.width);
      assertEquals(newHeight, bounds.height);
    }
  }
View Full Code Here

            "      add(button, data);",
            "    }",
            "  }",
            "}");
    container.refresh();
    WidgetInfo button = container.getWidgets().get(0);
    VBoxLayoutDataInfo boxData = VBoxLayoutInfo.getVBoxData(button);
    // current value
    assertEquals(2, boxData.getFlex());
    // set new value
    boxData.setFlex(3);
View Full Code Here

            "      add(button, new VBoxLayoutData(1, 2, 3, 4));",
            "    }",
            "  }",
            "}");
    container.refresh();
    WidgetInfo button = container.getWidgets().get(0);
    VBoxLayoutDataInfo boxData = VBoxLayoutInfo.getVBoxData(button);
    // check margins
    assertEquals(1, boxData.getMarginTop());
    assertEquals(2, boxData.getMarginRight());
    assertEquals(3, boxData.getMarginBottom());
View Full Code Here

TOP

Related Classes of com.google.gdt.eclipse.designer.model.widgets.WidgetInfo

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.