edu.washington.cs.supple.rep
Interface ContainerType

All Superinterfaces:
SuppleBean, SuppleType
All Known Subinterfaces:
ActionType, DynamicType, VectorType
All Known Implementing Classes:
ActionTypeImpl, ContainerTypeImpl, DynamicTypeImpl, VectorTypeImpl

public interface ContainerType
extends SuppleType

Author:
kgajos Interface for all container type implementations

Method Summary
 boolean childrenHaveLabels()
          Checks if all children have meaningful labels
 UiObject getChild(java.lang.String name)
           
 java.util.Vector getChildren()
           
 int getNumChildren()
           
 int getNumChildrenAdded()
           
 UiObject getUiObject()
           
 boolean hasModifiableChild()
          Checks if any descendant of this type is modifiable
 void removeChild(UiObject child)
          Removes a child from this container; can only be called before the UI is submitted for rendering
 int size()
           
 boolean swapChild(UiObject oldChild, UiObject newChild)
          To be used very carefully (pretty much only by UiTransformers) -- replaces one child ui object with another
 
Methods inherited from interface edu.washington.cs.supple.rep.SuppleType
accept, getIndex, getIndex, getLegalValues, getLikelyValues, getLongestLegalIndex, getMaxNumLegalValues, getNumLegalValues, getNumLikelyValues, getTypicalIndexLength, getUniqueId, hasIndex, hasOrdering, hasSetLegalValues, isEnumerable, isFinalLegalValues, isLegalValue, isLegalValueClass, isPrimitiveType, orderValues, toPrettyString, verifyCurrentValue
 
Methods inherited from interface edu.washington.cs.supple.rep.SuppleBean
addPropertyChangeListener, removePropertyChangeListener
 

Method Detail

hasModifiableChild

public boolean hasModifiableChild()
Checks if any descendant of this type is modifiable

Returns:
true if at least one descendant of this type is modifiable

getChildren

public java.util.Vector getChildren()
Returns:
returns a clone of the internal list of its children

getChild

public UiObject getChild(java.lang.String name)
Parameters:
name - name of the child
Returns:
the child with a given name or null if one does not exist

removeChild

public void removeChild(UiObject child)
Removes a child from this container; can only be called before the UI is submitted for rendering

Parameters:
child - the child ui object to be removed

swapChild

public boolean swapChild(UiObject oldChild,
                         UiObject newChild)
To be used very carefully (pretty much only by UiTransformers) -- replaces one child ui object with another

Parameters:
oldChild -
newChild -
Returns:
true if the old child existed and was successfuly swapped; false otherwise

getNumChildren

public int getNumChildren()
Returns:
the number of children

getNumChildrenAdded

public int getNumChildrenAdded()
Returns:
the total number of children added (without considering deletions)

size

public int size()
Returns:
the number of children

childrenHaveLabels

public boolean childrenHaveLabels()
Checks if all children have meaningful labels

Returns:
false if there exists a child with no label; otherwise true

getUiObject

public UiObject getUiObject()