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

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


        "  <g:FlowPanel>",
        "    <g:Button wbp:name='button' ui:field='button'/>",
        "  </g:FlowPanel>",
        "</ui:UiBinder>");
    refresh();
    WidgetInfo button = getObjectByName("button");
    //
    Property property = PropertyUtils.getByPath(button, "Events/onClick");
    assertTrue(property.isModified());
    assertEquals("someMethod", getPropertyText(property));
    // do open
View Full Code Here


        "  <g:FlowPanel>",
        "    <g:Button wbp:name='button'/>",
        "  </g:FlowPanel>",
        "</ui:UiBinder>");
    refresh();
    WidgetInfo button = getObjectByName("button");
    //
    Property property = PropertyUtils.getByPath(button, "Events/onClick");
    assertFalse(property.isModified());
    // do open
    openListener(property);
View Full Code Here

        "    <g:Button ui:field='existing'/>",
        "    <g:Button wbp:name='button'/>",
        "  </g:FlowPanel>",
        "</ui:UiBinder>");
    refresh();
    WidgetInfo button = getObjectByName("button");
    //
    Property property = PropertyUtils.getByPath(button, "Events/onClick");
    assertFalse(property.isModified());
    // do open
    openListener(property);
View Full Code Here

        "  <g:FlowPanel>",
        "    <g:Button wbp:name='button'/>",
        "  </g:FlowPanel>",
        "</ui:UiBinder>");
    refresh();
    WidgetInfo button = getObjectByName("button");
    //
    Property property = PropertyUtils.getByPath(button, "Events/onClick");
    assertFalse(property.isModified());
    // try to remove, nothing happens
    property.setValue(Property.UNKNOWN_VALUE);
View Full Code Here

        "  <g:FlowPanel>",
        "    <g:Button wbp:name='button' ui:field='button'/>",
        "  </g:FlowPanel>",
        "</ui:UiBinder>");
    refresh();
    WidgetInfo button = getObjectByName("button");
    //
    final Property property = PropertyUtils.getByPath(button, "Events/onClick");
    assertTrue(property.isModified());
    assertEquals("someMethod", getPropertyText(property));
    // do remove
View Full Code Here

        "  <g:FlowPanel>",
        "    <g:Button wbp:name='button' ui:field='button'/>",
        "  </g:FlowPanel>",
        "</ui:UiBinder>");
    refresh();
    WidgetInfo button = getObjectByName("button");
    //
    IMenuManager contextMenu = getContextMenu(button);
    // check action for existing "onClick" event
    {
      IAction action = findChildAction(contextMenu, "onClick -> onButtonClick");
View Full Code Here

        "  <g:FlowPanel>",
        "      <c:CellTable wbp:name='cellTable' ui:field='cellTable'/>",
        "  </g:FlowPanel>",
        "</ui:UiBinder>");
    refresh();
    WidgetInfo cellTable = getObjectByName("cellTable");
    // we have actual object
    Object cellTableObject = cellTable.getObject();
    assertEquals(
        "com.google.gwt.user.cellview.client.CellTable",
        cellTableObject.getClass().getName());
    // has reasonable size (we fill it with columns and items)
    {
      Rectangle bounds = cellTable.getBounds();
      assertThat(bounds.width).isGreaterThan(200).isLessThan(300);
      assertThat(bounds.height).isGreaterThan(150);
    }
  }
View Full Code Here

        "  <g:FlowPanel>",
        "      <c:CellTable wbp:name='cellTable' ui:field='cellTable'/>",
        "  </g:FlowPanel>",
        "</ui:UiBinder>");
    refresh();
    WidgetInfo cellTable = getObjectByName("cellTable");
    // we have actual object
    Object cellTableObject = cellTable.getObject();
    assertEquals("test.client.MyCellTable", cellTableObject.getClass().getName());
    // has reasonable size (we fill it with columns and items)
    {
      Rectangle bounds = cellTable.getBounds();
      assertThat(bounds.width).isGreaterThan(200).isLessThan(300);
      assertThat(bounds.height).isGreaterThan(150);
    }
  }
View Full Code Here

            "}",
            ".two {}"));
    waitForAutoBuild();
    // parse
    dontUseSharedGWTState();
    WidgetInfo panel =
        parse(
            "// filler filler filler filler filler",
            "// filler filler filler filler filler",
            "<ui:UiBinder>",
            "  <ui:with field='resources' type='test.client.MyResources'/>",
            "  <g:FlowPanel styleName='{resources.style.one}'/>",
            "</ui:UiBinder>");
    refresh();
    //
    Property styleProperty = panel.getPropertyByTitle("styleName");
    Property colorProperty = PropertyUtils.getByPath(styleProperty, "color");
    // initial state
    assertEquals("red", getPropertyText(colorProperty));
    assertEquals("red", getComputedStyleAttribute(panel, "color"));
    // set new value
View Full Code Here

  @DisposeProjectAfter
  public void test_ClientBundle_reloadCreate() throws Exception {
    prepare_ClientBundle_reloadCreate();
    // parse
    dontUseSharedGWTState();
    WidgetInfo panel =
        parse(
            "// filler filler filler filler filler",
            "// filler filler filler filler filler",
            "<ui:UiBinder>",
            "  <ui:with field='resources' type='test.client.MyResources'/>",
            "  <g:FlowPanel styleName='{resources.style.one}'/>",
            "</ui:UiBinder>");
    refresh();
    //
    Property styleProperty = panel.getPropertyByTitle("styleName");
    Property colorProperty = PropertyUtils.getByPath(styleProperty, "color");
    // initial state
    assertEquals("red", getPropertyText(colorProperty));
    assertEquals("red", getComputedStyleAttribute(panel, "color"));
    // set new value
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.