mirror of https://github.com/OpenIdentityPlatform/OpenDJ.git

Jean-Noël Rouvignac
20.36.2016 2a3158aad80fc910b83336485b3e545dea50066c
opendj-server-legacy/src/main/java/org/opends/guitools/controlpanel/ui/MainMenuBar.java
@@ -12,7 +12,7 @@
 * information: "Portions Copyright [year] [name of copyright owner]".
 *
 * Copyright 2008-2010 Sun Microsystems, Inc.
 * Portions Copyright 2014-2015 ForgeRock AS.
 * Portions Copyright 2014-2016 ForgeRock AS.
 */
package org.opends.guitools.controlpanel.ui;
@@ -37,10 +37,7 @@
import org.opends.guitools.controlpanel.util.Utilities;
import org.forgerock.i18n.LocalizableMessage;
/**
 * The menu bar that appears on the main panel.
 *
 */
/** The menu bar that appears on the main panel. */
public class MainMenuBar extends GenericMenuBar
{
  private static final long serialVersionUID = 6441273044772077947L;
@@ -64,10 +61,7 @@
    }
  }
  /**
   * Method that can be overwritten to set specific menus.
   *
   */
  /** Method that can be overwritten to set specific menus. */
  protected void addMenus()
  {
    add(createFileMenuBar());
@@ -79,7 +73,6 @@
   * The method called when the user clicks on quick.  It will check that there
   * are not ongoing tasks.  If there are tasks, it will ask the user for
   * confirmation to quit.
   *
   */
  public void quitClicked()
  {
@@ -120,6 +113,7 @@
        INFO_CTRL_PANEL_CONNECT_TO_SERVER_MENU.get());
    menuItem.addActionListener(new ActionListener()
    {
      @Override
      public void actionPerformed(ActionEvent ev)
      {
        connectToServerClicked();
@@ -132,7 +126,7 @@
      menuItem = Utilities.createMenuItem(INFO_CTRL_PANEL_EXIT_MENU.get());
      menuItem.addActionListener(new ActionListener()
      {
        /** {@inheritDoc} */
        @Override
        public void actionPerformed(ActionEvent ev)
        {
          quitClicked();
@@ -156,6 +150,7 @@
        INFO_CTRL_PANEL_REFRESH_MENU.get());
    menuItem.addActionListener(new ActionListener()
    {
      @Override
      public void actionPerformed(ActionEvent ev)
      {
        refreshOptionsClicked();
@@ -165,11 +160,7 @@
    return menu;
  }
  /**
   * Specific method to be able to handle the Quit events sent from the COCOA
   * menu of Mac OS.
   *
   */
  /** Specific method to be able to handle the Quit events sent from the COCOA menu of Mac OS. */
  private void setMacOSQuitHandler()
  {
    try
@@ -182,6 +173,7 @@
          (Class[])null).newInstance((Object[])null);
      InvocationHandler adapter = new InvocationHandler()
      {
        @Override
        public Object invoke (Object proxy, Method method, Object[] args)
        throws Throwable
        {
@@ -209,10 +201,7 @@
    }
  }
  /**
   * The method called when the user clicks on 'Refresh Options'.
   *
   */
  /** The method called when the user clicks on 'Refresh Options'. */
  protected void refreshOptionsClicked()
  {
    if (panel == null)
@@ -235,9 +224,7 @@
    }
  }
  /**
   * The method called when the user clicks on 'Connect to Server...'.
   */
  /** The method called when the user clicks on 'Connect to Server...'. */
  protected void connectToServerClicked()
  {
    Set<String> runningTasks = new HashSet<>();