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

Examples of com.google.gdt.eclipse.designer.model.widgets.cell.CellTableInfo


        "    }",
        "  }",
        "}");
    refresh();
    assertNoErrors(m_lastParseInfo);
    CellTableInfo cellTable = getJavaInfoByName("cellTable");
    // 1 column initially
    assertThat(cellTable.getColumns()).hasSize(1);
    // add new Column
    ColumnInfo newColumn = createJavaInfo("com.google.gwt.user.cellview.client.Column");
    flowContainer_CREATE(cellTable, newColumn, null);
    assertThat(cellTable.getColumns()).hasSize(2);
    assertNoErrors(m_lastParseInfo);
    assertEditor(
        "public class Test extends FlowPanel {",
        "  public Test() {",
        "    CellTable<User> cellTable = new CellTable<User>();",
View Full Code Here


            "  public Test() {",
            "  }",
            "}");
    refresh();
    // add new CellTable
    CellTableInfo cellTable;
    {
      cellTable = createJavaInfo("com.google.gwt.user.cellview.client.CellTable");
      cellTable.putTemplateArgument("rowType", "test.client.User");
      flowContainer_CREATE(panel, cellTable, null);
    }
    assertEditor(
        "// filler filler filler filler filler",
        "public class Test extends FlowPanel {",
        "  public Test() {",
        "    {",
        "      CellTable<User> cellTable = new CellTable<User>();",
        "      add(cellTable);",
        "    }",
        "  }",
        "}");
    assertThat(cellTable.getColumns()).isEmpty();
    // add new Column
    {
      ColumnInfo column = createJavaInfo("com.google.gwt.user.cellview.client.Column");
      flowContainer_CREATE(cellTable, column, null);
      assertThat(cellTable.getColumns()).containsExactly(column);
    }
    assertEditor(
        "// filler filler filler filler filler",
        "public class Test extends FlowPanel {",
        "  public Test() {",
View Full Code Here

        "    }",
        "  }",
        "}");
    refresh();
    //
    CellTableInfo cellTable = getJavaInfoByName("cellTable");
    assertNoErrors(cellTable);
    // create column
    ColumnInfo newColumn = createJavaInfo("com.google.gwt.user.cellview.client.Column", creationId);
    flowContainer_CREATE(cellTable, newColumn, null);
    // check
    assertNoErrors(m_lastParseInfo);
    assertThat(cellTable.getColumns()).hasSize(1);
    assertEditor(source);
    // presentation icon
    assertSame(
        newColumn.getPresentation().getIcon(),
        newColumn.getDescription().getCreation(creationId).getIcon());
View Full Code Here

        "    }",
        "  }",
        "}");
    refresh();
    assertNoErrors(m_lastParseInfo);
    CellTableInfo cellTable = getJavaInfoByName("cellTable");
    // columns
    List<ColumnInfo> columns = cellTable.getColumns();
    assertThat(columns).hasSize(5);
    // check columns
    assert_column_header(columns.get(0), true, false, null, "col1");
    assert_column_header(columns.get(1), true, true, "Column 2", null);
    assert_column_header(columns.get(2), true, true, "Column 3", "col3");
View Full Code Here

        "  }",
        "}");
    refresh();
    assertNoErrors(m_lastParseInfo);
    //
    CellTableInfo cellTable = getJavaInfoByName("cellTable");
    List<ColumnInfo> columns = cellTable.getColumns();
    assertThat(columns.size()).isEqualTo(2);
    ColumnInfo exposedColumn = columns.get(0);
    ColumnInfo column = columns.get(1);
    assertThat(column).isNotSameAs(exposedColumn);
    // check
View Full Code Here

        "      cellTable.addColumn(column, new TextHeader('Column'), new TextHeader('Footer'));",
        "    }",
        "    add(cellTable);",
        "  }",
        "}");
    CellTableInfo cellTable = getJavaInfoByName("cellTable");
    List<ColumnInfo> columns = cellTable.getColumns();
    assertThat(columns.size()).isEqualTo(2);
    check_noDirectEdit(columns.get(0));
    check_noDirectEdit(columns.get(1));
  }
View Full Code Here

  ////////////////////////////////////////////////////////////////////////////
  private AbstractHasDataInfo test_parse(String... lines) throws Exception {
    parseJavaInfo(lines);
    refresh();
    assertNoErrors(m_lastParseInfo);
    CellTableInfo cellTable = getJavaInfoByName("cellTable");
    // check class
    {
      Class<?> classCellTable =
          m_lastLoader.loadClass("com.google.gwt.user.cellview.client.CellTable");
      assertSame(classCellTable, cellTable.getObject().getClass());
    }
    // check size
    {
      Dimension size = cellTable.getBounds().getSize();
      assertThat(size.width).isGreaterThan(200);
      assertThat(size.height).isGreaterThan(50);
    }
    // check columns
    {
      List<ColumnInfo> columns = cellTable.getChildren(ColumnInfo.class);
      assertThat(columns).hasSize(2);
      return cellTable;
    }
  }
View Full Code Here

        "    CellTable cellTable = new CellTable();",
        "    add(cellTable);",
        "  }",
        "}");
    refresh();
    CellTableInfo cellTable = getJavaInfoByName("cellTable");
    // has reasonable size
    {
      Rectangle bounds = cellTable.getBounds();
      assertThat(bounds.width).isGreaterThan(200).isLessThan(300);
      assertThat(bounds.height).isGreaterThan(150);
    }
  }
View Full Code Here

        "      add(cellTable);",
        "    }",
        "  }",
        "}");
    refresh();
    CellTableInfo table = getJavaInfoByName("cellTable");
    // should have only one MyColumn
    {
      Rectangle bounds = table.getBounds();
      assertThat(bounds.width).isEqualTo(MCW);
    }
  }
View Full Code Here

        "    }",
        "  }",
        "}");
    refresh();
    assertNoErrors(m_lastParseInfo);
    CellTableInfo cellTable = getJavaInfoByName("cellTable");
    // has reasonable size
    {
      Rectangle bounds = cellTable.getBounds();
      assertThat(bounds.width).isGreaterThan(200).isLessThan(300);
      assertThat(bounds.height).isGreaterThan(120);
    }
  }
View Full Code Here

TOP

Related Classes of com.google.gdt.eclipse.designer.model.widgets.cell.CellTableInfo

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.