edu.washington.cs.supple.rep
Class AbstractRenderingConstraint
java.lang.Object
edu.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
|
| Methods inherited from class java.lang.Object |
clone, finalize, getClass, notify, notifyAll, toString, wait, wait, wait |
objects
protected java.util.Vector objects
uid
protected transient int uid
lastUid
protected static int lastUid
AbstractRenderingConstraint
public AbstractRenderingConstraint()
AbstractRenderingConstraint
public AbstractRenderingConstraint(UiObject object)
AbstractRenderingConstraint
public AbstractRenderingConstraint(java.util.Collection objects)
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