Examples of LayoutContainerInfo


Examples of com.google.gdt.eclipse.designer.gxt.model.widgets.LayoutContainerInfo

   * @return <code>true</code> if this {@link LayoutInfo} is active on its
   *         {@link LayoutContainerInfo}. For example implicit {@link LayoutInfo}'s replaced by
   *         "real" {@link LayoutInfo} are inactive.
   */
  public final boolean isActive() {
    LayoutContainerInfo container = getContainer();
    return isActiveOnContainer(container);
  }
View Full Code Here

Examples of com.google.gdt.eclipse.designer.gxt.model.widgets.LayoutContainerInfo

  ////////////////////////////////////////////////////////////////////////////
  /**
   * Adds new {@link WidgetInfo} using <code>LayoutContainer.add(Widget,LayoutData)</code>.
   */
  public void command_CREATE(WidgetInfo widget, WidgetInfo nextWidget) throws Exception {
    LayoutContainerInfo container = getContainer();
    AssociationObject association = getAssociation_();
    JavaInfoUtils.add(widget, association, container, nextWidget);
  }
View Full Code Here

Examples of com.google.gdt.eclipse.designer.gxt.model.widgets.LayoutContainerInfo

  /**
   * Moves {@link WidgetInfo} in/to this container using
   * <code>LayoutContainer.add(Widget,LayoutData)</code>.
   */
  public void command_MOVE(WidgetInfo widget, WidgetInfo nextWidget) throws Exception {
    LayoutContainerInfo container = getContainer();
    AssociationObject association = getAssociation_();
    JavaInfoUtils.move(widget, association, container, nextWidget);
  }
View Full Code Here

Examples of com.google.gdt.eclipse.designer.gxt.model.widgets.LayoutContainerInfo

        // if dangling LayoutData, ignore it
        if (widget == null) {
          return;
        }
        // if no parent with Layout, remove this LayoutData
        LayoutContainerInfo container = (LayoutContainerInfo) widget.getParent();
        if (container == null || !container.hasLayoutData()) {
          widget.removeChild(m_this);
        }
      }
    });
  }
View Full Code Here

Examples of com.google.gdt.eclipse.designer.gxt.model.widgets.LayoutContainerInfo

    assertEquals(0, fillData.getMarginBottom());
    assertEquals(0, fillData.getMarginLeft());
  }

  public void test_marginProperties_get() throws Exception {
    LayoutContainerInfo container =
        parseJavaInfo(
            "public class Test extends LayoutContainer {",
            "  public Test() {",
            "    setLayout(new FillLayout());",
            "    {",
            "      Button button = new Button();",
            "      add(button, new FillData(1, 2, 3, 4));",
            "    }",
            "  }",
            "}");
    container.refresh();
    WidgetInfo button = container.getWidgets().get(0);
    FillDataInfo fillData = FillLayoutInfo.getFillData(button);
    // check margins
    assertSame(Property.UNKNOWN_VALUE, fillData.getPropertyByTitle("margin-all").getValue());
    assertEquals(1, fillData.getPropertyByTitle("margin-top").getValue());
    assertEquals(2, fillData.getPropertyByTitle("margin-right").getValue());
View Full Code Here

Examples of com.google.gdt.eclipse.designer.gxt.model.widgets.LayoutContainerInfo

   * to avoid parsing exception at design time.
   * <p>
   * http://fogbugz.instantiations.com/fogbugz/default.asp?48001
   */
  public void test_parseNoListStore() throws Exception {
    LayoutContainerInfo container =
        parseJavaInfo(
            "// filler filler filler filler filler",
            "public class Test extends LayoutContainer {",
            "  public Test() {",
            "    ListField field = new ListField();",
View Full Code Here

Examples of com.google.gdt.eclipse.designer.gxt.model.widgets.LayoutContainerInfo

  //
  // Tests
  //
  ////////////////////////////////////////////////////////////////////////////
  public void test_setLayout() throws Exception {
    LayoutContainerInfo container =
        parseJavaInfo(
            "// filler filler filler",
            "public class Test extends LayoutContainer {",
            "  public Test() {",
            "  }",
            "}");
    // set CenterLayout
    CenterLayoutInfo layout = createJavaInfo("com.extjs.gxt.ui.client.widget.layout.CenterLayout");
    container.setLayout(layout);
    assertEditor(
        "// filler filler filler",
        "public class Test extends LayoutContainer {",
        "  public Test() {",
        "    setLayout(new CenterLayout());",
        "  }",
        "}");
    assertHierarchy(
        "{this: com.extjs.gxt.ui.client.widget.LayoutContainer} {this} {/setLayout(new CenterLayout())/}",
        "  {new: com.extjs.gxt.ui.client.widget.layout.CenterLayout} {empty} {/setLayout(new CenterLayout())/}");
    assertSame(layout, container.getLayout());
  }
View Full Code Here

Examples of com.google.gdt.eclipse.designer.gxt.model.widgets.LayoutContainerInfo

        "  {new: com.extjs.gxt.ui.client.widget.layout.CenterLayout} {empty} {/setLayout(new CenterLayout())/}");
    assertSame(layout, container.getLayout());
  }

  public void test_command_CREATE() throws Exception {
    LayoutContainerInfo container =
        parseJavaInfo(
            "public class Test extends LayoutContainer {",
            "  public Test() {",
            "    setLayout(new CenterLayout());",
            "  }",
            "}");
    container.refresh();
    CenterLayoutInfo layout = (CenterLayoutInfo) container.getLayout();
    //
    ComponentInfo newButton = createButton();
    layout.command_CREATE(newButton, null);
    assertEditor(
        "public class Test extends LayoutContainer {",
View Full Code Here

Examples of com.google.gdt.eclipse.designer.gxt.model.widgets.LayoutContainerInfo

  /**
   * Test for simple container support.
   */
  public void test_simpleContainer() throws Exception {
    LayoutContainerInfo container =
        parseJavaInfo(
            "public class Test extends LayoutContainer {",
            "  public Test() {",
            "    setLayout(new CenterLayout());",
            "  }",
            "}");
    container.refresh();
    CenterLayoutInfo layout = (CenterLayoutInfo) container.getLayout();
    SimpleContainer simpleContainer = new SimpleContainerFactory(layout, true).get().get(0);
    // empty initially
    assertTrue(simpleContainer.isEmpty());
    // add new Button
    ComponentInfo newButton = createButton();
View Full Code Here

Examples of com.google.gdt.eclipse.designer.gxt.model.widgets.LayoutContainerInfo

        "    {new: com.extjs.gxt.ui.client.widget.form.Radio} {local-unique: radio} {/new Radio()/ /group.add(radio)/}",
        "    {virtual-layout_data: com.extjs.gxt.ui.client.widget.layout.FormData} {virtual-layout-data} {}");
  }

  public void test_flowContainer() throws Exception {
    LayoutContainerInfo container =
        parseJavaInfo(
            "public class Test extends LayoutContainer {",
            "  public Test() {",
            "    setLayout(new FormLayout());",
            "    {",
            "      RadioGroup group = new RadioGroup();",
            "      add(group);",
            "    }",
            "  }",
            "}");
    container.refresh();
    //
    MultiFieldInfo group = getJavaInfoByName("group");
    FlowContainer flowContainer = new FlowContainerFactory(group, true).get().get(0);
    // don't accept generic Component
    {
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.