Package org.eclipse.wb.draw2d.geometry

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


        m_textFeedback = new TextFeedback(getFeedbackLayer());
        m_textFeedback.add();
      }
    }
    // prepare bounds
    Rectangle bounds;
    {
      Figure hostFigure = getHostFigure();
      bounds = request.getTransformedRectangle(hostFigure.getBounds());
      FigureUtils.translateFigureToAbsolute(hostFigure, bounds.shrink(-1, -1));
    }
    // update selection feedback
    m_resizeFeedback.setBounds(bounds);
    // update text feedback
    int newWidth = Math.max(bounds.width - 2, 0);
View Full Code Here


  ////////////////////////////////////////////////////////////////////////////
  @Override
  public void onSet() throws Exception {
    super.onSet();
    for (WidgetInfo widget : getWidgets()) {
      Rectangle bounds = widget.getModelBounds();
      command_BOUNDS(widget, bounds.getLocation(), bounds.getSize());
    }
  }
View Full Code Here

    // move children
    for (WidgetInfo widget : getContainer().getChildrenWidgets()) {
      if (!isFiller(widget)) {
        TableLayoutDataInfo tableData = getTableData(widget);
        if (tableData.x == fromIndex) {
          command_setCells(widget, new Rectangle(toIndex, tableData.y, 1, tableData.height), true);
        }
      }
    }
    // delete old column
    command_deleteColumn(fromIndex, false);
View Full Code Here

    // move children
    for (WidgetInfo widget : getContainer().getChildrenWidgets()) {
      if (!isFiller(widget)) {
        TableLayoutDataInfo tableData = getTableData(widget);
        if (tableData.y == fromIndex) {
          command_setCells(widget, new Rectangle(tableData.x, toIndex, tableData.width, 1), true);
        }
      }
    }
    // delete old row
    command_deleteRow(fromIndex, false);
View Full Code Here

    startEdit();
    try {
      command_CREATE(newWidget, null);
      // move to required cell
      prepareCell(column, insertColumn, row, insertRow);
      command_setCells(newWidget, new Rectangle(column, row, 1, 1), false);
    } finally {
      endEdit();
    }
  }
View Full Code Here

      int row,
      boolean insertRow) throws Exception {
    startEdit();
    try {
      prepareCell(column, insertColumn, row, insertRow);
      command_setCells(widget, new Rectangle(column, row, 1, 1), true);
      deleteEmptyColumnsRows(null);
    } finally {
      endEdit();
    }
  }
View Full Code Here

    startEdit();
    try {
      command_MOVE(widget, null);
      // move to required cell
      prepareCell(column, insertColumn, row, insertRow);
      command_setCells(widget, new Rectangle(column, row, 1, 1), false);
    } finally {
      endEdit();
    }
  }
View Full Code Here

      }
    }
    // fill grid
    for (WidgetInfo widget : getContainer().getChildrenWidgets()) {
      // prepare cells
      Rectangle cells;
      {
        TableLayoutDataInfo tableData = getTableData(widget);
        cells = new Rectangle(tableData.x, tableData.y, tableData.width, tableData.height);
      }
      // fill grid cells
      for (int x = cells.x; x < cells.right(); x++) {
        for (int y = cells.y; y < cells.bottom(); y++) {
          // ignore newly added widgets without real cell
          if (x != -1 && y != -1) {
            grid[y][x] = widget;
          }
        }
View Full Code Here

      //
      ////////////////////////////////////////////////////////////////////////////
      public Rectangle getComponentCells(IAbstractComponentInfo component) {
        Assert.instanceOf(WidgetInfo.class, component);
        TableLayoutDataInfo data = getTableData((WidgetInfo) component);
        return new Rectangle(data.getColumn(), data.getRow(), data.getColSpan(), data.getRowSpan());
      }

      public Rectangle getCellsRectangle(Rectangle cells) {
        int x = m_columnIntervals[cells.x].begin;
        int y = m_rowIntervals[cells.y].begin;
        int w = m_columnIntervals[cells.right() - 1].end() - x;
        int h = m_rowIntervals[cells.bottom() - 1].end() - y;
        return new Rectangle(x, y, w, h);
      }

      ////////////////////////////////////////////////////////////////////////////
      //
      // Feedback
View Full Code Here

  public DeviceAbstractCommand(Attributes attributes) {
    m_id = attributes.getValue("id");
    m_name = attributes.getValue("name");
    m_imagePath = attributes.getValue("image");
    m_displayBounds =
        new Rectangle(Integer.parseInt(attributes.getValue("displayX")),
            Integer.parseInt(attributes.getValue("displayY")),
            Integer.parseInt(attributes.getValue("displayWidth")),
            Integer.parseInt(attributes.getValue("displayHeight")));
  }
View Full Code Here

TOP

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

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.