edu.washington.cs.supple.render
Class RenderingConstraintEnforcer

java.lang.Object
  extended byedu.washington.cs.supple.render.RenderingConstraintEnforcer

public class RenderingConstraintEnforcer
extends java.lang.Object

Author:
kgajos A helper class that is created during rendering process and attached to temporary data structures;

Field Summary
protected  java.util.Vector bags
           
protected  RenderingConstraint constraint
           
 
Constructor Summary
RenderingConstraintEnforcer(RenderingConstraint constraint)
           
RenderingConstraintEnforcer(RenderingConstraint constraint, java.util.Collection wbags)
           
 
Method Summary
 void addWidgetBag(WidgetBag bag)
           
 void addWidgetBags(java.util.Collection wbags)
           
 RenderingConstraint getConstraint()
           
 java.util.Vector getWidgetBags()
           
 boolean isWidgetConsistent(Widget w)
           
 boolean propagate(WidgetBag source, int levels)
          Call propagate on all widget bags connected to this constraint (except the one that called the propagation)
 int size()
           
 void undoPropagate(WidgetBag source, int levels)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

constraint

protected RenderingConstraint constraint

bags

protected java.util.Vector bags
Constructor Detail

RenderingConstraintEnforcer

public RenderingConstraintEnforcer(RenderingConstraint constraint,
                                   java.util.Collection wbags)

RenderingConstraintEnforcer

public RenderingConstraintEnforcer(RenderingConstraint constraint)
Method Detail

addWidgetBag

public void addWidgetBag(WidgetBag bag)

addWidgetBags

public void addWidgetBags(java.util.Collection wbags)

getWidgetBags

public java.util.Vector getWidgetBags()

size

public int size()

getConstraint

public RenderingConstraint getConstraint()

isWidgetConsistent

public boolean isWidgetConsistent(Widget w)

propagate

public boolean propagate(WidgetBag source,
                         int levels)
Call propagate on all widget bags connected to this constraint (except the one that called the propagation)

Parameters:
source - the caller (it will not be propagated to)
levels - how deep to propagate (used in testing)
Returns:
true if all propagated ok; false if there was a failure

undoPropagate

public void undoPropagate(WidgetBag source,
                          int levels)