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

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


  ////////////////////////////////////////////////////////////////////////////
  /**
   * Use predefined creation for "Integer" type.
   */
  public void test_createInteger() throws Exception {
    ComplexPanelInfo panel =
        parseJavaInfo(
            "// filler filler filler filler filler",
            "public class Test extends FlowPanel {",
            "  public Test() {",
            "  }",
View Full Code Here


  /**
   * Use default creation, with "type" type argument.
   */
  public void test_createGeneric() throws Exception {
    ComplexPanelInfo panel =
        parseJavaInfo(
            "// filler filler filler filler filler",
            "public class Test extends FlowPanel {",
            "  public Test() {",
            "  }",
View Full Code Here

  //
  // Commands
  //
  ////////////////////////////////////////////////////////////////////////////
  public void test_flowContainers() throws Exception {
    ComplexPanelInfo panel =
        parseJavaInfo(
            "// filler filler filler filler filler",
            "public class Test extends HorizontalPanel {",
            "  public Test() {",
            "  }",
View Full Code Here

            "      rootPanel.setWidgetTopHeight(button_2, 150, Unit.PX, 50, Unit.PX);",
            "    }",
            "  }",
            "}");
    frame.refresh();
    ComplexPanelInfo panel = getJavaInfoByName("panel");
    WidgetInfo button = getJavaInfoByName("button_1");
    //
    panel.command_MOVE2(button, null);
    assertEditor(
        "public class Test implements EntryPoint {",
        "  public void onModuleLoad() {",
        "    RootLayoutPanel rootPanel = RootLayoutPanel.get();",
        "    {",
View Full Code Here

  //
  // Canvas
  //
  ////////////////////////////////////////////////////////////////////////////
  public void test_canvas_CREATE_MenuBar() throws Exception {
    ComplexPanelInfo panel =
        openJavaInfo(
            "// filler filler filler filler filler",
            "// filler filler filler filler filler",
            "public class Test extends FlowPanel {",
            "  public Test() {",
View Full Code Here

  //
  // Tree
  //
  ////////////////////////////////////////////////////////////////////////////
  public void test_tree_CREATE_MenuBar() throws Exception {
    ComplexPanelInfo panel =
        openJavaInfo(
            "// filler filler filler filler filler",
            "// filler filler filler filler filler",
            "public class Test extends FlowPanel {",
            "  public Test() {",
View Full Code Here

  }

  @DisposeProjectAfter
  public void test_reparseOnCss_andDontHurtCoordinates() throws Exception {
    dontUseSharedGWTState();
    ComplexPanelInfo panel =
        parseJavaInfo(
            "// filler filler filler filler filler",
            "public class Test extends AbsolutePanel {",
            "  public Test() {",
            "    setStyleName('test');",
            "  }",
            "}");
    refresh();
    // update CSS
    setFileContent(
        "war/Module.css",
        getSourceDQ(
            "/* filler filler filler filler filler */",
            "/* filler filler filler filler filler */",
            "/* filler filler filler filler filler */",
            ".test {",
            "  border: red 10px solid;",
            "}"));
    waitForAutoBuild();
    // now refresh required
    {
      EditorActivatedRequest request = new EditorActivatedRequest();
      panel.getBroadcast(EditorActivatedListener.class).invoke(request);
      assertFalse(request.isReparseRequested());
      assertTrue(request.isRefreshRequested());
    }
    // do refresh, as requested
    refresh();
    // assert that screen shot is correct and border is fully included
    {
      Image image = panel.getImage();
      int width = image.getBounds().width;
      int height = image.getBounds().height;
      assertRGB(getPixelRGB(image, 0, 0), 0xFF, 0, 0);
      assertRGB(getPixelRGB(image, width - 1, 0), 0xFF, 0, 0);
      assertRGB(getPixelRGB(image, 0, height - 1), 0xFF, 0, 0);
View Full Code Here

        "      rootPanel.setWidgetLeftWidth(button, 10, Unit.PX, 150, Unit.PX);",
        "      rootPanel.setWidgetTopHeight(button, 250, Unit.PX, 50, Unit.PX);",
        "    }",
        "  }",
        "}");
    ComplexPanelInfo panel = getJavaInfoByName("panel");
    WidgetInfo button = getJavaInfoByName("button");
    //
    canvas.beginDrag(button).dragTo(panel, 10, 0.5).endDrag();
    assertEditor(
        "public class Test implements EntryPoint {",
View Full Code Here

            "  }",
            "}");
    frame.refresh();
    StackPanelInfo panel = (StackPanelInfo) frame.getChildrenWidgets().get(0);
    WidgetInfo button_1 = panel.getChildrenWidgets().get(0);
    ComplexPanelInfo flowPanel = (ComplexPanelInfo) panel.getChildrenWidgets().get(1);
    WidgetInfo button_2 = flowPanel.getChildrenWidgets().get(0);
    assertTrue(isVisible(button_1));
    assertFalse(isVisible(flowPanel));
    // send "selecting" broadcast
    String expectedSource = m_lastEditor.getSource();
    {
View Full Code Here

            "      button.setEnabled(true);",
            "    }",
            "  }",
            "}");
    frame.refresh();
    ComplexPanelInfo panel = (ComplexPanelInfo) frame.getChildrenWidgets().get(0);
    WidgetInfo button = panel.getChildrenWidgets().get(0);
    // prepare accessor
    ExpressionAccessor accessor = new CellExpressionAccessor(panel, "setFoo", "int");
    // initially no Expression
    assertNull(accessor.getExpression(button));
    // try to remove Expression, no changes
View Full Code Here

TOP

Related Classes of com.google.gdt.eclipse.designer.model.widgets.panels.ComplexPanelInfo

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.