Package org.eclipse.wb.draw2d.geometry

Examples of org.eclipse.wb.draw2d.geometry.Rectangle.right()


      Object body = ReflectionUtils.invokeMethod(getObject(), "getBody()");
      Rectangle bodyBounds = getAbsoluteBounds(body);
      setClientAreaInsets(new Insets(bodyBounds.y - panelBounds.y,
          bodyBounds.x - panelBounds.x,
          panelBounds.bottom() - bodyBounds.bottom(),
          panelBounds.right() - bodyBounds.right()));
    }
  }

  private static Rectangle getAbsoluteBounds(Object boxObject) throws Exception {
    Object box = ReflectionUtils.invokeMethod(boxObject, "getBox()");
View Full Code Here


      Rectangle bodyBounds = GxtUtils.getAbsoluteBounds(bodyEl);
      Insets insets =
          new Insets(bodyBounds.y - panelBounds.y,
              bodyBounds.x - panelBounds.x,
              panelBounds.bottom() - bodyBounds.bottom(),
              panelBounds.right() - bodyBounds.right());
      insets.add(m_margins);
      insets.add(GxtUtils.getBorders(bodyEl));
      setClientAreaInsets(insets);
    }
  }
View Full Code Here

      {
        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

    Rectangle bodyBounds = GxtUtils.getAbsoluteBounds(bodyEl);
    {
      int top = bodyBounds.y - panelBounds.y;
      int left = bodyBounds.x - panelBounds.x;
      int bottom = panelBounds.bottom() - bodyBounds.bottom();
      int right = panelBounds.right() - bodyBounds.right();
      /*if (bottom < 0) {
        bottom *= -1;
      }*/
      setClientAreaInsets(new Insets(top, left, bottom, right));
    }
View Full Code Here

      return;
    }
    // RightWidth
    if (location.trailing != null && location.size != null) {
      if (direction == ResizeDirection.TRAILING) {
        int oldRight = getBounds().width - bounds.right();
        int deltaWidth = width - bounds.width;
        int right = oldRight - deltaWidth;
        setPixels(location.trailing, right);
      }
      setPixels(location.size, width);
View Full Code Here

        int deltaWidth = width - bounds.width;
        int left = oldLeft - deltaWidth;
        setPixels(location.leading, left);
      }
      if (direction == ResizeDirection.TRAILING) {
        int oldRight = getBounds().width - bounds.right();
        int deltaWidth = width - bounds.width;
        int right = oldRight - deltaWidth;
        setPixels(location.trailing, right);
      }
      return;
View Full Code Here

      if (anchor == Anchor.NONE) {
        layer.setAttribute("left", null);
        layer.setAttribute("width", null);
      }
      if (anchor == Anchor.TRAILING) {
        int right = getBounds().width - bounds.right();
        layer.setAttribute("left", null);
        setPixels(location.leading, "right", right);
      }
      if (anchor == Anchor.BOTH) {
        int right = getBounds().width - bounds.right();
View Full Code Here

        int right = getBounds().width - bounds.right();
        layer.setAttribute("left", null);
        setPixels(location.leading, "right", right);
      }
      if (anchor == Anchor.BOTH) {
        int right = getBounds().width - bounds.right();
        layer.setAttribute("width", null);
        setPixels(location.leading, "right", right);
      }
      return;
    }
View Full Code Here

      if (anchor == Anchor.LEADING) {
        layer.setAttribute("left", bounds.left() + "px");
        layer.setAttribute("width", bounds.width + "px");
      }
      if (anchor == Anchor.TRAILING) {
        layer.setAttribute("right", getBounds().width - bounds.right() + "px");
        layer.setAttribute("width", bounds.width + "px");
      }
      if (anchor == Anchor.BOTH) {
        layer.setAttribute("left", bounds.left() + "px");
        layer.setAttribute("right", getBounds().width - bounds.right() + "px");
View Full Code Here

        layer.setAttribute("right", getBounds().width - bounds.right() + "px");
        layer.setAttribute("width", bounds.width + "px");
      }
      if (anchor == Anchor.BOTH) {
        layer.setAttribute("left", bounds.left() + "px");
        layer.setAttribute("right", getBounds().width - bounds.right() + "px");
      }
    }
  }

  private void command_ANCHOR_vertical(WidgetInfo widget, Anchor anchor) throws Exception {
View Full Code Here

TOP
Copyright © 2018 www.massapi.com. 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.