diff options
author | Ingo Bauersachs <ingo@jitsi.org> | 2017-01-14 17:25:18 +0100 |
---|---|---|
committer | Ingo Bauersachs <ingo@jitsi.org> | 2017-01-14 17:25:18 +0100 |
commit | 79bb78b83c1b797a6091de2d8c82591ab5724283 (patch) | |
tree | c81563ba0ecfa4e08d7c43cb458837a50d983e53 | |
parent | c7bdaa5539e796e6507b08ff0f87e5c955fb451f (diff) | |
download | jitsi-79bb78b83c1b797a6091de2d8c82591ab5724283.zip jitsi-79bb78b83c1b797a6091de2d8c82591ab5724283.tar.gz jitsi-79bb78b83c1b797a6091de2d8c82591ab5724283.tar.bz2 |
Fix layout of call config options in general config
-rw-r--r-- | src/net/java/sip/communicator/plugin/generalconfig/GeneralConfigurationPanel.java | 62 |
1 files changed, 12 insertions, 50 deletions
diff --git a/src/net/java/sip/communicator/plugin/generalconfig/GeneralConfigurationPanel.java b/src/net/java/sip/communicator/plugin/generalconfig/GeneralConfigurationPanel.java index 04d55a5..03fc308 100644 --- a/src/net/java/sip/communicator/plugin/generalconfig/GeneralConfigurationPanel.java +++ b/src/net/java/sip/communicator/plugin/generalconfig/GeneralConfigurationPanel.java @@ -960,13 +960,11 @@ public class GeneralConfigurationPanel */ private Component createNormalizeNumberCheckBox() { - JPanel checkBoxPanel = new TransparentPanel(new BorderLayout()); - - SIPCommCheckBox formatPhoneNumber = new SIPCommCheckBox("", + SIPCommCheckBox formatPhoneNumber = new SIPCommCheckBox( + GeneralConfigPluginActivator.getResources().getI18NString( + "plugin.generalconfig.REMOVE_SPECIAL_PHONE_SYMBOLS"), ConfigurationUtils.isNormalizePhoneNumber()); - formatPhoneNumber.setAlignmentY(Component.TOP_ALIGNMENT); - formatPhoneNumber.addActionListener(new ActionListener() { public void actionPerformed(ActionEvent e) @@ -976,22 +974,7 @@ public class GeneralConfigurationPanel } }); - StyledHTMLEditorPane checkBoxTextLabel = new StyledHTMLEditorPane(); - - checkBoxTextLabel.setContentType("text/html"); - checkBoxTextLabel.appendToEnd( - "<html>" + GeneralConfigPluginActivator.getResources().getI18NString( - "plugin.generalconfig.REMOVE_SPECIAL_PHONE_SYMBOLS") + "</html>"); - - checkBoxTextLabel.setBorder( - BorderFactory.createEmptyBorder(3, 0, 0, 0)); - checkBoxTextLabel.setOpaque(false); - checkBoxTextLabel.setEditable(false); - - checkBoxPanel.add(formatPhoneNumber, BorderLayout.WEST); - checkBoxPanel.add(checkBoxTextLabel, BorderLayout.CENTER); - - return checkBoxPanel; + return formatPhoneNumber; } /** @@ -1001,17 +984,17 @@ public class GeneralConfigurationPanel */ private Component createAcceptPhoneNumberWithAlphaCharCheckBox() { - JPanel checkBoxPanel = new TransparentPanel(new BorderLayout()); + JPanel checkBoxPanel = new TransparentPanel(); + checkBoxPanel.setLayout(new BoxLayout(checkBoxPanel, BoxLayout.Y_AXIS)); // Checkbox to accept string with alphabetical characters as potential // phone numbers. - SIPCommCheckBox acceptPhoneNumberWithAlphaChars - = new SIPCommCheckBox("", + SIPCommCheckBox alphaCharNumbers = new SIPCommCheckBox( + GeneralConfigPluginActivator.getResources().getI18NString( + "plugin.generalconfig.ACCEPT_PHONE_NUMBER_WITH_ALPHA_CHARS"), ConfigurationUtils.acceptPhoneNumberWithAlphaChars()); - acceptPhoneNumberWithAlphaChars.setAlignmentY(Component.TOP_ALIGNMENT); - - acceptPhoneNumberWithAlphaChars.addActionListener(new ActionListener() + alphaCharNumbers.addActionListener(new ActionListener() { public void actionPerformed(ActionEvent e) { @@ -1020,21 +1003,6 @@ public class GeneralConfigurationPanel } }); - StyledHTMLEditorPane acceptPhoneNumberWithAlphaCharsTextLabel - = new StyledHTMLEditorPane(); - - acceptPhoneNumberWithAlphaCharsTextLabel.setContentType("text/html"); - acceptPhoneNumberWithAlphaCharsTextLabel.appendToEnd( - "<html>" - + GeneralConfigPluginActivator.getResources().getI18NString( - "plugin.generalconfig.ACCEPT_PHONE_NUMBER_WITH_ALPHA_CHARS") - + "</html>"); - - acceptPhoneNumberWithAlphaCharsTextLabel.setBorder( - BorderFactory.createEmptyBorder(3, 0, 0, 0)); - acceptPhoneNumberWithAlphaCharsTextLabel.setOpaque(false); - acceptPhoneNumberWithAlphaCharsTextLabel.setEditable(false); - // The example of changing letters to numbers in a phone number. String label = "* " + Resources.getString( "plugin.generalconfig.ACCEPT_PHONE_NUMBER_WITH_ALPHA_CHARS_EXAMPLE"); @@ -1046,14 +1014,8 @@ public class GeneralConfigurationPanel exampleLabel.setHorizontalAlignment(JLabel.LEFT); // Adds the components to the current panel. - checkBoxPanel.add(acceptPhoneNumberWithAlphaChars, BorderLayout.WEST); - checkBoxPanel.add( - acceptPhoneNumberWithAlphaCharsTextLabel, - BorderLayout.CENTER); - checkBoxPanel.add( - exampleLabel, - BorderLayout.SOUTH); - + checkBoxPanel.add(alphaCharNumbers); + checkBoxPanel.add(exampleLabel); return checkBoxPanel; } |