BorderLayoutPanel () { BorderLayoutPanel topPanel; if (myIsNewToolbar) { BorderLayoutPanel rightPanel = JBUI.Panels.simplePanel(myRightToolbarWrapper).addToLeft(myProgressBar); topPanel = JBUI.Panels.simplePanel(myDiffInfoWrapper).addToLeft(myToolbarWrapper).addToRight(rightPanel); GuiUtils.installVisibilityReferent(topPanel, myToolbar.getComponent()); GuiUtils.installVisibilityReferent(topPanel, myRightToolbar.getComponent()); } else { JPanel statusPanel = JBUI.Panels.simplePanel(myToolbarStatusPanel).addToLeft(myProgressBar); topPanel = JBUI.Panels.simplePanel(myToolbarWrapper).addToRight(statusPanel); GuiUtils.installVisibilityReferent(topPanel, myToolbar.getComponent()); } return topPanel; }