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".

cusax-fix
Lyubomir Marinov 16 years ago
parent 3f394899e7
commit 352c5f2509

@ -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 @@ else if (c instanceof AbstractButton)
{
boolean isSelected = ((AbstractButton)c).isSelected();
formField.addValue(new Boolean(isSelected));
formField.addValue(Boolean.valueOf(isSelected));
}
else if (c instanceof JComboBox)
{
@ -434,6 +434,7 @@ else if (c instanceof JPanel)
new Thread()
{
@Override
public void run()
{
try

@ -127,8 +127,8 @@ else if (source == mandButton)
}
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 void itemStateChanged(ItemEvent e) {
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 void itemStateChanged(ItemEvent e) {
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(';');

@ -43,7 +43,7 @@ public AccountInfoPanel()
{
super(new BorderLayout());
JTabbedPane accountsTabbedPane = new SIPCommTabbedPane(false, false);
JTabbedPane accountsTabbedPane = new SIPCommTabbedPane();
for (ProtocolProviderFactory providerFactory : AccountInfoActivator
.getProtocolProviderFactories().values())

@ -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.

@ -71,7 +71,7 @@ public FirstWizardPage(JabberAccountRegistrationWizard wizard)
*/
private void init()
{
JTabbedPane tabbedPane = new SIPCommTabbedPane(false, false);
JTabbedPane tabbedPane = new SIPCommTabbedPane();
this.setBorder(BorderFactory.createEmptyBorder(10, 10, 10, 10));

@ -51,11 +51,13 @@ public 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 @@ private class SIPChooser
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 @@ protected void onClick(MouseEvent event, BindingEntry entry,
KeybindingsConfigPanel.this.requestFocus();
}
@Override
public boolean putBinding(BindingEntry newEntry, int index)
{
// Converts to I18N strings for UI
@ -192,10 +196,10 @@ public boolean putBinding(BindingEntry newEntry, int index)
*/
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 @@ else if (Character.isUpperCase(keyChar))
newKey.toString());
}
@Override
public LinkedHashMap<KeyStroke, String> getBindingMap()
{
// Translates I18N strings back to internal action labels

@ -7,9 +7,8 @@
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 @@
* @author Yana Stamcheva
*/
public class SecurityConfigurationPanel
extends JTabbedPane
extends SIPCommTabbedPane
implements ServiceListener
{
/**

@ -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 boolean isModification()
/**
* 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 void loadAccount(AccountID accountID)
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);

@ -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 SIPCommTabbedPane(boolean closingTabs, boolean maximizingTabs)
/**
* Returns the index of the last tab on which the mouse did an action.
*
* @return
*/
public int getOverTabIndex()
{
@ -83,6 +90,8 @@ public int getOverTabIndex()
/**
* Returns <code>true</code> if the close icon is enabled.
*
* @return
*/
public boolean isCloseEnabled()
{
@ -92,17 +101,19 @@ public boolean isCloseEnabled()
/**
* 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 void setTabLayoutPolicy(int tabLayoutPolicy)
* Override JTabbedPane method. Does nothing.
* @param tabPlacement The tab placement.
*/
@Override
public void setTabPlacement(int tabPlacement)
{
}
@ -122,8 +134,7 @@ public void setTabPlacement(int tabPlacement)
*/
public void setCloseIcon(boolean b)
{
SIPCommTabbedPaneUI ui = (SIPCommTabbedPaneUI) this.getUI();
ui.setCloseIcon(b);
((SIPCommTabbedPaneUI) getUI()).setCloseIcon(b);
}
/**
@ -133,12 +144,11 @@ public void setCloseIcon(boolean b)
*/
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 void firePopupOutsideTabEvent(MouseEvent e)
/**
* 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 void highlightTab(int tabIndex)
this.repaint();
}
@Override
public void removeTabAt(int index)
{
if (index < lastSelectedIndex)

Loading…
Cancel
Save