| | |
| | | * |
| | | * |
| | | * Copyright 2008-2010 Sun Microsystems, Inc. |
| | | * Portions Copyright 2014 ForgeRock AS |
| | | */ |
| | | |
| | | package org.opends.guitools.uninstaller.ui; |
| | |
| | | import org.opends.quicksetup.util.UIKeyStore; |
| | | import org.opends.quicksetup.util.Utils; |
| | | |
| | | import org.opends.messages.Message; |
| | | import org.forgerock.i18n.LocalizableMessage; |
| | | import static org.opends.messages.AdminToolMessages.*; |
| | | import static org.opends.messages.QuickSetupMessages.*; |
| | | |
| | |
| | | gbc.fill = GridBagConstraints.BOTH; |
| | | gbc.gridwidth = GridBagConstraints.REMAINDER; |
| | | gbc.insets.left = 0; |
| | | Message msg = INFO_UNINSTALL_LOGIN_DIALOG_MSG.get(); |
| | | LocalizableMessage msg = INFO_UNINSTALL_LOGIN_DIALOG_MSG.get(); |
| | | |
| | | JTextComponent textPane = |
| | | UIFactory.makeHtmlPane(msg, UIFactory.INSTRUCTIONS_FONT); |
| | |
| | | gbc.insets.left = UIFactory.LEFT_INSET_PRIMARY_FIELD; |
| | | gbc.gridwidth = GridBagConstraints.REMAINDER; |
| | | tfHostName = UIFactory.makeJTextField( |
| | | Message.raw(UserData.getDefaultHostName()), |
| | | LocalizableMessage.raw(UserData.getDefaultHostName()), |
| | | INFO_UNINSTALL_LOGIN_HOST_NAME_TOOLTIP.get(), |
| | | UIFactory.HOST_FIELD_SIZE, UIFactory.TextStyle.TEXTFIELD); |
| | | p2.add(tfHostName, gbc); |
| | |
| | | gbc.weightx = 1.0; |
| | | gbc.insets.left = UIFactory.LEFT_INSET_PRIMARY_FIELD; |
| | | gbc.gridwidth = GridBagConstraints.REMAINDER; |
| | | tfUid = UIFactory.makeJTextField(Message.raw(Constants.GLOBAL_ADMIN_UID), |
| | | tfUid = UIFactory.makeJTextField(LocalizableMessage.raw(Constants.GLOBAL_ADMIN_UID), |
| | | INFO_UNINSTALL_LOGIN_UID_TOOLTIP.get(), |
| | | UIFactory.DN_FIELD_SIZE, UIFactory.TextStyle.TEXTFIELD); |
| | | p2.add(tfUid, gbc); |
| | |
| | | } |
| | | else |
| | | { |
| | | Message msg = Utils.getThrowableMsg( |
| | | LocalizableMessage msg = Utils.getThrowableMsg( |
| | | INFO_ERROR_CONNECTING_TO_LOCAL.get(), throwable); |
| | | displayError(msg, INFO_ERROR_TITLE.get()); |
| | | } |
| | |
| | | boolean pwdInvalid = false; |
| | | |
| | | String uid = tfUid.getText(); |
| | | ArrayList<Message> possibleCauses = new ArrayList<Message>(); |
| | | ArrayList<LocalizableMessage> possibleCauses = new ArrayList<LocalizableMessage>(); |
| | | if ("".equals(uid.trim())) |
| | | { |
| | | uidInvalid = true; |
| | |
| | | } |
| | | if (possibleCauses.size() > 0) |
| | | { |
| | | // Message with causes |
| | | // LocalizableMessage with causes |
| | | displayError( |
| | | ERR_CANNOT_CONNECT_TO_LOGIN_WITH_CAUSE.get( |
| | | Utils.getMessageFromCollection(possibleCauses, "\n")), |
| | |
| | | * @param title |
| | | * the title for the dialog. |
| | | */ |
| | | private void displayError(Message msg, Message title) |
| | | private void displayError(LocalizableMessage msg, LocalizableMessage title) |
| | | { |
| | | Utilities.displayError(parent, msg, title); |
| | | toFront(); |
| | |
| | | * @param title |
| | | * the title for the dialog. |
| | | */ |
| | | private void displayInformationMessage(Message msg, Message title) |
| | | private void displayInformationMessage(LocalizableMessage msg, LocalizableMessage title) |
| | | { |
| | | Utilities.displayInformationMessage(parent, msg, title); |
| | | toFront(); |