diff options
author | Lyubomir Marinov <lyubomir.marinov@jitsi.org> | 2010-12-14 21:46:52 +0000 |
---|---|---|
committer | Lyubomir Marinov <lyubomir.marinov@jitsi.org> | 2010-12-14 21:46:52 +0000 |
commit | 352c5f2509959e5c7ad8806aee67ecebbc60017f (patch) | |
tree | 2842f4a7b88623eba8afb34f64e861c92fae7a84 | |
parent | 3f394899e736b20096d97886551591b9505f1ded (diff) | |
download | jitsi-352c5f2509959e5c7ad8806aee67ecebbc60017f.zip jitsi-352c5f2509959e5c7ad8806aee67ecebbc60017f.tar.gz jitsi-352c5f2509959e5c7ad8806aee67ecebbc60017f.tar.bz2 |
Commits patches to enable the blue theme for the tabs of various pages in Tools > Options provided by Akash Nawani in the dev mailing list thread "Regarding Security Page".
9 files changed, 46 insertions, 26 deletions
diff --git a/src/net/java/sip/communicator/impl/gui/main/chat/conference/ChatRoomConfigurationWindow.java b/src/net/java/sip/communicator/impl/gui/main/chat/conference/ChatRoomConfigurationWindow.java index 68bb470..7fafd73 100644 --- a/src/net/java/sip/communicator/impl/gui/main/chat/conference/ChatRoomConfigurationWindow.java +++ b/src/net/java/sip/communicator/impl/gui/main/chat/conference/ChatRoomConfigurationWindow.java @@ -74,7 +74,7 @@ public class ChatRoomConfigurationWindow /** * The tabbed pane containing the "General" and "Options" tabs. */ - private JTabbedPane tabbedPane = new SIPCommTabbedPane(false, false); + private final JTabbedPane tabbedPane = new SIPCommTabbedPane(); /** * The panel containing the title. @@ -408,7 +408,7 @@ public class ChatRoomConfigurationWindow { boolean isSelected = ((AbstractButton)c).isSelected(); - formField.addValue(new Boolean(isSelected)); + formField.addValue(Boolean.valueOf(isSelected)); } else if (c instanceof JComboBox) { @@ -434,6 +434,7 @@ public class ChatRoomConfigurationWindow new Thread() { + @Override public void run() { try diff --git a/src/net/java/sip/communicator/impl/neomedia/ZrtpConfigurePanel.java b/src/net/java/sip/communicator/impl/neomedia/ZrtpConfigurePanel.java index 6413a99..ecfef85 100644 --- a/src/net/java/sip/communicator/impl/neomedia/ZrtpConfigurePanel.java +++ b/src/net/java/sip/communicator/impl/neomedia/ZrtpConfigurePanel.java @@ -127,8 +127,8 @@ public class ZrtpConfigurePanel } else if (source == saveButton) { - Boolean t = new Boolean(active.isTrustedMitM()); - Boolean s = new Boolean(active.isSasSignature()); + Boolean t = Boolean.valueOf(active.isTrustedMitM()); + Boolean s = Boolean.valueOf(active.isSasSignature()); NeomediaActivator.getConfigurationService() .setProperty(TRUSTED_PROP, t); NeomediaActivator.getConfigurationService() @@ -161,7 +161,7 @@ public class ZrtpConfigurePanel trustedMitM.addItemListener(itemListener); sasSignature.addItemListener(itemListener); - JTabbedPane algorithmsPane = new JTabbedPane(); + JTabbedPane algorithmsPane = new SIPCommTabbedPane(); algorithmsPane.addTab( resources.getI18NString("impl.media.security.zrtp.PUB_KEYS"), @@ -191,7 +191,8 @@ public class ZrtpConfigurePanel private <T extends Enum<T>>String getPropertyValue(T algo) { - StringBuffer strb = new StringBuffer(); + StringBuilder strb = new StringBuilder(); + for (T it : active.algos(algo)) { strb.append(it.name()); strb.append(';'); diff --git a/src/net/java/sip/communicator/plugin/accountinfo/AccountInfoPanel.java b/src/net/java/sip/communicator/plugin/accountinfo/AccountInfoPanel.java index 527dcb2..afb6af5 100644 --- a/src/net/java/sip/communicator/plugin/accountinfo/AccountInfoPanel.java +++ b/src/net/java/sip/communicator/plugin/accountinfo/AccountInfoPanel.java @@ -43,7 +43,7 @@ public class AccountInfoPanel {
super(new BorderLayout());
- JTabbedPane accountsTabbedPane = new SIPCommTabbedPane(false, false);
+ JTabbedPane accountsTabbedPane = new SIPCommTabbedPane();
for (ProtocolProviderFactory providerFactory : AccountInfoActivator
.getProtocolProviderFactories().values())
diff --git a/src/net/java/sip/communicator/plugin/contactinfo/ContactInfoDetailsPanel.java b/src/net/java/sip/communicator/plugin/contactinfo/ContactInfoDetailsPanel.java index 91b55d1..6fc1922 100644 --- a/src/net/java/sip/communicator/plugin/contactinfo/ContactInfoDetailsPanel.java +++ b/src/net/java/sip/communicator/plugin/contactinfo/ContactInfoDetailsPanel.java @@ -32,7 +32,7 @@ public class ContactInfoDetailsPanel /**
* The tabbed pane containing the two different tabs for details.
*/
- private JTabbedPane tabbedPane = new SIPCommTabbedPane(false, false);
+ private final JTabbedPane tabbedPane = new SIPCommTabbedPane();
/**
* The operation set giving access to the server stored contact details.
diff --git a/src/net/java/sip/communicator/plugin/jabberaccregwizz/FirstWizardPage.java b/src/net/java/sip/communicator/plugin/jabberaccregwizz/FirstWizardPage.java index dbcc421..6fb9fe0 100644 --- a/src/net/java/sip/communicator/plugin/jabberaccregwizz/FirstWizardPage.java +++ b/src/net/java/sip/communicator/plugin/jabberaccregwizz/FirstWizardPage.java @@ -71,7 +71,7 @@ public class FirstWizardPage */ private void init() { - JTabbedPane tabbedPane = new SIPCommTabbedPane(false, false); + JTabbedPane tabbedPane = new SIPCommTabbedPane(); this.setBorder(BorderFactory.createEmptyBorder(10, 10, 10, 10)); diff --git a/src/net/java/sip/communicator/plugin/keybindingchooser/KeybindingsConfigPanel.java b/src/net/java/sip/communicator/plugin/keybindingchooser/KeybindingsConfigPanel.java index 941db81..829d65d 100644 --- a/src/net/java/sip/communicator/plugin/keybindingchooser/KeybindingsConfigPanel.java +++ b/src/net/java/sip/communicator/plugin/keybindingchooser/KeybindingsConfigPanel.java @@ -51,11 +51,13 @@ public class KeybindingsConfigPanel KeybindingsService service = getKeybindingsService(); setFocusable(true); - JTabbedPane chooserPanes = new JTabbedPane(); + + JTabbedPane chooserPanes = new SIPCommTabbedPane(); // deselects entries awaiting input when focus is lost this.addFocusListener(new FocusAdapter() { + @Override public void focusLost(FocusEvent event) { for (SIPChooser chooser : choosers.values()) @@ -150,6 +152,7 @@ public class KeybindingsConfigPanel new HashMap<String, String>(); // Calls focus to the form so keyboard events are received + @Override protected void onClick(MouseEvent event, BindingEntry entry, BindingEntry.Field field) { @@ -157,6 +160,7 @@ public class KeybindingsConfigPanel KeybindingsConfigPanel.this.requestFocus(); } + @Override public boolean putBinding(BindingEntry newEntry, int index) { // Converts to I18N strings for UI @@ -192,10 +196,10 @@ public class KeybindingsConfigPanel */ private String getI18NString(String key) { - StringBuffer newKey = new StringBuffer(); + StringBuilder newKey = new StringBuilder(); + newKey.append("plugin.keybindings."); - char[] keyChars = key.toCharArray(); - for (char keyChar : keyChars) + for (char keyChar : key.toCharArray()) { if (Character.isLowerCase(keyChar)) newKey.append(Character.toUpperCase(keyChar)); @@ -213,6 +217,7 @@ public class KeybindingsConfigPanel newKey.toString()); } + @Override public LinkedHashMap<KeyStroke, String> getBindingMap() { // Translates I18N strings back to internal action labels diff --git a/src/net/java/sip/communicator/plugin/securityconfig/SecurityConfigurationPanel.java b/src/net/java/sip/communicator/plugin/securityconfig/SecurityConfigurationPanel.java index cb561fc..5a46dbb 100644 --- a/src/net/java/sip/communicator/plugin/securityconfig/SecurityConfigurationPanel.java +++ b/src/net/java/sip/communicator/plugin/securityconfig/SecurityConfigurationPanel.java @@ -7,9 +7,8 @@ package net.java.sip.communicator.plugin.securityconfig; import java.awt.*; -import javax.swing.*; - import net.java.sip.communicator.service.gui.*; +import net.java.sip.communicator.util.swing.*; import org.osgi.framework.*; @@ -19,7 +18,7 @@ import org.osgi.framework.*; * @author Yana Stamcheva */ public class SecurityConfigurationPanel - extends JTabbedPane + extends SIPCommTabbedPane implements ServiceListener { /** diff --git a/src/net/java/sip/communicator/plugin/sipaccregwizz/SIPAccountRegistrationForm.java b/src/net/java/sip/communicator/plugin/sipaccregwizz/SIPAccountRegistrationForm.java index 1086a9e..7667d2c 100644 --- a/src/net/java/sip/communicator/plugin/sipaccregwizz/SIPAccountRegistrationForm.java +++ b/src/net/java/sip/communicator/plugin/sipaccregwizz/SIPAccountRegistrationForm.java @@ -28,7 +28,7 @@ public class SIPAccountRegistrationForm private final SIPAccountRegistrationWizard wizard; - private final JTabbedPane tabbedPane = new SIPCommTabbedPane(false, false); + private final JTabbedPane tabbedPane = new SIPCommTabbedPane(); /** * The panels which value needs validation before we continue. @@ -168,7 +168,9 @@ public class SIPAccountRegistrationForm /** * Saves the user input when the "Next" wizard buttons is clicked. + * * @param registration the SIPAccountRegistration + * @return */ public boolean commitPage(SIPAccountRegistration registration) { @@ -342,7 +344,7 @@ public class SIPAccountRegistrationForm ProtocolProviderFactory.DEFAULT_SIPZRTP_ATTRIBUTE, true); boolean proxyAutoConfigureEnabled = accountID.getAccountPropertyBoolean( - ProtocolProviderFactory.PROXY_AUTO_CONFIG, false);; + ProtocolProviderFactory.PROXY_AUTO_CONFIG, false); String pollingPeriod = accountID.getAccountPropertyString( ProtocolProviderFactory.POLLING_PERIOD); diff --git a/src/net/java/sip/communicator/util/swing/SIPCommTabbedPane.java b/src/net/java/sip/communicator/util/swing/SIPCommTabbedPane.java index 0adbce3..938b298 100644 --- a/src/net/java/sip/communicator/util/swing/SIPCommTabbedPane.java +++ b/src/net/java/sip/communicator/util/swing/SIPCommTabbedPane.java @@ -41,6 +41,11 @@ public class SIPCommTabbedPane private int lastSelectedIndex; + public SIPCommTabbedPane() + { + this(false, false); + } + /** * Creates the <code>CloseAndMaxTabbedPane</code> with an enhanced UI if * <code>enhancedUI</code> parameter is set to <code>true</code>. @@ -75,6 +80,8 @@ public class SIPCommTabbedPane /** * Returns the index of the last tab on which the mouse did an action. + * + * @return */ public int getOverTabIndex() { @@ -83,6 +90,8 @@ public class SIPCommTabbedPane /** * Returns <code>true</code> if the close icon is enabled. + * + * @return */ public boolean isCloseEnabled() { @@ -92,17 +101,19 @@ public class SIPCommTabbedPane /** * Returns <code>true</code> if the max/detach icon is enabled. + * + * @return */ public boolean isMaxEnabled() { - SIPCommTabbedPaneUI ui = (SIPCommTabbedPaneUI) this.getUI(); - return ui.isMaxEnabled(); + return ((SIPCommTabbedPaneUI) getUI()).isMaxEnabled(); } /** * Override JTabbedPane method. Does nothing. * @param tabLayoutPolicy The tab layout policy. */ + @Override public void setTabLayoutPolicy(int tabLayoutPolicy) { } @@ -111,6 +122,7 @@ public class SIPCommTabbedPane * Override JTabbedPane method. Does nothing. * @param tabPlacement The tab placement. */ + @Override public void setTabPlacement(int tabPlacement) { } @@ -122,8 +134,7 @@ public class SIPCommTabbedPane */ public void setCloseIcon(boolean b) { - SIPCommTabbedPaneUI ui = (SIPCommTabbedPaneUI) this.getUI(); - ui.setCloseIcon(b); + ((SIPCommTabbedPaneUI) getUI()).setCloseIcon(b); } /** @@ -133,12 +144,11 @@ public class SIPCommTabbedPane */ public void setMaxIcon(boolean b) { - SIPCommTabbedPaneUI ui = (SIPCommTabbedPaneUI) this.getUI(); - ui.setMaxIcon(b); + ((SIPCommTabbedPaneUI) getUI()).setMaxIcon(b); } /** - * Detaches the <code>index</code> tab in a seperate frame. When the frame + * Detaches the <code>index</code> tab in a separate frame. When the frame * is closed, the tab is automatically reinserted into the tabbedPane. * * @param index index of the tabbedPane to be detached @@ -427,9 +437,10 @@ public class SIPCommTabbedPane /** * Overrides setSelectedIndex in JTabbedPane in order to remove the - * hightlight if the tab which is selected. + * highlight if the tab which is selected. * @param tabIndex The index of the tab to be selected. */ + @Override public void setSelectedIndex(int tabIndex) { SIPCommTabbedPaneEnhancedUI ui @@ -458,6 +469,7 @@ public class SIPCommTabbedPane this.repaint(); } + @Override public void removeTabAt(int index) { if (index < lastSelectedIndex) |