/*
* 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 2008 Sun Microsystems, Inc.
* Portions Copyright 2013 ForgeRock AS.
*/
/**
*
*/
{
new HtmlProgressMessageFormatter();
/**
* ProgressDialog constructor.
* @param frame the parent frame for this dialog.
*/
{
super(frame);
createLayout();
}
/**
* Prepares size for this dialog.
*
*/
public void pack()
{
/*
* TODO: find a way to calculate this dynamically.
*/
super.pack();
}
/**
* Returns the parent for this dialog.
* @return the parent for this dialog.
*/
{
return parent;
}
/**
* Returns the title of the panel.
* @return the title of the panel
*/
{
return panelTitle;
}
/**
* Sets the enable state of the close button.
* @param enable whether to enable or disable the button.
*/
{
}
/**
* Sets the text in the summary label. The text can be in HTML format.
* @param text the text to be set.
*/
{
} else {
}
}
/**
* Sets the text in the details text pane. The text can be in HTML format.
* @param text the text to be set.
*/
{
} else {
}
}
/**
* Returns the formatter that will be used to display the messages in this
* panel.
* @return the formatter that will be used to display the messages in this
* panel.
*/
{
{
formatter = new HtmlProgressMessageFormatter();
}
return formatter;
}
/**
* Creates the layout of the dialog panel.
*
*/
private void createLayout()
{
/* Create title panel */
titlePanel.setOpaque(false);
JLabel l =
l.setOpaque(false);
/* Create input panel. */
progressBarLabel.setOpaque(false);
progressBarLabel.setEditable(false);
l =
{
public void hyperlinkUpdate(HyperlinkEvent e)
{
{
lastText);
}
}
});
detailsTextArea.setAutoscrolls(true);
scroll.setWheelScrollingEnabled(true);
/* Create buttons panel */
{
{
dispose();
}
});
getContentPane().add(p);
}
/**
* Creates the progress bar panel.
* @return the created panel.
*/
{
progressBar = new JProgressBar();
progressBar.setIndeterminate(true);
// The ProgressDescriptor provides the ratio in %
//panel.add(progressBar, gbc);
return panel;
}
/**
* Method written for testing purposes.
* @param args the arguments to be passed to the test program.
*/
{
try
{
dlg.setVisible(true);
{
}
}
}