| | |
| | | * |
| | | * |
| | | * Copyright 2006-2010 Sun Microsystems, Inc. |
| | | * Portions Copyright 2013 ForgeRock AS. |
| | | * Portions Copyright 2013-2014 ForgeRock AS. |
| | | */ |
| | | |
| | | package org.opends.quicksetup.installer.ui; |
| | | |
| | | import org.opends.messages.Message; |
| | | import org.opends.messages.MessageBuilder; |
| | | import org.forgerock.i18n.LocalizableMessage; |
| | | import org.forgerock.i18n.LocalizableMessageBuilder; |
| | | import static org.opends.messages.QuickSetupMessages.*; |
| | | |
| | | import org.opends.admin.ads.ServerDescriptor; |
| | |
| | | private JLabel warningLabel; |
| | | |
| | | private JComboBox viewCombo; |
| | | private final Message DISPLAY_TEXT = INFO_REVIEW_DISPLAY_TEXT.get(); |
| | | private final Message DISPLAY_EQUIVALENT_COMMAND = |
| | | private final LocalizableMessage DISPLAY_TEXT = INFO_REVIEW_DISPLAY_TEXT.get(); |
| | | private final LocalizableMessage DISPLAY_EQUIVALENT_COMMAND = |
| | | INFO_REVIEW_DISPLAY_EQUIVALENT_COMMAND.get(); |
| | | |
| | | private JComponent cardLayoutPanel; |
| | |
| | | { |
| | | JPanel instructionsPanel = new JPanel(new GridBagLayout()); |
| | | instructionsPanel.setOpaque(false); |
| | | Message instructions = getInstructions(); |
| | | LocalizableMessage instructions = getInstructions(); |
| | | JLabel l = new JLabel(instructions.toString()); |
| | | l.setFont(UIFactory.INSTRUCTIONS_FONT); |
| | | |
| | | Message[] values = { |
| | | LocalizableMessage[] values = { |
| | | DISPLAY_TEXT, |
| | | DISPLAY_EQUIVALENT_COMMAND |
| | | }; |
| | |
| | | /** |
| | | * {@inheritDoc} |
| | | */ |
| | | protected Message getInstructions() |
| | | protected LocalizableMessage getInstructions() |
| | | { |
| | | return INFO_REVIEW_PANEL_INSTRUCTIONS.get(); |
| | | } |
| | |
| | | /** |
| | | * {@inheritDoc} |
| | | */ |
| | | protected Message getTitle() |
| | | protected LocalizableMessage getTitle() |
| | | { |
| | | return INFO_REVIEW_PANEL_TITLE.get(); |
| | | } |
| | |
| | | */ |
| | | private String getReplicationPortString(UserData userInstallData) |
| | | { |
| | | MessageBuilder buf = new MessageBuilder(); |
| | | LocalizableMessageBuilder buf = new LocalizableMessageBuilder(); |
| | | |
| | | DataReplicationOptions repl = |
| | | userInstallData.getReplicationOptions(); |
| | |
| | | .getReplicationPort()); |
| | | } |
| | | buf.append(s); |
| | | TreeSet<Message> remoteServerLines = new TreeSet<Message>(); |
| | | TreeSet<LocalizableMessage> remoteServerLines = new TreeSet<LocalizableMessage>(); |
| | | for (ServerDescriptor server : remotePorts.keySet()) |
| | | { |
| | | String serverDisplay; |
| | |
| | | remoteServerLines.add(INFO_REMOTE_SERVER_REPLICATION_PORT.get(s, |
| | | serverDisplay)); |
| | | } |
| | | for (Message line : remoteServerLines) |
| | | for (LocalizableMessage line : remoteServerLines) |
| | | { |
| | | buf.append("\n").append(line); |
| | | } |
| | |
| | | INFO_INSTALL_STOP_SERVER_EQUIVALENT_COMMAND_LINE.get())); |
| | | sb.append(formatter.getLineBreak()); |
| | | sb.append(Constants.HTML_BOLD_OPEN) |
| | | .append(formatter.getFormattedProgress(Message.raw(cmd))) |
| | | .append(formatter.getFormattedProgress(LocalizableMessage.raw(cmd))) |
| | | .append(Constants.HTML_BOLD_CLOSE); |
| | | } |
| | | equivalentCommandPane.setText(sb.toString()); |