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

Examples of com.google.gdt.eclipse.designer.model.widgets.CompositeInfo.refresh()


            "// filler filler filler",
            "public class Test extends Composite {",
            "  public Test() {",
            "  }",
            "}");
    composite.refresh();
    assertThat(composite.getProperties()).isEmpty();
  }

  /**
   * If Composite has Widget, we show properties.
View Full Code Here


            "      Button button = new Button();",
            "      initWidget(button);",
            "    }",
            "  }",
            "}");
    composite.refresh();
    // prepare properties
    Property[] properties = composite.getProperties();
    assertThat(properties).isNotEmpty();
    // usual properties
    {
View Full Code Here

            "      Button button = new Button();",
            "      initWidget(button);",
            "    }",
            "  }",
            "}");
    composite.refresh();
    // add setWidth()
    composite.addMethodInvocation(
        "setWidth(java.lang.String)",
        StringConverter.INSTANCE.toJavaSource(null, "150px"));
    assertEditor(
View Full Code Here

        "    }",
        "    setWidth('150px');",
        "  }",
        "}");
    // refresh
    composite.refresh();
    assertNoErrors(composite);
  }

  /**
   * New method invocations should be added at the end of constructor.
View Full Code Here

            "      initWidget(button);",
            "      button.setSize('200px', '100px');",
            "    }",
            "  }",
            "}");
    composite.refresh();
    // check Composite bounds
    Rectangle bounds = composite.getBounds();
    assertEquals(new Rectangle(0, 0, 200, 100), bounds);
  }
View Full Code Here

            "      Button button = new Button();",
            "      initWidget(button);",
            "    }",
            "  }",
            "}");
    composite.refresh();
    // set external size
    composite.getTopBoundsSupport().setSize(300, 150);
    composite.refresh();
    // check Composite bounds
    Rectangle bounds = composite.getBounds();
View Full Code Here

            "  }",
            "}");
    composite.refresh();
    // set external size
    composite.getTopBoundsSupport().setSize(300, 150);
    composite.refresh();
    // check Composite bounds
    Rectangle bounds = composite.getBounds();
    assertEquals(new Rectangle(0, 0, 300, 150), bounds);
  }
View Full Code Here

            "      }",
            "    }",
            "    setSize('400px', '0px');",
            "  }",
            "}");
    composite.refresh();
    assertNoErrors(composite);
    // check Composite bounds
    Rectangle bounds = composite.getBounds();
    assertEquals(new Rectangle(0, 0, 400, 0), bounds);
  }
View Full Code Here

    // check hierarchy
    assertHierarchy(
        "{this: com.google.gwt.user.client.ui.Composite} {this} {/initWidget(grid)/}",
        "  {new: com.gwtext.client.widgets.grid.GridPanel} {local-unique: grid} {/new GridPanel()/ /initWidget(grid)/ /grid.setSize('300px', '200px')/}");
    // refresh()
    composite.refresh();
    assertNoErrors(composite);
    // check bounds
    {
      Rectangle compositeBounds = composite.getBounds();
      assertThat(compositeBounds.width).isEqualTo(300);
View Full Code Here

            "      GridPanel grid = new GridPanel();",
            "      flexTable.setWidget(0, 0, grid);",
            "    }",
            "  }",
            "}");
    composite.refresh();
    assertNoErrors(composite);
  }

  public void test_liveImage() throws Exception {
    RootPanelInfo frame =
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.