PaneManagerController controller = null;
// Switch the header style based on current style
if (header instanceof HorizontalScrollableTitleView) {
header = new HorizontalTabTitleView(Field.FOCUSABLE);
((HorizontalTabTitleView) header)
.setNumberOfDisplayedTabs(model.numberOfPanes());
controller = new HorizontalTabController();
} else if (header instanceof HorizontalTabTitleView) {
header = new HorizontalScrollableTitleView(Field.FOCUSABLE);