| | |
| | | * information: "Portions Copyright [year] [name of copyright owner]". |
| | | * |
| | | * Copyright 2008-2010 Sun Microsystems, Inc. |
| | | * Portions Copyright 2011-2015 ForgeRock AS. |
| | | * Portions Copyright 2011-2016 ForgeRock AS. |
| | | */ |
| | | |
| | | package org.opends.guitools.controlpanel; |
| | |
| | | final ControlPanel test = new ControlPanel(); |
| | | test.initialize(args); |
| | | javax.swing.SwingUtilities.invokeLater(new Runnable() { |
| | | @Override |
| | | public void run() { |
| | | test.createAndDisplayGUI(); |
| | | } |
| | |
| | | info.setConnectTimeout(argParser.getConnectTimeout()); |
| | | } |
| | | |
| | | /** |
| | | * Creates the main Control Panel dialog and displays it. |
| | | */ |
| | | /** Creates the main Control Panel dialog and displays it. */ |
| | | public void createAndDisplayGUI() |
| | | { |
| | | LocalOrRemotePanel localOrRemotePanel = new LocalOrRemotePanel(); |
| | |
| | | |
| | | ComponentListener listener = new ComponentAdapter() |
| | | { |
| | | /** {@inheritDoc} */ |
| | | @Override |
| | | public void componentHidden(ComponentEvent e) |
| | | { |
| | | handleWindowClosed(localOrRemote, info); |
| | |
| | | // calling pack. |
| | | SwingUtilities.invokeLater(new Runnable() |
| | | { |
| | | @Override |
| | | public void run() |
| | | { |
| | | // Create and set up the content pane. |
| | |
| | | dlg.setDefaultCloseOperation(WindowConstants.DO_NOTHING_ON_CLOSE); |
| | | final MainMenuBar menuBar = new MainMenuBar(info); |
| | | dlg.addWindowListener(new WindowAdapter() { |
| | | @Override |
| | | public void windowClosing(WindowEvent e) { |
| | | menuBar.quitClicked(); |
| | | } |