edu.washington.cs.supple.rep
Class SuppleUiObjectHierarchyElementImpl

java.lang.Object
  extended byedu.washington.cs.supple.rep.SuppleBeanImpl
      extended byedu.washington.cs.supple.rep.SuppleUiObjectHierarchyElementImpl
All Implemented Interfaces:
java.io.Serializable, SuppleBean, SuppleUiObjectHierarchyElement
Direct Known Subclasses:
UiObjectImpl, UiObjectInvocationHandler, UiObjectInvocationHandler

public class SuppleUiObjectHierarchyElementImpl
extends SuppleBeanImpl
implements SuppleUiObjectHierarchyElement, java.io.Serializable

Author:
kgajos
See Also:
Serialized Form

Field Summary
protected  java.lang.String name
           
protected  ContainerType parent
           
 
Fields inherited from class edu.washington.cs.supple.rep.SuppleBeanImpl
pcs
 
Constructor Summary
SuppleUiObjectHierarchyElementImpl()
           
 
Method Summary
 java.util.Vector getAncestors()
          Returns a vector of ancestors for this object, root being the first element; if it is root, an empty vector is returned
 java.lang.String getFullName()
          Returns the string that includes the names of all of its ancestors
 java.lang.String getName()
           
 ContainerType getParent()
          Returns the parent type of this type (i.e.
 UiObject getParentObject()
           
 UiObject getRootObject()
          Returns the root UI object
 boolean isChildOf(UiObject o)
           
 boolean isDescendantOf(UiObject o)
          Checks if this objects is a decendant of the argument
 boolean isRoot()
          Checks if this type objects is the root of the interface description
 void propertyChange(java.beans.PropertyChangeEvent evt)
           
 void setName(java.lang.String newName)
          Sets the name of this object; to be called only by the parent type
 void setParent(ContainerType parent)
          Sets the parent type of this type instance -- you shouldn't need to call this method (it's already automatically called in all the right places)
 
Methods inherited from class edu.washington.cs.supple.rep.SuppleBeanImpl
addPropertyChangeListener, removePropertyChangeListener
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

name

protected java.lang.String name

parent

protected ContainerType parent
Constructor Detail

SuppleUiObjectHierarchyElementImpl

public SuppleUiObjectHierarchyElementImpl()
Method Detail

getName

public java.lang.String getName()
Specified by:
getName in interface SuppleUiObjectHierarchyElement
Returns:
a unique name used to distinguish among different children of the parent type; if the name is not set and there is no parent, string "root" is returned

getFullName

public java.lang.String getFullName()
Returns the string that includes the names of all of its ancestors

Specified by:
getFullName in interface SuppleUiObjectHierarchyElement
Returns:
the full name

setName

public void setName(java.lang.String newName)
Sets the name of this object; to be called only by the parent type

Specified by:
setName in interface SuppleUiObjectHierarchyElement
Parameters:
newName - the name

getParent

public ContainerType getParent()
Description copied from interface: SuppleUiObjectHierarchyElement
Returns the parent type of this type (i.e. the container type that contains this one)

Specified by:
getParent in interface SuppleUiObjectHierarchyElement
Returns:
the parent container type

setParent

public void setParent(ContainerType parent)
Description copied from interface: SuppleUiObjectHierarchyElement
Sets the parent type of this type instance -- you shouldn't need to call this method (it's already automatically called in all the right places)

Specified by:
setParent in interface SuppleUiObjectHierarchyElement
Parameters:
parent - the parent

getParentObject

public UiObject getParentObject()
Specified by:
getParentObject in interface SuppleUiObjectHierarchyElement

getRootObject

public UiObject getRootObject()
Returns the root UI object

Specified by:
getRootObject in interface SuppleUiObjectHierarchyElement
Returns:
the root of this interface description

isDescendantOf

public boolean isDescendantOf(UiObject o)
Checks if this objects is a decendant of the argument

Specified by:
isDescendantOf in interface SuppleUiObjectHierarchyElement
Parameters:
o - object to test
Returns:
true if argument is an ancestor of this object; false otherwise

isChildOf

public boolean isChildOf(UiObject o)
Specified by:
isChildOf in interface SuppleUiObjectHierarchyElement

isRoot

public boolean isRoot()
Description copied from interface: SuppleUiObjectHierarchyElement
Checks if this type objects is the root of the interface description

Specified by:
isRoot in interface SuppleUiObjectHierarchyElement
Returns:
true if root of the interface description, false otherwise

getAncestors

public java.util.Vector getAncestors()
Returns a vector of ancestors for this object, root being the first element; if it is root, an empty vector is returned

Specified by:
getAncestors in interface SuppleUiObjectHierarchyElement
Returns:
the list of ancestors starting with root

propertyChange

public void propertyChange(java.beans.PropertyChangeEvent evt)