/*
* 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.
* Portions Copyright 2013 ForgeRock AS.
*/
/**
* This panel is used to show the progress of the application.
*
*/
{
/**
* ProgressPanel constructor.
* @param application Application this panel represents
*/
{
super(application);
}
/**
* {@inheritDoc}
*/
{
null,
progressBarLabel.setOpaque(false);
progressBarLabel.setEditable(false);
progressBarLabel.setFocusable(false);
progressBarLabel.setFocusCycleRoot(false);
{
{
// Assume is the authentication button.
}
});
JLabel l =
{
public void hyperlinkUpdate(HyperlinkEvent e)
{
{
lastText);
}
}
});
detailsTextArea.setAutoscrolls(true);
scroll.setWheelScrollingEnabled(true);
return panel;
}
/**
* {@inheritDoc}
*/
{
return null;
}
/**
* {@inheritDoc}
*/
{
return INFO_PROGRESS_PANEL_TITLE.get();
}
/**
* {@inheritDoc}
*/
protected boolean requiresScroll()
{
return false;
}
/**
* {@inheritDoc}
*/
public void endDisplay()
{
if (lastFocusComponent != null)
{
}
}
/**
* {@inheritDoc}
*/
{
progressBar.setVisible(false);
progressBarLabel.setFocusable(true);
btnCancel.setVisible(false);
}
}
if (v != null && v > 0)
{
progressBar.setIndeterminate(false);
progressBar.setValue(v);
}
}
/**
* Creates the progress bar panel.
* @return the created panel.
*/
{
public void actionPerformed(ActionEvent e) {
btnCancel.setEnabled(false);
}
}
});
progressBar = new JProgressBar();
progressBar.setIndeterminate(true);
// The ProgressDescriptor provides the ratio in %
if (getApplication().isCancellable()) {
}
return panel;
}
/**
* Adds the required focus listeners to the fields.
*/
private void addFocusListeners()
{
final FocusListener l = new FocusListener()
{
public void focusGained(FocusEvent e)
{
lastFocusComponent = e.getComponent();
}
public void focusLost(FocusEvent e)
{
}
};
JComponent[] comps =
{
};
comp.addFocusListener(l);
}
}
}