private ElementTabPane findTabPane ( String name ) throws Exception { ElementTabView tabView = getTabView ( ) ; ElementTabPane tabPane = null ; while ( ( tabPane = tabView . getChild ( ElementTabPane . class , tabPane ) ) != null ) { if ( name . equalsIgnoreCase ( tabPane . getLabel ( ) ) ) { return tabPane ; } } tabPane = new ElementTabPane ( ) ; tabPane . setParent ( tabView ) ; tabPane . setLabel ( name ) ; return tabPane ; }
Locate the tab with the corresponding label or create one if not found .