Examples of LayoutContainerInfo


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

  /**
   * Test for {@link MultiFieldInfo#isHorizontal()}.
   */
  public void test_isHorizontal_false() throws Exception {
    LayoutContainerInfo container =
        parseJavaInfo(
            "public class Test extends LayoutContainer {",
            "  public Test() {",
            "    setLayout(new FormLayout());",
            "    {",
            "      MultiField multiField = new MultiField();",
            "      multiField.setOrientation(Orientation.VERTICAL);",
            "      add(multiField);",
            "    }",
            "  }",
            "}");
    container.refresh();
    MultiFieldInfo multiField = (MultiFieldInfo) container.getWidgets().get(0);
    assertFalse(multiField.isHorizontal());
  }
View Full Code Here

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

        "}");
    assertEquals(0.8, columnData.getWidth(), 0.001);
  }

  public void test_ColumnData_setWidth_DEFAULT() throws Exception {
    LayoutContainerInfo container =
        parseJavaInfo(
            "public class Test extends LayoutContainer {",
            "  public Test() {",
            "    setLayout(new ColumnLayout());",
            "    {",
            "      Button button = new Button();",
            "      add(button, new ColumnData(100.0));",
            "    }",
            "  }",
            "}");
    container.refresh();
    WidgetInfo button = container.getWidgets().get(0);
    // initial state
    ColumnDataInfo columnData = ColumnLayoutInfo.getColumnData(button);
    assertEquals(100.0, columnData.getWidth(), 0.001);
    // set default
    columnData.setWidth(0);
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 CardLayout
    CardLayoutInfo layout = createJavaInfo("com.extjs.gxt.ui.client.widget.layout.CardLayout");
    container.setLayout(layout);
    assertEditor(
        "// filler filler filler",
        "public class Test extends LayoutContainer {",
        "  public Test() {",
        "    setLayout(new CardLayout());",
        "  }",
        "}");
    assertHierarchy(
        "{this: com.extjs.gxt.ui.client.widget.LayoutContainer} {this} {/setLayout(new CardLayout())/}",
        "  {new: com.extjs.gxt.ui.client.widget.layout.CardLayout} {empty} {/setLayout(new CardLayout())/}");
    assertSame(layout, container.getLayout());
  }
View Full Code Here

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

  //
  // Client area insets
  //
  ////////////////////////////////////////////////////////////////////////////
  public void test_CREATE() throws Exception {
    LayoutContainerInfo container =
        parseJavaInfo(
            "// filler filler filler filler filler",
            "public class Test extends LayoutContainer {",
            "  public Test() {",
            "  }",
            "}");
    refresh();
    // add new DualListField
    {
      FieldInfo newField = createJavaInfo("com.extjs.gxt.ui.client.widget.form.DualListField");
      container.getLayout().command_CREATE(newField);
    }
    assertEditor(
        "import com.extjs.gxt.ui.client.store.ListStore;",
        "// filler filler filler filler filler",
        "public class Test extends LayoutContainer {",
View Full Code Here

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

  /**
   * Test for flow container support.
   */
  public void test_flowContainer() throws Exception {
    LayoutContainerInfo container =
        parseJavaInfo(
            "public class Test extends LayoutContainer {",
            "  public Test() {",
            "    setLayout(new CardLayout());",
            "  }",
            "}");
    container.refresh();
    CardLayoutInfo layout = (CardLayoutInfo) container.getLayout();
    FlowContainer flowContainer = new FlowContainerFactory(layout, false).get().get(0);
    // add new Button
    ComponentInfo newButton = createButton();
    assertTrue(flowContainer.validateComponent(newButton));
    flowContainer.command_CREATE(newButton, null);
View Full Code Here

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

  //
  // Manage active
  //
  ////////////////////////////////////////////////////////////////////////////
  public void test_manageActive() throws Exception {
    LayoutContainerInfo container =
        parseJavaInfo(
            "public class Test extends LayoutContainer {",
            "  public Test() {",
            "    setLayout(new CardLayout());",
            "    {",
            "      Button button_1 = new Button();",
            "      add(button_1);",
            "    }",
            "    {",
            "      Button button_2 = new Button();",
            "      add(button_2);",
            "    }",
            "    {",
            "      Button button_3 = new Button();",
            "      add(button_3);",
            "    }",
            "  }",
            "}");
    container.refresh();
    List<WidgetInfo> widgets = container.getWidgets();
    // initially "button_1" is expanded
    assertActiveIndex(container, 0);
    // notify about "button_2"
    {
      boolean shouldRefresh = notifySelecting(widgets.get(1));
      assertTrue(shouldRefresh);
      container.refresh();
      // now "button_2" is expanded
      assertActiveIndex(container, 1);
    }
    // second notification about "button_2" does not cause refresh()
    {
View Full Code Here

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

  //
  // Canvas
  //
  ////////////////////////////////////////////////////////////////////////////
  public void test_canvas_CREATE() throws Exception {
    LayoutContainerInfo container =
        openLayoutContainer(
            "public class Test extends LayoutContainer {",
            "  public Test() {",
            "    setLayout(new AbsoluteLayout());",
            "  }",
View Full Code Here

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

        "  }",
        "}");
  }

  public void test_canvas_PASTE() throws Exception {
    LayoutContainerInfo container =
        openLayoutContainer(
            "public class Test extends LayoutContainer {",
            "  public Test() {",
            "    setLayout(new AbsoluteLayout());",
            "    {",
View Full Code Here

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

        "  }",
        "}");
  }

  public void test_canvas_MOVE() throws Exception {
    LayoutContainerInfo container =
        openLayoutContainer(
            "public class Test extends LayoutContainer {",
            "  public Test() {",
            "    setLayout(new AbsoluteLayout());",
            "    {",
View Full Code Here

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

        "  }",
        "}");
  }

  public void test_canvas_ADD() throws Exception {
    LayoutContainerInfo container =
        openLayoutContainer(
            "public class Test extends LayoutContainer {",
            "  public Test() {",
            "    setLayout(new AbsoluteLayout());",
            "    {",
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.