Пример #1
0
 private void hideWelcomeScreen(JComponent contentPane) {
   if (myWelcomePane != null) {
     Disposer.dispose(myWelcomeScreen);
     contentPane.remove(myWelcomePane);
     myWelcomeScreen = null;
     myWelcomePane = null;
     updateToolbarVisibility();
   }
 }
Пример #2
0
  /**
   * Sets current tool windows pane (panel where all tool windows are located). If <code>
   * toolWindowsPane</code> is <code>null</code> then the method just removes the current tool
   * windows pane.
   */
  final void setToolWindowsPane(@Nullable final ToolWindowsPane toolWindowsPane) {
    final JComponent contentPane = (JComponent) getContentPane();
    if (myToolWindowsPane != null) {
      contentPane.remove(myToolWindowsPane);
    }

    hideWelcomeScreen(contentPane);

    myToolWindowsPane = toolWindowsPane;
    if (myToolWindowsPane != null) {
      contentPane.add(myToolWindowsPane, BorderLayout.CENTER);
    } else if (!myApplication.isDisposeInProgress()) {
      showWelcomeScreen();
    }

    contentPane.revalidate();
  }