From 80c58327faaa4873369f6bb949e62792c2f708e0 Mon Sep 17 00:00:00 2001
From: kenneth_suter <kenneth_suter@localhost>
Date: Wed, 15 Aug 2007 21:34:53 +0000
Subject: [PATCH] This commit is a step toward getting OpenDS internationalized. There are still issues to be resolved before we can declare that we are internationalized but this commit covers the bulk of changes needed at this time.
---
opends/src/quicksetup/org/opends/quicksetup/ui/Utilities.java | 36 ++++++++++++++++++++----------------
1 files changed, 20 insertions(+), 16 deletions(-)
diff --git a/opends/src/quicksetup/org/opends/quicksetup/ui/Utilities.java b/opends/src/quicksetup/org/opends/quicksetup/ui/Utilities.java
index 954f9a5..4d1b306 100644
--- a/opends/src/quicksetup/org/opends/quicksetup/ui/Utilities.java
+++ b/opends/src/quicksetup/org/opends/quicksetup/ui/Utilities.java
@@ -26,6 +26,7 @@
*/
package org.opends.quicksetup.ui;
+import org.opends.messages.Message;
import org.opends.quicksetup.util.Utils;
@@ -144,15 +145,16 @@
* @return <CODE>true</CODE> if the user confirms the message, or
* <CODE>false</CODE> if not.
*/
- public static boolean displayConfirmation(JFrame parent, String msg,
- String title)
+ public static boolean displayConfirmation(JFrame parent, Message msg,
+ Message title)
{
return JOptionPane.YES_OPTION == JOptionPane.showOptionDialog(
- parent, wrapMsg(msg, 100), title, JOptionPane.YES_NO_OPTION,
- JOptionPane.QUESTION_MESSAGE, null, // don't use a custom
- // Icon
- null, // the titles of buttons
- null); // default button title
+ parent, wrapMsg(String.valueOf(msg), 100), String.valueOf(title),
+ JOptionPane.YES_NO_OPTION,
+ JOptionPane.QUESTION_MESSAGE,
+ null, // don't use a custom Icon
+ null, // the titles of buttons
+ null); // default button title
}
/**
@@ -161,14 +163,15 @@
* @param parent
* the parent component of the error dialog.
* @param msg
- * the error message.
+ * the error message.
* @param title
* the title for the dialog.
*/
- public static void displayError(Component parent, String msg, String title)
+ public static void displayError(Component parent, Message msg, Message title)
{
- JOptionPane.showMessageDialog(parent, wrapMsg(msg, 100), title,
- JOptionPane.ERROR_MESSAGE);
+ JOptionPane.showMessageDialog(parent,
+ wrapMsg(String.valueOf(msg), 100),
+ String.valueOf(title), JOptionPane.ERROR_MESSAGE);
}
/**
@@ -177,15 +180,16 @@
* @param parent
* the parent frame of the information dialog.
* @param msg
- * the error message.
+ * the error message.
* @param title
* the title for the dialog.
*/
- public static void displayInformationMessage(JFrame parent, String msg,
- String title)
+ public static void displayInformationMessage(JFrame parent, Message msg,
+ Message title)
{
- JOptionPane.showMessageDialog(parent, wrapMsg(msg, 100), title,
- JOptionPane.INFORMATION_MESSAGE);
+ JOptionPane.showMessageDialog(parent,
+ wrapMsg(String.valueOf(msg), 100), String.valueOf(title),
+ JOptionPane.INFORMATION_MESSAGE);
}
/**
--
Gitblit v1.10.0