aboutsummaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorDamian Minkov <damencho@jitsi.org>2010-12-21 13:04:04 +0000
committerDamian Minkov <damencho@jitsi.org>2010-12-21 13:04:04 +0000
commitd0ea5389671ab65f6ba60614a6f211e38d61f5d1 (patch)
tree4858609d7117b635fb071239ffb5ccce56f28039 /src
parent440f1b3ba9bab396b2723e6cf27e81ff7be9643c (diff)
downloadjitsi-d0ea5389671ab65f6ba60614a6f211e38d61f5d1.zip
jitsi-d0ea5389671ab65f6ba60614a6f211e38d61f5d1.tar.gz
jitsi-d0ea5389671ab65f6ba60614a6f211e38d61f5d1.tar.bz2
Trim every user id we enter in account wizards.
Remove opaque default setting for menus in MenuBars.
Diffstat (limited to 'src')
-rw-r--r--src/net/java/sip/communicator/impl/gui/main/chat/menus/MessageWindowMenuBar.java5
-rwxr-xr-xsrc/net/java/sip/communicator/impl/gui/main/menus/MainMenu.java2
-rw-r--r--src/net/java/sip/communicator/plugin/aimaccregwizz/FirstWizardPage.java2
-rw-r--r--src/net/java/sip/communicator/plugin/facebookaccregwizz/FirstWizardPage.java2
-rw-r--r--src/net/java/sip/communicator/plugin/gibberishaccregwizz/FirstWizardPage.java2
-rw-r--r--src/net/java/sip/communicator/plugin/googletalkaccregwizz/FirstWizardPage.java2
-rw-r--r--src/net/java/sip/communicator/plugin/icqaccregwizz/FirstWizardPage.java2
-rw-r--r--src/net/java/sip/communicator/plugin/ircaccregwizz/FirstWizardPage.java2
-rw-r--r--src/net/java/sip/communicator/plugin/jabberaccregwizz/AccountPanel.java2
-rw-r--r--src/net/java/sip/communicator/plugin/msnaccregwizz/FirstWizardPage.java2
-rw-r--r--src/net/java/sip/communicator/plugin/sip2sipaccregwizz/CreateSip2SipAccountForm.java2
-rw-r--r--src/net/java/sip/communicator/plugin/sipaccregwizz/AccountPanel.java2
-rw-r--r--src/net/java/sip/communicator/plugin/sshaccregwizz/FirstWizardPage.java2
-rw-r--r--src/net/java/sip/communicator/plugin/yahooaccregwizz/FirstWizardPage.java2
-rw-r--r--src/net/java/sip/communicator/plugin/zeroconfaccregwizz/FirstWizardPage.java2
-rw-r--r--src/net/java/sip/communicator/util/swing/TrimTextField.java31
16 files changed, 45 insertions, 19 deletions
diff --git a/src/net/java/sip/communicator/impl/gui/main/chat/menus/MessageWindowMenuBar.java b/src/net/java/sip/communicator/impl/gui/main/chat/menus/MessageWindowMenuBar.java
index 3084ea5..e6f1b09 100644
--- a/src/net/java/sip/communicator/impl/gui/main/chat/menus/MessageWindowMenuBar.java
+++ b/src/net/java/sip/communicator/impl/gui/main/chat/menus/MessageWindowMenuBar.java
@@ -109,11 +109,6 @@ public class MessageWindowMenuBar
*/
private void init()
{
- fileMenu.setOpaque(false);
- editMenu.setOpaque(false);
- optionsMenu.setOpaque(false);
- helpMenu.setOpaque(false);
-
this.add(fileMenu);
this.add(editMenu);
this.add(optionsMenu);
diff --git a/src/net/java/sip/communicator/impl/gui/main/menus/MainMenu.java b/src/net/java/sip/communicator/impl/gui/main/menus/MainMenu.java
index fb13289..59d9558 100755
--- a/src/net/java/sip/communicator/impl/gui/main/menus/MainMenu.java
+++ b/src/net/java/sip/communicator/impl/gui/main/menus/MainMenu.java
@@ -45,7 +45,7 @@ public class MainMenu
menu.setText(resources.getI18NString(key));
menu.setMnemonic(resources.getI18nMnemonic(key));
- menu.setOpaque(false);
+
add(menu);
}
diff --git a/src/net/java/sip/communicator/plugin/aimaccregwizz/FirstWizardPage.java b/src/net/java/sip/communicator/plugin/aimaccregwizz/FirstWizardPage.java
index ff9392d..ea3798b 100644
--- a/src/net/java/sip/communicator/plugin/aimaccregwizz/FirstWizardPage.java
+++ b/src/net/java/sip/communicator/plugin/aimaccregwizz/FirstWizardPage.java
@@ -42,7 +42,7 @@ public class FirstWizardPage
*/
private final Component uinPassPanel;
- private JTextField uinField = new JTextField();
+ private JTextField uinField = new TrimTextField();
private JPasswordField passField = new JPasswordField();
diff --git a/src/net/java/sip/communicator/plugin/facebookaccregwizz/FirstWizardPage.java b/src/net/java/sip/communicator/plugin/facebookaccregwizz/FirstWizardPage.java
index 405ae9c..eac8afa 100644
--- a/src/net/java/sip/communicator/plugin/facebookaccregwizz/FirstWizardPage.java
+++ b/src/net/java/sip/communicator/plugin/facebookaccregwizz/FirstWizardPage.java
@@ -47,7 +47,7 @@ public class FirstWizardPage
private JLabel usernameExampleLabel = new JLabel(USER_NAME_EXAMPLE);
- private JTextField usernameField = new JTextField();
+ private JTextField usernameField = new TrimTextField();
private JPasswordField passField = new JPasswordField();
diff --git a/src/net/java/sip/communicator/plugin/gibberishaccregwizz/FirstWizardPage.java b/src/net/java/sip/communicator/plugin/gibberishaccregwizz/FirstWizardPage.java
index b8a1c28..bdd43c7 100644
--- a/src/net/java/sip/communicator/plugin/gibberishaccregwizz/FirstWizardPage.java
+++ b/src/net/java/sip/communicator/plugin/gibberishaccregwizz/FirstWizardPage.java
@@ -45,7 +45,7 @@ public class FirstWizardPage
private JLabel userIDExampleLabel = new JLabel(USER_NAME_EXAMPLE);
- private JTextField userIDField = new JTextField();
+ private JTextField userIDField = new TrimTextField();
private JPasswordField passField = new JPasswordField();
diff --git a/src/net/java/sip/communicator/plugin/googletalkaccregwizz/FirstWizardPage.java b/src/net/java/sip/communicator/plugin/googletalkaccregwizz/FirstWizardPage.java
index 99030c0..8080c13 100644
--- a/src/net/java/sip/communicator/plugin/googletalkaccregwizz/FirstWizardPage.java
+++ b/src/net/java/sip/communicator/plugin/googletalkaccregwizz/FirstWizardPage.java
@@ -50,7 +50,7 @@ public class FirstWizardPage
private JLabel userIDExampleLabel = new JLabel(USER_NAME_EXAMPLE);
- private JTextField userIDField = new JTextField();
+ private JTextField userIDField = new TrimTextField();
private JPasswordField passField = new JPasswordField();
diff --git a/src/net/java/sip/communicator/plugin/icqaccregwizz/FirstWizardPage.java b/src/net/java/sip/communicator/plugin/icqaccregwizz/FirstWizardPage.java
index b3244cb..cc434f8 100644
--- a/src/net/java/sip/communicator/plugin/icqaccregwizz/FirstWizardPage.java
+++ b/src/net/java/sip/communicator/plugin/icqaccregwizz/FirstWizardPage.java
@@ -46,7 +46,7 @@ public class FirstWizardPage
private JLabel passLabel
= new JLabel(Resources.getString("service.gui.PASSWORD"));
- private JTextField uinField = new JTextField();
+ private JTextField uinField = new TrimTextField();
private JPasswordField passField = new JPasswordField();
diff --git a/src/net/java/sip/communicator/plugin/ircaccregwizz/FirstWizardPage.java b/src/net/java/sip/communicator/plugin/ircaccregwizz/FirstWizardPage.java
index e00534f..e10dbcb 100644
--- a/src/net/java/sip/communicator/plugin/ircaccregwizz/FirstWizardPage.java
+++ b/src/net/java/sip/communicator/plugin/ircaccregwizz/FirstWizardPage.java
@@ -80,7 +80,7 @@ public class FirstWizardPage
private JLabel serverExampleLabel = new JLabel(SERVER_EXAMPLE);
- private JTextField userIDField = new JTextField();
+ private JTextField userIDField = new TrimTextField();
private JPasswordField passField = new JPasswordField();
diff --git a/src/net/java/sip/communicator/plugin/jabberaccregwizz/AccountPanel.java b/src/net/java/sip/communicator/plugin/jabberaccregwizz/AccountPanel.java
index cb973ba..d271c95 100644
--- a/src/net/java/sip/communicator/plugin/jabberaccregwizz/AccountPanel.java
+++ b/src/net/java/sip/communicator/plugin/jabberaccregwizz/AccountPanel.java
@@ -43,7 +43,7 @@ public class AccountPanel
private final JLabel userIDExampleLabel = new JLabel(USER_NAME_EXAMPLE);
- private final JTextField userIDField = new JTextField();
+ private final JTextField userIDField = new TrimTextField();
private final JPasswordField passField = new JPasswordField();
diff --git a/src/net/java/sip/communicator/plugin/msnaccregwizz/FirstWizardPage.java b/src/net/java/sip/communicator/plugin/msnaccregwizz/FirstWizardPage.java
index 526b6d2..892b6bd 100644
--- a/src/net/java/sip/communicator/plugin/msnaccregwizz/FirstWizardPage.java
+++ b/src/net/java/sip/communicator/plugin/msnaccregwizz/FirstWizardPage.java
@@ -46,7 +46,7 @@ public class FirstWizardPage
private JLabel uinExampleLabel = new JLabel(USER_NAME_EXAMPLE);
- private JTextField uinField = new JTextField();
+ private JTextField uinField = new TrimTextField();
private JPasswordField passField = new JPasswordField();
diff --git a/src/net/java/sip/communicator/plugin/sip2sipaccregwizz/CreateSip2SipAccountForm.java b/src/net/java/sip/communicator/plugin/sip2sipaccregwizz/CreateSip2SipAccountForm.java
index 4f9eb6a..48d6496 100644
--- a/src/net/java/sip/communicator/plugin/sip2sipaccregwizz/CreateSip2SipAccountForm.java
+++ b/src/net/java/sip/communicator/plugin/sip2sipaccregwizz/CreateSip2SipAccountForm.java
@@ -36,7 +36,7 @@ public class CreateSip2SipAccountForm
/**
* The user name text field.
*/
- private final JTextField usernameField = new JTextField();
+ private final JTextField usernameField = new TrimTextField();
/**
* The display name text field.
diff --git a/src/net/java/sip/communicator/plugin/sipaccregwizz/AccountPanel.java b/src/net/java/sip/communicator/plugin/sipaccregwizz/AccountPanel.java
index b5b61ff..c594545 100644
--- a/src/net/java/sip/communicator/plugin/sipaccregwizz/AccountPanel.java
+++ b/src/net/java/sip/communicator/plugin/sipaccregwizz/AccountPanel.java
@@ -35,7 +35,7 @@ public class AccountPanel
private final JPanel emptyPanel = new TransparentPanel();
- private final JTextField userIDField = new JTextField();
+ private final JTextField userIDField = new TrimTextField();
private final JPasswordField passField = new JPasswordField();
diff --git a/src/net/java/sip/communicator/plugin/sshaccregwizz/FirstWizardPage.java b/src/net/java/sip/communicator/plugin/sshaccregwizz/FirstWizardPage.java
index 4435559..ec6ec80 100644
--- a/src/net/java/sip/communicator/plugin/sshaccregwizz/FirstWizardPage.java
+++ b/src/net/java/sip/communicator/plugin/sshaccregwizz/FirstWizardPage.java
@@ -71,7 +71,7 @@ public class FirstWizardPage
private JPanel emptyPanel9 = new TransparentPanel();
- private JTextField userIDField = new JTextField();
+ private JTextField userIDField = new TrimTextField();
private JTextField identityFileField = new JTextField(
Resources.getString("plugin.sshaccregwizz.OPTIONAL"));
diff --git a/src/net/java/sip/communicator/plugin/yahooaccregwizz/FirstWizardPage.java b/src/net/java/sip/communicator/plugin/yahooaccregwizz/FirstWizardPage.java
index 1368b88..d0b5349 100644
--- a/src/net/java/sip/communicator/plugin/yahooaccregwizz/FirstWizardPage.java
+++ b/src/net/java/sip/communicator/plugin/yahooaccregwizz/FirstWizardPage.java
@@ -48,7 +48,7 @@ public class FirstWizardPage
private JLabel uinExampleLabel = new JLabel(USER_NAME_EXAMPLE);
- private JTextField userIDField = new JTextField();
+ private JTextField userIDField = new TrimTextField();
private JPasswordField passField = new JPasswordField();
diff --git a/src/net/java/sip/communicator/plugin/zeroconfaccregwizz/FirstWizardPage.java b/src/net/java/sip/communicator/plugin/zeroconfaccregwizz/FirstWizardPage.java
index 0b62b32..1775d31 100644
--- a/src/net/java/sip/communicator/plugin/zeroconfaccregwizz/FirstWizardPage.java
+++ b/src/net/java/sip/communicator/plugin/zeroconfaccregwizz/FirstWizardPage.java
@@ -56,7 +56,7 @@ public class FirstWizardPage
private JLabel lastExampleLabel = new JLabel("Ex: Gates");
private JLabel mailExampleLabel = new JLabel("Ex: Bill@microsoft.com");
- private JTextField userIDField = new JTextField();
+ private JTextField userIDField = new TrimTextField();
private JTextField firstField = new JTextField();
private JTextField lastField = new JTextField();
private JTextField mailField = new JTextField();
diff --git a/src/net/java/sip/communicator/util/swing/TrimTextField.java b/src/net/java/sip/communicator/util/swing/TrimTextField.java
new file mode 100644
index 0000000..b966d0f
--- /dev/null
+++ b/src/net/java/sip/communicator/util/swing/TrimTextField.java
@@ -0,0 +1,31 @@
+/*
+ * SIP Communicator, the OpenSource Java VoIP and Instant Messaging client.
+ *
+ * Distributable under LGPL license.
+ * See terms of license at gnu.org.
+ */
+package net.java.sip.communicator.util.swing;
+
+import javax.swing.*;
+
+/**
+ * A custom JTextField that trims the contents before returns it.
+ *
+ * @author Damian Minkov
+ */
+public class TrimTextField
+ extends JTextField
+{
+ /**
+ * Returns the trimmed value of the text contained in the field.
+ * @return the trimmed value of the field.
+ */
+ public String getText()
+ {
+ String txt = super.getText();
+ if(txt != null)
+ return txt.trim();
+ else
+ return null;
+ }
+}