Package org.eclipse.wb.draw2d.geometry

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


            "  }",
            "}");
    refresh();
    WidgetInfo button = getJavaInfoByName("button");
    // set new location
    frame.command_BOUNDS(button, new Point(1, 2), null);
    assertEditor(
        "public class Test implements EntryPoint {",
        "  public void onModuleLoad() {",
        "    RootPanel rootPanel = RootPanel.get();",
        "    {",
View Full Code Here


            "  }",
            "}");
    refresh();
    WidgetInfo button = getJavaInfoByName("button");
    // set new location
    frame.command_BOUNDS(button, new Point(1, 2), null);
    assertEditor(
        "public class Test implements EntryPoint {",
        "  public void onModuleLoad() {",
        "    RootPanel rootPanel = RootPanel.get();",
        "    {",
View Full Code Here

            "  }",
            "}");
    refresh();
    WidgetInfo button = getJavaInfoByName("button");
    // set new location
    frame.command_BOUNDS(button, new Point(1, 2), null);
    assertEditor(
        "public class Test implements EntryPoint {",
        "  public void onModuleLoad() {",
        "    RootPanel rootPanel = RootPanel.get();",
        "    {",
View Full Code Here

    assertHierarchy(
        "{RootPanel.get()} {local-unique: rootPanel} {/RootPanel.get()/ /rootPanel.add(panel)/ /rootPanel.add(button)/}",
        "  {new: com.google.gwt.user.client.ui.AbsolutePanel} {local-unique: panel} {/new AbsolutePanel()/ /rootPanel.add(panel)/}",
        "  {new: com.google.gwt.user.client.ui.Button} {local-unique: button} {/new Button()/ /rootPanel.add(button)/}");
    // set location
    frame.command_BOUNDS(button, new Point(50, 100), null);
    assertEditor(
        "public class Test implements EntryPoint {",
        "  public void onModuleLoad() {",
        "    RootPanel rootPanel = RootPanel.get();",
        "    {",
View Full Code Here

        "}");
    refresh();
    AbsolutePanelInfo panel = getJavaInfoByName("panel");
    WidgetInfo button_2 = getJavaInfoByName("button_2");
    // Bounds
    panel.command_BOUNDS(button_2, new Point(5, 5), null);
    assertEditor(
        "public class Test implements EntryPoint {",
        "  public void onModuleLoad() {",
        "    RootPanel rootPanel = RootPanel.get();",
        "    {",
View Full Code Here

    assertTrue(isVisible(button_1));
    assertFalse(isVisible(button_2));
    // double click handle of "button_1"
    {
      Rectangle bounds = panel.getWidgetHandles().get(1).getBounds();
      Point handleCenter = bounds.getCenter();
      canvas.moveTo(panel, handleCenter.x, handleCenter.y).doubleClick();
    }
    // now "button_2" is visible
    assertFalse(isVisible(button_1));
    assertTrue(isVisible(button_2));
View Full Code Here

            "  }",
            "}");
    // select header
    {
      Rectangle bounds = panel.getWidgetHandles().get(0).getBounds();
      Point handleCenter = bounds.getCenter();
      canvas.moveTo(panel, handleCenter.x, handleCenter.y).click();
    }
    // do direct edit
    canvas.performDirectEdit("123");
    assertEditor(
View Full Code Here

            panel.getContext(),
            m_component.getDescription(),
            creationSupport);
    // add component to AbsolutePanel
    panel.command_CREATE2(widget, null);
    panel.command_BOUNDS(widget, new Point(100, 100), null);
    // check for forced size
    {
      String width = getForcedWidth();
      String height = getForcedHeight();
      if (hasForcedSizePart(width) && hasForcedSizePart(height)) {
View Full Code Here

        int cellsInRow = (Integer) invokeMethod(object, "getCellCount(int)", row);
        rowCellCount.add(cellsInRow);
        for (int cell = 0; cell < cellsInRow; cell++) {
          int rowSpan = (Integer) invokeMethod(flex, "getRowSpan(int,int)", row, cell);
          int colSpan = (Integer) invokeMethod(flex, "getColSpan(int,int)", row, cell);
          cellToSpan.put(new Point(cell, row), new Dimension(colSpan, rowSpan));
        }
      }
    }
    // prepare m_columnCount as maximum count of columns in each row
    for (int row = 0; row < m_rowCount; row++) {
      int columnsInRow = 0;
      int cellsInRow = rowCellCount.get(row);
      for (int cell = 0; cell < cellsInRow; cell++) {
        int colSpan = cellToSpan.get(new Point(cell, row)).width;
        columnsInRow += colSpan;
      }
      m_columnCount = Math.max(m_columnCount, columnsInRow);
    }
    // last step: fill final m_rowCellCount and m_cellToSpan
    for (int row = 0; row < m_rowCount; row++) {
      // iterate over existing cells
      int column = 0;
      int cell = 0;
      {
        int cellsInRow = rowCellCount.get(row);
        for (; cell < cellsInRow; cell++) {
          Point key = new Point(cell, row);
          // remember existing span
          Dimension span = cellToSpan.get(key);
          m_cellToSpan.put(key, span);
          // move column index
          column += span.width;
        }
      }
      // if cells are over, but we still did not reach required number of columns...
      while (column < m_columnCount) {
        Point key = new Point(cell, row);
        // remember default span
        Dimension span = new Dimension(1, 1);
        m_cellToSpan.put(key, span);
        // next column/cell
        column++;
View Full Code Here

      for (int cell = 0, column = 0; cell < getCellCount(row); cell++) {
        int colSpan = getColSpan(row, cell);
        int rowSpan = getRowSpan(row, cell);
        if (low_isFilledCell(row, cell)) {
          // mark all cell as filled
          filledCells.add(new Point(cell, row));
          // row/column is filled only if it is not spanned
          if (rowSpan == 1) {
            filledRows.add(row);
          }
          if (colSpan == 1) {
            filledColumns.add(column);
          }
        }
        column += colSpan;
      }
    }
    /*System.out.println("filledCells: " + filledCells);
    System.out.println("filledRows: " + filledRows);
    System.out.println("filledColumns: " + filledColumns);*/
    for (int row = 0; row < getRowCount(); row++) {
      for (int cell = 0, column = 0; column < getColumnCount(); cell++) {
        Object td = getElementSafe(row, cell);
        // prepare colSpan
        int colSpan = 1;
        if (td != null) {
          colSpan = getColSpan(row, cell);
        }
        // fill cell to fill column
        if (!filledCells.contains(new Point(cell, row))) {
          //System.out.println("\tfill (row,cell,column): " + row + " " + cell + " " + column);
          low_fillCell(filledRows, filledColumns, row, cell, column);
        }
        // next column
        column += colSpan;
View Full Code Here

TOP

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

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.