edu.mit.csail.sdg.alloy4graph
Class AvailableSpace

java.lang.Object
  extended by edu.mit.csail.sdg.alloy4graph.AvailableSpace

public final class AvailableSpace
extends java.lang.Object

Mutable; this allows you to compute whether a rectangle overlaps with a set of rectangles or not.

Thread Safety: Can be called only by the AWT event thread.


Constructor Summary
AvailableSpace()
          Construct an empty space.
 
Method Summary
 void add(int x, int y, int w, int h)
          Add the given rectangle to the list of rectangles in this space.
 void clear()
          Erases the list of rectangles in this space.
 boolean ok(int x, int y, int w, int h)
          Returns true if the given rectangle does not overlap with any existing rectangle in this space.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

AvailableSpace

public AvailableSpace()
Construct an empty space.

Method Detail

ok

public boolean ok(int x,
                  int y,
                  int w,
                  int h)
Returns true if the given rectangle does not overlap with any existing rectangle in this space.


add

public void add(int x,
                int y,
                int w,
                int h)
Add the given rectangle to the list of rectangles in this space.


clear

public void clear()
Erases the list of rectangles in this space.