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

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


  /**
   * Test for removing last column.
   */
  public void test_columns_DELETE_asArray() throws Exception {
    ComplexPanelInfo panel =
        parseJavaInfo(
            "import java.util.Arrays;",
            "import com.extjs.gxt.ui.client.store.*;",
            "import com.extjs.gxt.ui.client.widget.grid.*;",
            "public class Test extends com.google.gwt.user.client.ui.HorizontalPanel {",
            "  public Test() {",
            "    {",
            "      ColumnConfig column = new ColumnConfig();",
            "      Grid grid = new Grid(new ListStore(), new ColumnModel(Arrays.asList(column)));",
            "      add(grid);",
            "    }",
            "  }",
            "}");
    panel.refresh();
    GridInfo grid = getJavaInfoByName("grid");
    ColumnConfigInfo column = getJavaInfoByName("column");
    //
    assertThat(column.canDelete()).isTrue();
    column.delete();
    panel.refresh();
    //
    assertNoLoggedExceptions();
    assertNoErrors(grid);
    assertEditor(
        "import java.util.Arrays;",
View Full Code Here


    container.refresh();
    assertNoErrors(container);
  }

  public void test_CREATE() throws Exception {
    ComplexPanelInfo panel =
        parseJavaInfo(
            "public class Test extends com.google.gwt.user.client.ui.HorizontalPanel {",
            "  public Test() {",
            "  }",
            "}");
    panel.refresh();
    // prepare new Grid
    WidgetInfo newGrid = createJavaInfo("com.extjs.gxt.ui.client.widget.treegrid.TreeGrid");
    // check "live image"
    {
      Image liveImage = newGrid.getImage();
      assertEquals(302, liveImage.getBounds().width);
      assertEquals(202, liveImage.getBounds().height);
    }
    // do create
    panel.command_CREATE2(newGrid, null);
    assertEditor(
        "import com.extjs.gxt.ui.client.widget.treegrid.TreeGrid;",
        "import com.extjs.gxt.ui.client.store.TreeStore;",
        "import com.extjs.gxt.ui.client.widget.grid.ColumnModel;",
        "import java.util.ArrayList;",
View Full Code Here

*
* @author scheglov_ke
*/
public class ComboBoxTest extends GxtModelTest {
  public void test_CREATE() throws Exception {
    ComplexPanelInfo panel =
        parseJavaInfo(
            "public class Test extends com.google.gwt.user.client.ui.HorizontalPanel {",
            "  public Test() {",
            "  }",
            "}");
    panel.refresh();
    // prepare new ComboBox
    WidgetInfo newCombo = createJavaInfo("com.extjs.gxt.ui.client.widget.form.ComboBox");
    // do create
    panel.command_CREATE2(newCombo, null);
    assertEditor(
        "import com.extjs.gxt.ui.client.store.ListStore;",
        "public class Test extends com.google.gwt.user.client.ui.HorizontalPanel {",
        "  public Test() {",
        "    {",
        "      ComboBox comboBox = new ComboBox();",
        "      comboBox.setStore(new ListStore());",
        "      add(comboBox);",
        "      comboBox.setFieldLabel('New ComboBox');",
        "    }",
        "  }",
        "}");
    panel.refresh();
    assertNoErrors(panel);
  }
View Full Code Here

  //
  // Commands
  //
  ////////////////////////////////////////////////////////////////////////////
  public void test_flowContainers() throws Exception {
    ComplexPanelInfo panel =
        parseJavaInfo(
            "// filler filler filler filler filler",
            "public class Test extends FlowPanel {",
            "  public Test() {",
            "  }",
View Full Code Here

            "      rootPanel.add(flowPanel_2);",
            "    }",
            "  }",
            "}");
    frame.refresh();
    ComplexPanelInfo panel_2 = getJavaInfoByName("flowPanel_2");
    WidgetInfo button = getJavaInfoByName("button");
    // do ADD
    flowContainer_MOVE(panel_2, button, null);
    assertEditor(
        "public class Test implements EntryPoint {",
View Full Code Here

      assertThat(bounds.height).isGreaterThan(120);
    }
  }

  public void test_createCellTable() throws Exception {
    ComplexPanelInfo panel =
        parseJavaInfo(
            "// filler filler filler filler filler",
            "// filler filler filler filler filler",
            "public class Test extends FlowPanel {",
            "  public Test() {",
View Full Code Here

        "  }",
        "}");
  }

  public void test_clipboard() throws Exception {
    final ComplexPanelInfo panel =
        parseJavaInfo(
            "public class Test extends FlowPanel {",
            "  public Test() {",
            "    {",
            "      CellTable<User> table = new CellTable<User>();",
View Full Code Here

TOP

Related Classes of com.google.gdt.eclipse.designer.model.widgets.panels.ComplexPanelInfo

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.