/*
* 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-2009 Sun Microsystems, Inc.
*/
/**
* The main panel of the control panel. It contains a split pane. On the left
* we have some actions and on the right some global information about the
* server.
*
*/
{
/**
* Constructor.
* @param info the control panel info.
*/
{
super(new GridBagLayout());
setOpaque(true); //content panes must be opaque
statusPane = new StatusPanel();
// Create a split pane with the two scroll panes in it.
{
private boolean lastStatusStopped;
/**
* {@inheritDoc}
*/
{
final boolean displayLogin;
{
lastStatusStopped = true;
displayLogin = false;
}
{
lastStatusStopped = false;
displayLogin = true;
}
else
{
displayLogin = false;
}
{
/**
* {@inheritDoc}
*/
public void run()
{
if (displayLogin)
{
getLoginDialog().setVisible(true);
getLoginDialog().toFront();
}
}
});
}
});
gbc);
{
}
else
{
}
}
/**
* Returns the login dialog used to ask authentication to the user.
* @return the login dialog used to ask authentication to the user.
*/
{
return statusPane.getLoginDialog();
}
{
{
if (server.isAuthenticated())
{
try
{
}
catch (Throwable t)
{
}
}
else
{
}
}
{
}
else
{
}
}
/**
* Returns the dialog that is in charge of asking the user the server
* to be administer. This method will return always the same dialog. The
* dialog will do all the logic of updating the ControlPanelInfo object.
* @param info the control panel information object.
* @return the dialog that is in charge of asking the user the server
* to be administer.
*/
{
if (localOrRemoteDlg == null)
{
localOrRemoteDlg.setModal(true);
}
return localOrRemoteDlg;
}
/**
* Returns the dialog that is in charge of asking the user the authentication
* for the local server. This method will return always the same dialog.
* @param info the control panel information object. The
* dialog will do all the logic of updating the ControlPanelInfo object.
* @return the dialog that is in charge of asking the user the authentication
* for the local server.
*/
{
{
}
return loginDlg;
}
}