edu.washington.cs.supple.rep
Class AbstractRenderingConstraint

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

public abstract class AbstractRenderingConstraint
extends java.lang.Object
implements RenderingConstraint

Author:
kgajos
See Also:
Serialized Form

Field Summary
protected static int lastUid
           
protected  java.util.Vector objects
           
protected  int uid
           
 
Fields inherited from interface edu.washington.cs.supple.rep.RenderingConstraint
serialVersionUID
 
Constructor Summary
AbstractRenderingConstraint()
           
AbstractRenderingConstraint(java.util.Collection objects)
           
AbstractRenderingConstraint(UiObject object)
           
 
Method Summary
 void addUiObject(UiObject object)
          Adds a new object to be subject to the rendering constraint
 void addUiObjects(java.util.Collection objects)
          Addes several ui objects at once
 boolean equals(java.lang.Object o)
          Equality test is based on the unique id assigned to each instance of the BaseType
 RenderingConstraintEnforcer getEnforcer()
          Returns the appropriate enforcer for a given type of constraint
 java.util.Vector getUiObjects()
           
 int hashCode()
          Hashcode is a function of the uid
 void removeUiObject(UiObject object)
           
 
Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, toString, wait, wait, wait
 
Methods inherited from interface edu.washington.cs.supple.rep.RenderingConstraint
isWidgetConsistent
 

Field Detail

objects

protected java.util.Vector objects

uid

protected transient int uid

lastUid

protected static int lastUid
Constructor Detail

AbstractRenderingConstraint

public AbstractRenderingConstraint()

AbstractRenderingConstraint

public AbstractRenderingConstraint(UiObject object)

AbstractRenderingConstraint

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

addUiObject

public void addUiObject(UiObject object)
Description copied from interface: RenderingConstraint
Adds a new object to be subject to the rendering constraint

Specified by:
addUiObject in interface RenderingConstraint
Parameters:
object - a UI object

addUiObjects

public void addUiObjects(java.util.Collection objects)
Description copied from interface: RenderingConstraint
Addes several ui objects at once

Specified by:
addUiObjects in interface RenderingConstraint
Parameters:
objects - the ui objects to be added

removeUiObject

public void removeUiObject(UiObject object)

getUiObjects

public java.util.Vector getUiObjects()
Specified by:
getUiObjects in interface RenderingConstraint
Returns:
the list of objects this constraint was applied to

getEnforcer

public RenderingConstraintEnforcer getEnforcer()
Description copied from interface: RenderingConstraint
Returns the appropriate enforcer for a given type of constraint

Specified by:
getEnforcer in interface RenderingConstraint
Returns:

hashCode

public int hashCode()
Hashcode is a function of the uid

See Also:
Object.hashCode()

equals

public boolean equals(java.lang.Object o)
Equality test is based on the unique id assigned to each instance of the BaseType

Returns:
true if they are the same instance, false otherwise