}
public void selectTab( final PentahoTab selectedTab ) {
// Save previous tab's solution browser panel navigator state
PentahoTab prevTab = getSelectedTab();
if ( prevTab != null && prevTab instanceof MantleTab ) {
MantleTab mantlePrevTab = (MantleTab) prevTab;
boolean prevState = SolutionBrowserPanel.getInstance().isNavigatorShowing();
if ( mantlePrevTab != null ) {
mantlePrevTab.setSolutionBrowserShowing( prevState );
}
}
super.selectTab( selectedTab );
if ( selectedTab == null ) {
return;
}
if ( selectedTab instanceof MantleTab ) {
// restore previous state of solution browser panel navigator
MantleTab mantleTab = (MantleTab) selectedTab;
SolutionBrowserPanel.getInstance().setNavigatorShowing( mantleTab.isSolutionBrowserShowing() );
}
Widget selectTabContent = null;
if ( getTab( getSelectedTabIndex() ) != null ) {
selectTabContent = getTab( getSelectedTabIndex() ).getContent();
}
List<FileItem> selectedItems = SolutionBrowserPanel.getInstance().getFilesListPanel().getSelectedFileItems();
EventBusUtil.EVENT_BUS.fireEvent( new SolutionBrowserSelectEvent( selectTabContent, selectedItems ) );
Window.setTitle( Messages.getString( "productName" ) + " - " + selectedTab.getLabelText() ); //$NON-NLS-1$ //$NON-NLS-2$
// first turn off all tabs that should be
for ( int i = 0; i < getTabCount(); i++ ) {
final PentahoTab tab = getTab( i );
if ( tab.getContent() instanceof IFrameTabPanel ) {
if ( tab.getContent() != selectedTab.getContent() ) {
FrameUtils.setEmbedVisibility( ( (IFrameTabPanel) tab.getContent() ).getFrame(), false );
}
}
}
// now turn on the select tab