/*
* CDDL HEADER START
*
* The contents of this file are subject to the terms of the
* Common Development and Distribution License, Version 1.0 only
* (the "License"). You may not use this file except in compliance
* with the License.
*
* You can obtain a copy of the license at legal-notices/CDDLv1_0.txt
* See the License for the specific language governing permissions
* and limitations under the License.
*
* When distributing Covered Code, include this CDDL HEADER in each
* file and include the License file at legal-notices/CDDLv1_0.txt.
* If applicable, add the following below this CDDL HEADER, with the
* fields enclosed by brackets "[]" replaced with your own identifying
* information:
* Portions Copyright [yyyy] [name of copyright owner]
*
* CDDL HEADER END
*
*
* Copyright 2008-2010 Sun Microsystems, Inc.
* Portions Copyright 2011 ForgeRock AS
*/
/**
* The class that is in charge of creating the main dialog of the ControlPanel
* and the ControlCenterInfo (the data structure that is used by all the GUI
* components and that contains information about the server status and server
* configuration).
*/
public class ControlPanel
{
/**
* Main method that is used for testing purposes. The control-panel
* command-line is launched through the ControlPanelLauncher (which displays
* a splash screen and calls the <code>initialize</code> and
* <code>createAndDisplayMethods</code>.
* @param args the arguments that are passed.
*/
try
{
}
catch (Throwable t)
{
t.printStackTrace();
}
public void run() {
}
});
}
/**
* Method that creates the ControlCenterInfo object that will be in all the
* control panel. Nothing is done here: the user must say whether the server
* is local or remote.
* @param args the arguments that are passed in the command line. The code
* assumes that the arguments have been already validated.
*/
{
// Call Installation because the LocalOrRemotePanel uses it to check
// whether the server is running or not and to get the install path.
try
{
}
catch (ArgumentException ae)
{
// Bug
ae);
}
if (argParser.isTrustAll())
{
}
}
/**
* Creates the main Control Panel dialog and displays it.
*/
public void createAndDisplayGUI()
{
{
}
{
setCallOKWhenVisible(true);
}
{
/**
* {@inheritDoc}
*/
public void componentHidden(ComponentEvent e)
{
}
};
localOrRemote.setVisible(true);
}
final ControlPanelInfo info)
{
{
// Assume that the user decided to quit the application
}
// To be sure that the dialog receives the new configuration event before
// calling pack.
{
public void run()
{
// Create and set up the content pane.
// Create and set up the window.
public void windowClosing(WindowEvent e) {
}
});
"INFO_CONTROL_PANEL_TITLE",
dlg.setVisible(true);
}
});
}
{
}
{
{
{
}
{
}
{
}
{
}
{
}
}
}
/**
* A method used to update the contents of the dialog displayed when the user
* selects 'Server To Administer...'. This is done because this class
* displays a GenericFrame and in the rest of the UI a GenericDialog is
* shown.
* @param localOrRemote the frame displayed by this class.
* @param info the generic info.
*/
{
{
{
}
{
}
{
}
}
}
{
if (c instanceof LocalOrRemotePanel)
{
panel = (LocalOrRemotePanel)c;
}
else
{
{
{
}
{
break;
}
}
}
return panel;
}
}