edu.washington.cs.supple.rep
Class SameRenderingConstraint

java.lang.Object
  extended byedu.washington.cs.supple.rep.AbstractRenderingConstraint
      extended byedu.washington.cs.supple.rep.SameRenderingConstraint
All Implemented Interfaces:
RenderingConstraint, java.io.Serializable

public class SameRenderingConstraint
extends AbstractRenderingConstraint

Author:
kgajos Forces corresponding elements of two or more different UiObjects to be rendered with the same widgets
See Also:
Serialized Form

Field Summary
 
Fields inherited from class edu.washington.cs.supple.rep.AbstractRenderingConstraint
lastUid, objects, uid
 
Fields inherited from interface edu.washington.cs.supple.rep.RenderingConstraint
serialVersionUID
 
Constructor Summary
SameRenderingConstraint()
           
SameRenderingConstraint(java.util.Collection objects)
           
 
Method Summary
protected  boolean hasWidgetType(WidgetBag bag, java.lang.Class type)
          Checks if the bag is still considering any elements of the specified type
 boolean isWidgetConsistent(java.util.Vector widgetBags, Widget widget)
          Indicates how well a widget complies with the constraint.
 java.lang.String toString()
           
 
Methods inherited from class edu.washington.cs.supple.rep.AbstractRenderingConstraint
addUiObject, addUiObjects, equals, getEnforcer, getUiObjects, hashCode, removeUiObject
 
Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, wait
 

Constructor Detail

SameRenderingConstraint

public SameRenderingConstraint()

SameRenderingConstraint

public SameRenderingConstraint(java.util.Collection objects)
Method Detail

isWidgetConsistent

public boolean isWidgetConsistent(java.util.Vector widgetBags,
                                  Widget widget)
Description copied from interface: RenderingConstraint
Indicates how well a widget complies with the constraint.

Parameters:
widgetBags - all widget bags which a part of this hint
widget -
Returns:
true if the widget is consistent, false otherwise

hasWidgetType

protected boolean hasWidgetType(WidgetBag bag,
                                java.lang.Class type)
Checks if the bag is still considering any elements of the specified type

Parameters:
bag - the bag under consideration
type - the widget type
Returns:
true if an element of a given type was found, false otherwise

toString

public java.lang.String toString()