* loaded when a tab panel selects the lazy panel's tab.
*
* @param panel to add listener to
*/
public static void addTabListener(final TabPanel panel) {
panel.addTabListener(new TabListener() {
public boolean onBeforeTabSelected(SourcesTabEvents sender, int tabIndex) {
Widget widget = panel.getWidget(tabIndex);
if (widget instanceof LazyPanel) {
((LazyPanel) widget).ensureWidget();