| | |
| | | import org.opends.server.util.StaticUtils; |
| | | |
| | | import static org.opends.server.types.CommonSchemaElements.*; |
| | | import static com.forgerock.opendj.cli.Utils.wrapText; |
| | | |
| | | /** |
| | | * A static class that provides miscellaneous functions. |
| | |
| | | } |
| | | String msg = getStringFromCollection(stringErrors, "<br>"); |
| | | String plainText = msg.replaceAll("<br>", ServerConstants.EOL); |
| | | String wrappedText = StaticUtils.wrapText(plainText, 70); |
| | | String wrappedText = wrapText(plainText, 70); |
| | | wrappedText = wrappedText.replaceAll(ServerConstants.EOL, "<br>"); |
| | | JOptionPane.showMessageDialog( |
| | | parentComponent, "<html>"+wrappedText, |
| | |
| | | LocalizableMessage title, LocalizableMessage msg) |
| | | { |
| | | String plainText = msg.toString().replaceAll("<br>", ServerConstants.EOL); |
| | | String wrappedText = StaticUtils.wrapText(plainText, 70); |
| | | String wrappedText = wrapText(plainText, 70); |
| | | wrappedText = wrappedText.replaceAll(ServerConstants.EOL, "<br>"); |
| | | return JOptionPane.YES_OPTION == JOptionPane.showOptionDialog( |
| | | parentComponent, "<html>"+wrappedText, |
| | |
| | | LocalizableMessage title, LocalizableMessage msg) |
| | | { |
| | | String plainText = msg.toString().replaceAll("<br>", ServerConstants.EOL); |
| | | String wrappedText = StaticUtils.wrapText(plainText, 70); |
| | | String wrappedText = wrapText(plainText, 70); |
| | | wrappedText = wrappedText.replaceAll(ServerConstants.EOL, "<br>"); |
| | | JOptionPane.showMessageDialog( |
| | | parentComponent, "<html>"+wrappedText, |
| | |
| | | public static void updatePreferredSize(JEditorPane pane, int nCols, |
| | | String plainText, Font font, boolean applyBackground) |
| | | { |
| | | String wrappedText = StaticUtils.wrapText(plainText, nCols); |
| | | String wrappedText = wrapText(plainText, nCols); |
| | | wrappedText = wrappedText.replaceAll(ServerConstants.EOL, "<br>"); |
| | | if (applyBackground) |
| | | { |