/*
* 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
* 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
* trunk/opends/resource/legal-notices/OpenDS.LICENSE. 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 2006-2009 Sun Microsystems, Inc.
*/
/**
* This class displays the different steps of the wizard. It appears on the
* left of the dialog.
*
* The current step is highlighted using a different label style and an icon.
* The current displayed step can be changed calling the method setCurrentStep.
*
*/
{
/**
* Creates a StepsPanel.
* @param app Application whose steps this class represents
*/
{
super(app);
}
/**
* Updates the layout of the panel so that it corresponds to the Step passed
* as parameter.
*
* @param step the step in the wizard.
* @param userData the data provided by the user.
*/
{
{
{
getIcon(s).setVisible(true);
}
else
{
{
getIcon(s).setVisible(false);
}
{
}
}
}
}
/**
* Updates the visibility of the steps depending on the current contents
* of the panels (uses the QuickSetup to know what is displayed in the
* panels).
*
* @param qs the QuickSetup object.
*/
{
{
}
}
/**
* Creates the layout of the panel.
* @param app Application whose steps this class represents
*/
{
setLayout(new GridBagLayout());
boolean first = true;
for (WizardStep s : orderedSteps)
{
if (!first)
{
}
if (getApplication().isSubStep(s))
{
}
stepLabel.setLabelFor(this);
first = false;
}
// We are creating all the labels with the style
// UIFactory.LabelStyle.CURRENT_STEP which is the one
// that takes more space. But once we display the dialog only one
// of the labels will have that style and the other will have
// UIFactory.LabelStyle.NOT_CURRENT_STEP. Adding the strut guarantees
// that the width of the panel will always be enough to display the
// longest label using UIFactory.LabelStyle.CURRENT_STEP.
}
/**
* Returns the label associated with the given step.
* @param step the step for which we want to retrieve the JLabel.
* @return the label associated with the given step.
*/
{
}
/**
* Returns the icon associated with the given step.
* @param step the step for which we want to retrieve the Icon.
* @return the icon associated with the given step.
*/
{
}
/**
* Returns the sub-panel associated with the given step.
* @param step the step for which we want to retrieve the sub-panel.
* @return the sub-panel associated with the given step.
*/
{
}
{
// Check done to minimize possible flickering.
{
}
}
}