void (@Nullable BuildView view) { if (myActiveView == view) { return; } if (myActiveView != null) { myActiveView.getComponent().setVisible(false); } myActiveView = view; if (view == null) { myThreeComponentsSplitter.setSecondComponent(null); myContent.setPreferredFocusableComponent(null); } else { JComponent viewComponent = view.getComponent(); myThreeComponentsSplitter.setSecondComponent(viewComponent); myContent.setPreferredFocusedComponent(view::getPreferredFocusableComponent); myViewManager.configureToolbar(myToolbarActions, this, view); viewComponent.setVisible(true); viewComponent.repaint(); } }