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

Examples of com.google.gdt.eclipse.designer.model.widgets.panels.grid.HTMLTableInfo


            "    panel.getRowFormatter().setVerticalAlign(0, HasVerticalAlignment.ALIGN_BOTTOM);",
            "  }",
            "}");
    frame.refresh();
    assertNoErrors(frame);
    final HTMLTableInfo panel = (HTMLTableInfo) frame.getChildrenWidgets().get(0);
    //
    ExecutionUtils.run(frame, new RunnableEx() {
      public void run() throws Exception {
        panel.getRows().get(0).setAlignment(alignment);
      }
    });
    String expectedSource =
        getTestSource(
            "public class Test implements EntryPoint {",
View Full Code Here


            "    panel.setWidget(0, 0, new Button('A'));",
            "  }",
            "}");
    frame.refresh();
    assertNoErrors(frame);
    final HTMLTableInfo panel = (HTMLTableInfo) frame.getChildrenWidgets().get(0);
    //
    ExecutionUtils.run(frame, new RunnableEx() {
      public void run() throws Exception {
        panel.getRows().get(0).setAlignment(RowInfo.Alignment.TOP);
      }
    });
    String expectedSource =
        getTestSource(
            "public class Test implements EntryPoint {",
View Full Code Here

            "    rootPanel.add(panel);",
            "  }",
            "}");
    frame.refresh();
    assertNoErrors(frame);
    HTMLTableInfo panel = (HTMLTableInfo) frame.getChildrenWidgets().get(0);
    // check IGridInfo
    IGridInfo gridInfo = panel.getGridInfo();
    assertFalse(gridInfo.hasVirtualColumns());
    assertFalse(gridInfo.hasVirtualRows());
    try {
      gridInfo.getVirtualRowSize();
      fail();
View Full Code Here

            "    panel.getCellFormatter().setHeight(1, 0, '200px');",
            "  }",
            "}");
    frame.refresh();
    assertNoErrors(frame);
    HTMLTableInfo panel = (HTMLTableInfo) frame.getChildrenWidgets().get(0);
    // check IGridInfo
    IGridInfo gridInfo = panel.getGridInfo();
    assertEquals(2, gridInfo.getRowCount());
    assertEquals(2, gridInfo.getColumnCount());
    {
      Interval[] intervals = gridInfo.getRowIntervals();
      assertEquals(2, intervals.length);
View Full Code Here

        "      panel.setWidget(0, 0, button_2);",
        "    }",
        "  }",
        "}");
    refresh();
    HTMLTableInfo panel = getJavaInfoByName("panel");
    WidgetInfo button_1 = getJavaInfoByName("button_1");
    WidgetInfo button_2 = getJavaInfoByName("button_2");
    // check IGridInfo
    IGridInfo gridInfo = panel.getGridInfo();
    {
      Rectangle cells = gridInfo.getComponentCells(button_2);
      assertEquals(new Rectangle(0, 0, 1, 1), cells);
    }
    {
View Full Code Here

            "    panel.getColumnFormatter().setWidth(1, '200px');",
            "  }",
            "}");
    frame.refresh();
    assertNoErrors(frame);
    HTMLTableInfo panel = (HTMLTableInfo) frame.getChildrenWidgets().get(0);
    // check IGridInfo
    IGridInfo gridInfo = panel.getGridInfo();
    assertEquals(2, gridInfo.getColumnCount());
    {
      Interval[] intervals = gridInfo.getColumnIntervals();
      assertEquals(2, intervals.length);
      assertEquals(new Interval(2, 100), intervals[0]);
      assertEquals(new Interval(2 + 100 + 2, 200), intervals[1]);
    }
    // low_getCellOfColumn()
    {
      assertEquals(0, panel.getStatus().getCellOfColumn(0, 0));
      assertEquals(1, panel.getStatus().getCellOfColumn(0, 1));
    }
  }
View Full Code Here

            "    panel.getCellFormatter().setHeight(1, 0, '200px');",
            "  }",
            "}");
    frame.refresh();
    assertNoErrors(frame);
    HTMLTableInfo panel = (HTMLTableInfo) frame.getChildrenWidgets().get(0);
    // check IGridInfo
    IGridInfo gridInfo = panel.getGridInfo();
    assertEquals(2, gridInfo.getRowCount());
    {
      Interval[] intervals = gridInfo.getRowIntervals();
      assertEquals(2, intervals.length);
      assertEquals(new Interval(2, 100), intervals[0]);
View Full Code Here

        "    {method: public com.google.gwt.user.client.ui.HTMLTable$RowFormatter com.google.gwt.user.client.ui.HTMLTable.getRowFormatter()} {property} {}",
        "    {method: public com.google.gwt.user.client.ui.HTMLTable$ColumnFormatter com.google.gwt.user.client.ui.HTMLTable.getColumnFormatter()} {property} {}",
        "    {method: public com.google.gwt.user.client.ui.HTMLTable$CellFormatter com.google.gwt.user.client.ui.HTMLTable.getCellFormatter()} {property} {}",
        "    {new: com.google.gwt.user.client.ui.Button} {empty} {/panel.setWidget(0, 0, new Button('1'))/}",
        "    {new: com.google.gwt.user.client.ui.Button} {empty} {/panel.setWidget(2, 1, new Button('2'))/}");
    HTMLTableInfo panel = (HTMLTableInfo) frame.getChildrenWidgets().get(0);
    WidgetInfo button_1 = panel.getChildrenWidgets().get(0);
    WidgetInfo button_2 = panel.getChildrenWidgets().get(1);
    // check IGridInfo cells
    IGridInfo gridInfo = panel.getGridInfo();
    assertEquals(new Rectangle(0, 0, 1, 1), gridInfo.getComponentCells(button_1));
    assertEquals(new Rectangle(1, 2, 1, 1), gridInfo.getComponentCells(button_2));
    // getOccupied()
    assertSame(button_1, gridInfo.getOccupied(0, 0));
    assertSame(button_2, gridInfo.getOccupied(1, 2));
View Full Code Here

            "    panel.setWidget(1, 1, new Button('B'));",
            "  }",
            "}");
    frame.refresh();
    assertNoErrors(frame);
    HTMLTableInfo panel = (HTMLTableInfo) frame.getChildrenWidgets().get(0);
    //
    assertThat(panel.getColumns()).hasSize(2);
    assertEquals(0, panel.getColumns().get(0).getIndex());
    assertEquals(1, panel.getColumns().get(1).getIndex());
  }
View Full Code Here

            "    panel.setWidget(1, 1, new Button('B'));",
            "  }",
            "}");
    frame.refresh();
    assertNoErrors(frame);
    HTMLTableInfo panel = (HTMLTableInfo) frame.getChildrenWidgets().get(0);
    //
    assertThat(panel.getColumns()).hasSize(2);
    assertEquals(false, panel.getColumns().get(0).isLast());
    assertEquals(true, panel.getColumns().get(1).isLast());
  }
View Full Code Here

TOP

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

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.