Examples of ComplexPanelInfo


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

  //
  // 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

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

            "  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

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

  ////////////////////////////////////////////////////////////////////////////
  /**
   * 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

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

            "  @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

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

            "  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

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

            "  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

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

  }

  @DisposeProjectAfter
  public void test_reparseOnCss() throws Exception {
    dontUseSharedGWTState();
    ComplexPanelInfo panel =
        openEditor(
            "// filler filler filler filler filler",
            "// filler filler filler filler filler",
            "<ui:UiBinder>",
            "  <g:FlowPanel>",
            "    <g:Button wbp:name='button' styleName='test'/>",
            "  </g:FlowPanel>",
            "</ui:UiBinder>");
    WidgetInfo button = getObjectByName("button");
    // initially "button" is narrow
    assertThat(button.getBounds().width).isLessThan(100);
    // initially not reparse required
    {
      EditorActivatedRequest request = new EditorActivatedRequest();
      panel.getBroadcast(EditorActivatedListener.class).invoke(request);
      assertFalse(request.isReparseRequested());
      assertFalse(request.isRefreshRequested());
    }
    // update CSS in editor
    {
View Full Code Here

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

            "<ui:UiBinder>",
            "  <g:FlowPanel width='100px'/>",
            "</ui:UiBinder>"));
    waitForAutoBuild();
    // parse
    ComplexPanelInfo panel =
        parse(
            "// filler filler filler filler filler",
            "// filler filler filler filler filler",
            "<ui:UiBinder>",
            "  <g:FlowPanel>",
            "    <t:MyComponent wbp:name='component'/>",
            "  </g:FlowPanel>",
            "</ui:UiBinder>");
    refresh();
    WidgetInfo component = getObjectByName("component");
    // initially "100px"
    assertThat(component.getBounds().width).isEqualTo(100);
    // initially no refresh required
    {
      EditorActivatedRequest request = new EditorActivatedRequest();
      panel.getBroadcast(EditorActivatedListener.class).invoke(request);
      assertFalse(request.isReparseRequested());
      assertFalse(request.isRefreshRequested());
    }
    // update UiBinder template
    setFileContentSrc(
        "test/client/MyComponent.ui.xml",
        getTestSource(
            "// filler filler filler filler filler",
            "// filler filler filler filler filler",
            "// filler filler filler filler filler",
            "<ui:UiBinder>",
            "  <g:FlowPanel width='200px'/>"));
    waitForAutoBuild();
    // now reparse required
    {
      EditorActivatedRequest request = new EditorActivatedRequest();
      panel.getBroadcast(EditorActivatedListener.class).invoke(request);
      assertTrue(request.isReparseRequested());
      assertFalse(request.isRefreshRequested());
    }
  }
View Full Code Here

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

            "    add(new MyComponent());",
            "  }",
            "}"));
    waitForAutoBuild();
    // parse
    ComplexPanelInfo panel =
        parse(
            "// filler filler filler filler filler",
            "// filler filler filler filler filler",
            "<ui:UiBinder>",
            "  <g:FlowPanel>",
            "    <t:MyComponent2 wbp:name='component'/>",
            "  </g:FlowPanel>",
            "</ui:UiBinder>");
    refresh();
    WidgetInfo component = getObjectByName("component");
    // initially "100px"
    assertThat(component.getBounds().width).isEqualTo(100);
    // initially no refresh required
    {
      EditorActivatedRequest request = new EditorActivatedRequest();
      panel.getBroadcast(EditorActivatedListener.class).invoke(request);
      assertFalse(request.isReparseRequested());
      assertFalse(request.isRefreshRequested());
    }
    // update UiBinder template
    setFileContentSrc(
        "test/client/MyComponent.ui.xml",
        getTestSource(
            "// filler filler filler filler filler",
            "// filler filler filler filler filler",
            "// filler filler filler filler filler",
            "<ui:UiBinder>",
            "  <g:FlowPanel width='200px'/>"));
    waitForAutoBuild();
    // now reparse required
    {
      EditorActivatedRequest request = new EditorActivatedRequest();
      panel.getBroadcast(EditorActivatedListener.class).invoke(request);
      assertTrue(request.isReparseRequested());
      assertFalse(request.isRefreshRequested());
    }
  }
View Full Code Here

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

            "  }",
            "}"));
    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
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.