edu.washington.cs.supple.rep
Interface SuppleUiObjectHierarchyElement

All Known Subinterfaces:
PrimitiveShortcut, StateVar, UiAction, UiAlternative, UiObject
All Known Implementing Classes:
StateVarImpl, SuppleUiObjectHierarchyElementImpl, UiActionImpl, UiAlternativeImpl, UiObjectImpl

public interface SuppleUiObjectHierarchyElement

Author:
kgajos This interface is needed so that when we create proxy objects for types, we can easily separate out methods that have to do with type's position in the UI hierarchy

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 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)
 

Method Detail

getParent

public ContainerType getParent()
Returns the parent type of this type (i.e. the container type that contains this one)

Returns:
the parent container type

getParentObject

public UiObject getParentObject()

setParent

public 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)

Parameters:
parent - the parent

isRoot

public boolean isRoot()
Checks if this type objects is the root of the interface description

Returns:
true if root of the interface description, false otherwise

getRootObject

public UiObject getRootObject()
Returns the root UI object

Returns:
the root of this interface description

isDescendantOf

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

Parameters:
o - object to test
Returns:
true if argument is an ancestor of this object; false otherwise

isChildOf

public boolean isChildOf(UiObject o)

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

Returns:
the list of ancestors starting with root

getName

public java.lang.String getName()
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

setName

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

Parameters:
newName - the name

getFullName

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

Returns:
the full name