List of usage examples for java.awt.geom Rectangle2D.Float setRect
public void setRect(Rectangle2D r)
From source file:tufts.vue.LWComponent.java
/** @return the union of the bounds of the current component, all connected links, and all far endpoints * of those links.//from ww w. j av a 2 s .c o m */ public Rectangle2D.Float getFanBounds(Rectangle2D.Float rect) { if (rect == null) rect = getMapBounds(); else rect.setRect(getMapBounds()); for (LWLink link : getLinks()) { final LWComponent head = link.getHead(); final LWComponent tail = link.getTail(); rect.add(link.getPaintBounds()); if (head != this) { if (head != null) rect.add(head.getPaintBounds()); } else if (tail != this) { if (tail != null) rect.add(tail.getPaintBounds()); } } return rect; }