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

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


  ////////////////////////////////////////////////////////////////////////////
  /**
   * Use {@link DeviceSelectionSupport#setDevice(IUIObjectInfo, DeviceInfo)} directly.
   */
  public void test_setDevice() throws Exception {
    ComplexPanelInfo originalPanel;
    {
      originalPanel =
          openEditor(
              "// filler filler filler filler filler",
              "// filler filler filler filler filler",
View Full Code Here


            "  }",
            "}"));
    waitForAutoBuild();
    // parse
    dontUseSharedGWTState();
    ComplexPanelInfo panel =
        parse(
            "// filler filler filler filler filler",
            "// filler filler filler filler filler",
            "<ui:UiBinder xmlns:c='urn:import:com.google.gwt.user.cellview.client'>",
            "  <g:FlowPanel/>",
View Full Code Here

            "  interface Binder extends UiBinder<Widget, Test> {}",
            "  @UiField Button button;",
            "}"));
    waitForAutoBuild();
    // parse
    ComplexPanelInfo panel =
        parse(
            "// filler filler filler filler filler",
            "// filler filler filler filler filler",
            "<ui:UiBinder>",
            "  <g:FlowPanel>",
            "    <g:Button ui:field='button' text='AAA'/>",
            "  </g:FlowPanel>",
            "</ui:UiBinder>");
    assertHierarchy(
        "// filler filler filler filler filler",
        "// filler filler filler filler filler",
        "<g:FlowPanel>",
        "  <g:Button ui:field='button' text='AAA'>");
    refresh();
    WidgetInfo button = panel.getChildrenWidgets().get(0);
    // morph button
    MorphingTargetDescription morphingTarget = null;
    {
      for (MorphingTargetDescription target : button.getDescription().getMorphingTargets()) {
        if ("com.google.gwt.user.client.ui.Label".equals(target.getComponentClass().getName())) {
View Full Code Here

            "  interface Binder extends UiBinder<Widget, Test> {}",
            "  @UiField FlowPanel panel;",
            "}"));
    waitForAutoBuild();
    // parse
    ComplexPanelInfo panel =
        parse(
            "// filler filler filler filler filler",
            "// filler filler filler filler filler",
            "<ui:UiBinder>",
            "  <g:FlowPanel ui:field='panel'>",
            "    <g:Button text='AAA'/>",
            "  </g:FlowPanel>",
            "</ui:UiBinder>");
    assertHierarchy(
        "// filler filler filler filler filler",
        "// filler filler filler filler filler",
        "<g:FlowPanel ui:field='panel'>",
        "  <g:Button text='AAA'>");
    refresh();
    // prepare target
    MorphingTargetDescription morphingTarget = null;
    {
      for (MorphingTargetDescription target : panel.getDescription().getMorphingTargets()) {
        if ("com.google.gwt.user.client.ui.HorizontalPanel".equals(target.getComponentClass().getName())) {
          morphingTarget = target;
          break;
        }
      }
View Full Code Here

  //
  // Tests
  //
  ////////////////////////////////////////////////////////////////////////////
  public void test_access() throws Exception {
    ComplexPanelInfo panel =
        parse(
            "// filler filler filler filler filler",
            "// filler filler filler filler filler",
            "<ui:UiBinder>",
            "  <g:FlowPanel/>",
            "</ui:UiBinder>");
    refresh();
    //
    Property property = panel.getPropertyByTitle("UiField");
    assertNotNull(property);
    assertTrue(property.getCategory().isSystem());
    // adapter
    assertThat(getPropertyTooltipText(property)).isNotEmpty();
    assertThat(property.getAdapter(Object.class)).isNull();
View Full Code Here

            "  private Object existingName;",
            "  public Test() {",
            "    initWidget(binder.createAndBindUi(this));",
            "  }",
            "}"));
    ComplexPanelInfo panel =
        parse(
            "// filler filler filler filler filler",
            "// filler filler filler filler filler",
            "<ui:UiBinder>",
            "  <g:FlowPanel/>",
            "</ui:UiBinder>");
    refresh();
    // prepare property
    final Property property = panel.getPropertyByTitle("UiField");
    // no value initially
    assertFalse(property.isModified());
    assertEquals(Property.UNKNOWN_VALUE, property.getValue());
    // duplicate name
    new UiContext().executeAndCheck(new UIRunnable() {
View Full Code Here

  ////////////////////////////////////////////////////////////////////////////
  /**
   * Test for @UiChild annotation {@link Property}.
   */
  public void test_positionProperties_notWidget() throws Exception {
    ComplexPanelInfo panel =
        parse(
            "// filler filler filler filler filler",
            "// filler filler filler filler filler",
            "<ui:UiBinder>",
            "  <g:FlowPanel/>",
            "</ui:UiBinder>");
    refresh();
    // use artificial "testObject" to ask properties, just to get coverage of not Widget case
    XmlObjectInfo testObject =
        new XmlObjectInfo(m_lastContext, panel.getDescription(), panel.getCreationSupport());
    // no "UiChild" property
    {
      Property uiChildProperty = PropertyUtils.getByPath(testObject, "UiChild");
      assertNull(uiChildProperty);
    }
View Full Code Here

            "  @UiField FlowPanel oldName;",
            "  public Test() {",
            "    initWidget(binder.createAndBindUi(this));",
            "  }",
            "}"));
    ComplexPanelInfo panel =
        openEditor(
            "// filler filler filler filler filler",
            "// filler filler filler filler filler",
            "<ui:UiBinder>",
            "  <g:FlowPanel ui:field='oldName'/>",
            "</ui:UiBinder>");
    // initially we know root
    assertSame(panel, m_lastObject);
    //
    Property property = panel.getPropertyByTitle("UiField");
    property.setValue("newName");
    // still same root
    assertSame(panel, m_lastObject);
    // ...and expected content
    assertXML(
View Full Code Here

            "  public MyButton(String attString, boolean attBoolean, int attInt, double attDouble) {",
            "  }",
            "}"));
    waitForAutoBuild();
    // parse
    ComplexPanelInfo panel =
        parse(
            "// filler filler filler filler filler",
            "// filler filler filler filler filler",
            "<ui:UiBinder>",
            "  <g:FlowPanel/>",
View Full Code Here

            "  public MyButton(long attLong) {",
            "  }",
            "}"));
    waitForAutoBuild();
    // parse
    ComplexPanelInfo panel =
        parse(
            "// filler filler filler filler filler",
            "// filler filler filler filler filler",
            "<ui:UiBinder>",
            "  <g:FlowPanel/>",
View Full Code Here

TOP

Related Classes of com.google.gdt.eclipse.designer.uibinder.model.widgets.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.