| | |
| | | * |
| | | * |
| | | * Copyright 2008-2010 Sun Microsystems, Inc. |
| | | * Portions Copyright 2014 ForgeRock AS |
| | | */ |
| | | |
| | | package org.opends.guitools.controlpanel.ui; |
| | |
| | | import org.opends.guitools.controlpanel.ui.components.BasicExpander; |
| | | import org.opends.guitools.controlpanel.util.ApplicationPrintStream; |
| | | import org.opends.guitools.controlpanel.util.Utilities; |
| | | import org.opends.messages.Message; |
| | | import org.forgerock.i18n.LocalizableMessage; |
| | | |
| | | /** |
| | | * The dialog that is used to display progress in a task. |
| | |
| | | * @param info the control panel information. |
| | | */ |
| | | public ProgressDialog(JFrame parentFrame, Component relativeTo, |
| | | Message title, ControlPanelInfo info) |
| | | LocalizableMessage title, ControlPanelInfo info) |
| | | { |
| | | super(parentFrame, getPanel(info)); |
| | | Utilities.centerGoldenMean(this, relativeTo); |
| | |
| | | * dialog. |
| | | * @param text the text to be displayed. |
| | | */ |
| | | public void setSummary(Message text) |
| | | public void setSummary(LocalizableMessage text) |
| | | { |
| | | progressPanel.setSummary(text); |
| | | } |
| | |
| | | /** |
| | | * {@inheritDoc} |
| | | */ |
| | | public Message getTitle() |
| | | public LocalizableMessage getTitle() |
| | | { |
| | | return null; |
| | | } |
| | |
| | | * dialog. |
| | | * @param msg the text to be displayed. |
| | | */ |
| | | public void setSummary(Message msg) |
| | | public void setSummary(LocalizableMessage msg) |
| | | { |
| | | errorPane.setText(msg.toString()); |
| | | |
| | | if (!details.isSelected() && isVisible()) |
| | | { |
| | | Message wrappedText = Utilities.wrapHTML(msg, 70); |
| | | LocalizableMessage wrappedText = Utilities.wrapHTML(msg, 70); |
| | | JEditorPane pane = new JEditorPane(); |
| | | pane.setContentType("text/html"); |
| | | pane.setText(wrappedText.toString()); |