diva.sketch.parser2d
Class AndConstraint

java.lang.Object
  |
  +--diva.sketch.parser2d.AndConstraint

public class AndConstraint
extends java.lang.Object
implements RelationConstraint

A composite constraint that ANDs together the results of its child constraint objects.

Version:
$Revision: 1.1 $

Constructor Summary
AndConstraint()
           
 
Method Summary
 void addConstraint(RelationConstraint r)
          Add another child constraint to the test.
static void debug(java.lang.String s)
          Debugging output.
 boolean test(java.awt.geom.Rectangle2D r1, java.awt.geom.Rectangle2D r2)
          Test the child constraints on the given rectangles; return true if all of them are met or there are no child constraints, false otherwise.
 java.lang.String toString()
          Print out the contents of this constraint.
 
Methods inherited from class java.lang.Object
, clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Constructor Detail

AndConstraint

public AndConstraint()
Method Detail

debug

public static void debug(java.lang.String s)
Debugging output.

test

public boolean test(java.awt.geom.Rectangle2D r1,
                    java.awt.geom.Rectangle2D r2)
Test the child constraints on the given rectangles; return true if all of them are met or there are no child constraints, false otherwise.
Specified by:
test in interface RelationConstraint

addConstraint

public void addConstraint(RelationConstraint r)
Add another child constraint to the test.

toString

public java.lang.String toString()
Print out the contents of this constraint.
Overrides:
toString in class java.lang.Object