public class MultiTabWorkbenchPanelView
extends BaseMultiPartWorkbenchPanelView<MultiTabWorkbenchPanelPresenter> {
@Override
protected MultiPartWidget setupWidget() {
final UberTabPanel tabPanel = getUberTabPanel();
// //Selecting a tab causes the previously selected tab to receive a Lost Focus event
// widget.addBeforeSelectionHandler( new BeforeSelectionHandler<PartDefinition>() {
// @Override
// public void onBeforeSelection( final BeforeSelectionEvent<PartDefinition> event ) {
//
// }
// } );
//When a tab is selected ensure content is resized and set focus
tabPanel.addSelectionHandler( new SelectionHandler<PartDefinition>() {
@Override
public void onSelection( SelectionEvent<PartDefinition> event ) {
presenter.onPartLostFocus();
presenter.onPartFocus( event.getSelectedItem() );
}
} );
tabPanel.addOnFocusHandler( new Command() {
@Override
public void execute() {
panelManager.onPanelFocus( presenter.getDefinition() );
}
} );