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

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


  //
  ////////////////////////////////////////////////////////////////////////////
  private void processTreeChildren(ObjectInfo parent, List<ObjectInfo> children) throws Exception {
    // exclude @UiChild widgets from parent
    if (parent instanceof WidgetInfo) {
      WidgetInfo widget = (WidgetInfo) parent;
      // may be support for @UiChild is disabled
      if (XmlObjectUtils.hasTrueParameter(widget, "UiChild.disabled")) {
        return;
      }
      // include Position objects
      {
        Map<String, Position> tagToPosition = getPositions(widget);
        for (Position position : tagToPosition.values()) {
          children.add(position);
          position.setParent(parent);
        }
      }
      // exclude widgets
      for (WidgetInfo child : widget.getChildren(WidgetInfo.class)) {
        Position position = getPosition(widget, child);
        if (position != null) {
          children.remove(child);
        }
      }
View Full Code Here


        "  <g:FlowPanel>",
        "    <g:Button wbp:name='button'/>",
        "  </g:FlowPanel>",
        "</ui:UiBinder>");
    refresh();
    WidgetInfo button = getObjectByName("button");
    // no @UiConstructor property
    {
      Property constructorProperty = PropertyUtils.getByPath(button, "UiConstructor");
      assertNull(constructorProperty);
    }
View Full Code Here

        "  <g:FlowPanel>",
        "    <t:MyButton wbp:name='button'/>",
        "  </g:FlowPanel>",
        "</ui:UiBinder>");
    refresh();
    WidgetInfo button = getObjectByName("button");
    // no UiConstructor property
    assertNull(button.getPropertyByTitle("UiConstructor"));
  }
View Full Code Here

        "  <g:FlowPanel>",
        "    <t:MyButton wbp:name='button' foo='1' bar='abc'/>",
        "  </g:FlowPanel>",
        "</ui:UiBinder>");
    refresh();
    WidgetInfo button = getObjectByName("button");
    // no UiConstructor property
    assertSame(null, button.getPropertyByTitle("UiConstructor"));
  }
View Full Code Here

        "  <g:FlowPanel>",
        "    <t:MyButton wbp:name='button' foo='1' bar='abc'/>",
        "  </g:FlowPanel>",
        "</ui:UiBinder>");
    refresh();
    WidgetInfo button = getObjectByName("button");
    // "foo"
    {
      Property fooProperty = PropertyUtils.getByPath(button, "UiConstructor/foo");
      assertNotNull(fooProperty);
      assertNotNull(fooProperty.getEditor());
View Full Code Here

        "  <g:FlowPanel>",
        "    <t:MyButton wbp:name='button' foo='1'/>",
        "  </g:FlowPanel>",
        "</ui:UiBinder>");
    refresh();
    WidgetInfo button = getObjectByName("button");
    // prepare property
    Property property = PropertyUtils.getByPath(button, "UiConstructor/foo");
    // initial value
    assertEquals(1, property.getValue());
    // set new value
View Full Code Here

            "<ui:UiBinder>",
            "  <g:FlowPanel/>",
            "</ui:UiBinder>");
    refresh();
    // do create
    WidgetInfo button = createObject("test.client.MyButton");
    flowContainer_CREATE(panel, button, null);
    assertXML(
        "// filler filler filler filler filler",
        "// filler filler filler filler filler",
        "<ui:UiBinder>",
View Full Code Here

            "  <g:FlowPanel/>",
            "</ui:UiBinder>");
    refresh();
    // do create
    try {
      WidgetInfo button = createObject("test.client.MyButton");
      flowContainer_CREATE(panel, button, null);
      fail();
    } catch (IllegalArgumentException e) {
      assertThat(e.getMessage()).contains(": long");
    }
View Full Code Here

  //
  // Tests
  //
  ////////////////////////////////////////////////////////////////////////////
  public void test_openWith_FlowPanel() throws Exception {
    WidgetInfo panel =
        openEditor(
            "// filler filler filler filler filler",
            "// filler filler filler filler filler",
            "<ui:UiBinder>",
            "  <g:FlowPanel/>",
View Full Code Here

  /**
   * This test exists mostly to get coverage of {@link EditPartFactory}.
   */
  public void test_noEditPart_forObjectInfo() throws Exception {
    WidgetInfo panel =
        openEditor(
            "// filler filler filler filler filler",
            "// filler filler filler filler filler",
            "<ui:UiBinder>",
            "  <g:FlowPanel/>",
            "</ui:UiBinder>");
    //
    ObjectInfo object = new TestObjectInfo();
    panel.addChild(object);
    panel.refresh();
    canvas.assertNullEditPart(object);
  }
View Full Code Here

TOP

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