org.globus.cog.gui.grapheditor.util
Class RectUtil

java.lang.Object
  extended by org.globus.cog.gui.grapheditor.util.RectUtil

public class RectUtil
extends Object


Constructor Summary
RectUtil()
           
 
Method Summary
static Rectangle abs(Rectangle rect)
          "Normalizes" the rectangle.
static Rectangle border(Rectangle rect, int border)
          Grows a border around a rectangle
static Rectangle grow(Rectangle rect, int x, int y)
          Grows the rectangle in such a way that it will contain the point (x, y)
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

RectUtil

public RectUtil()
Method Detail

abs

public static Rectangle abs(Rectangle rect)
"Normalizes" the rectangle. A "normalized" rectangle would have a positive width and height


border

public static Rectangle border(Rectangle rect,
                               int border)
Grows a border around a rectangle


grow

public static Rectangle grow(Rectangle rect,
                             int x,
                             int y)
Grows the rectangle in such a way that it will contain the point (x, y)