if (widget instanceof UIInvalidatable && !uiInvalidateables.contains(widget))
{
uiInvalidateables.add((UIInvalidatable) widget);
}
Container container = null;
Panel panel = null;
if (widget instanceof Container)
{
container = (Container) widget;
}
else if (widget instanceof TabPanel)
{
container = ((TabPanel) widget).getContainer();
}
else if (widget instanceof Panel)
{
panel = (Panel) widget;
}
if (panel != null)
{
for (final Widget widget2 : (Panel) widget)
{
recursiveRegisterScreenSubPanel(widget2);
}
}
else if (container != null)
{
container.addAddHandler(new RegisterChildrenAddHandler());
if (container instanceof ScreenSubPanel)
{
final ScreenSubPanel widgetAsScreenSubPanel = (ScreenSubPanel) container;
if (!subPanels.contains(widgetAsScreenSubPanel))
{