Package org.eclipse.wb.draw2d.geometry

Examples of org.eclipse.wb.draw2d.geometry.Dimension


    refresh();
    //
    WidgetInfo button = getObjectByName("button");
    frame.command_SIZE(
        button,
        new Dimension(150, 75),
        ResizeDirection.LEADING,
        ResizeDirection.LEADING);
    assertXML(
        "// filler filler filler filler filler",
        "<ui:UiBinder>",
View Full Code Here


    refresh();
    //
    WidgetInfo button = getObjectByName("button");
    frame.command_SIZE(
        button,
        new Dimension(150, 100),
        ResizeDirection.LEADING,
        ResizeDirection.LEADING);
    assertXML(
        "// filler filler filler filler filler",
        "<ui:UiBinder>",
View Full Code Here

    refresh();
    //
    WidgetInfo button = getObjectByName("button");
    frame.command_SIZE(
        button,
        new Dimension(150, 100),
        ResizeDirection.TRAILING,
        ResizeDirection.TRAILING);
    assertXML(
        "// filler filler filler filler filler",
        "<ui:UiBinder>",
View Full Code Here

  /**
   * If there are components that span multiple columns/rows, and no other "real" components in
   * these columns/rows, then removes these excess columns/rows.
   */
  public void command_normalizeSpanning() throws Exception {
    Dimension gridSize = getWidgetsGridSize();
    boolean[] filledColumns = new boolean[gridSize.width];
    boolean[] filledRows = new boolean[gridSize.height];
    for (WidgetInfo widget : getWidgets()) {
      if (!isFiller(widget)) {
        TableDataInfo tableData = getTableData(widget);
View Full Code Here

  void prepareCell(int column, boolean insertColumn, int row, boolean insertRow) throws Exception {
    // prepare count of columns/rows
    int columnCount;
    int rowCount;
    {
      Dimension gridSize = getWidgetsGridSize();
      columnCount = gridSize.width;
      rowCount = gridSize.height;
    }
    // append
    {
View Full Code Here

      //
      columnCount = Math.max(columnCount, tableData.x + tableData.width);
      rowCount = Math.max(rowCount, tableData.y + tableData.height);
    }
    // OK, we have grid
    return new Dimension(columnCount, rowCount);
  }
View Full Code Here

  /**
   * @return the double array of {@link WidgetInfo} where each element contains {@link WidgetInfo}
   *         that occupies this cell.
   */
  private WidgetInfo[][] getWidgetsGrid() throws Exception {
    Dimension gridSize = getWidgetsGridSize();
    // prepare empty grid
    WidgetInfo[][] grid;
    {
      grid = new WidgetInfo[gridSize.height][];
      for (int rowIndex = 0; rowIndex < grid.length; rowIndex++) {
View Full Code Here

    form.refresh();
    //
    CanvasItemInfo canvasItem = (CanvasItemInfo) form.getItems().get(0);
    CanvasInfo canvas = canvasItem.getCanvas();
    assertThat(canvas).isNotNull();
    assertThat(canvasItem.getBounds().getSize()).isEqualTo(new Dimension(350, 100));
  }
View Full Code Here

            "}");
    form.refresh();
    //
    FormItemInfo item = form.getItems().get(0);
    Rectangle bounds = item.getBounds();
    assertThat(bounds.getSize()).isEqualTo(new Dimension(150, 100));
  }
View Full Code Here

            "  }",
            "}");
    form.refresh();
    // set new bounds
    FormItemInfo item = form.getItems().get(0);
    form.command_BOUNDS(item, new Point(30, 20), new Dimension(150, 100));
    form.refresh();
    // check bounds
    Rectangle bounds = item.getBounds();
    assertThat(bounds.getLocation()).isEqualTo(new Point(30, 20));
    assertThat(bounds.getSize()).isEqualTo(new Dimension(150, 100));
    assertEditor(
        "public class Test extends DynamicForm {",
        "  public Test() {",
        "    setItemLayout(FormLayoutType.ABSOLUTE);",
        "    FormItem field = new TextItem('field', 'Field');",
View Full Code Here

TOP

Related Classes of org.eclipse.wb.draw2d.geometry.Dimension

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.