Package org.eclipse.draw2d.geometry

Examples of org.eclipse.draw2d.geometry.Rectangle.union()


    container.validate();
    List children = container.getChildren();
    Rectangle result = new Rectangle().setLocation(container
        .getClientArea().getLocation());
    for (int i = 0; i < children.size(); i++)
      result.union(((IFigure) children.get(i)).getBounds());
    result.resize(container.getInsets().getWidth(), container.getInsets()
        .getHeight());
    return result.getSize();
  }
View Full Code Here


    }

    if (overlappingContainmentRectangles.size() > 0) { // always true
      Rectangle unionRectangle = overlappingContainmentRectangles.get(0).getCopy();
      for (Rectangle containmentRectangle : overlappingContainmentRectangles) {
        unionRectangle.union(containmentRectangle);
      }
      unionRectangle.expand(2, 2); // expand slightly to avoid rounding problems
      setBounds(unionRectangle);
    }
  }
View Full Code Here

  protected Dimension calculatePreferredSize(IFigure container, int wHint, int hHint) {
    container.validate();
    List children = container.getChildren();
    Rectangle result = new Rectangle().setLocation(container.getClientArea().getLocation());
    for (int i = 0; i < children.size(); i++) {
      result.union(((IFigure) children.get(i)).getBounds());
    }
    result.resize(container.getInsets().getWidth(), container.getInsets().getHeight());
    return result.getSize();
  }
View Full Code Here

        container.validate();
        List children = container.getChildren();
        Rectangle result = new Rectangle().setLocation(container
                .getClientArea().getLocation());
        for (int i = 0; i < children.size(); i++)
            result.union(((IFigure) children.get(i)).getBounds());
        result.resize(container.getInsets().getWidth(), container.getInsets()
                .getHeight());
        return result.getSize();
    }
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.