* if true, recursively check any sub-containers for the given component.
* @return if the given component is found
*/
public boolean contains(final UIComponent component, final boolean recurse) {
for (int i = getNumberOfChildren(); --i >= 0;) {
final Spatial child = getChild(i);
if (child.equals(component)) {
return true;
} else if (recurse && component instanceof UIContainer) {
if (((UIContainer) component).contains(component, true)) {
return true;
}