diff --git a/src/net/java/sip/communicator/impl/contactlist/ContactlistActivator.java b/src/net/java/sip/communicator/impl/contactlist/ContactlistActivator.java index 99e497647..2995006f4 100644 --- a/src/net/java/sip/communicator/impl/contactlist/ContactlistActivator.java +++ b/src/net/java/sip/communicator/impl/contactlist/ContactlistActivator.java @@ -6,8 +6,6 @@ */ package net.java.sip.communicator.impl.contactlist; -import java.util.*; - import net.java.sip.communicator.service.contactlist.*; import net.java.sip.communicator.service.fileaccess.*; import net.java.sip.communicator.util.*; @@ -15,7 +13,6 @@ import org.osgi.framework.*; /** - * * @author Emil Ivov */ public class ContactlistActivator @@ -24,8 +21,7 @@ public class ContactlistActivator private static final Logger logger = Logger.getLogger(ContactlistActivator.class); - ServiceRegistration mclServiceRegistration = null; - MetaContactListServiceImpl mclServiceImpl = null; + private MetaContactListServiceImpl mclServiceImpl = null; private static FileAccessService fileAccessService; @@ -42,15 +38,12 @@ public void start(BundleContext context) throws Exception bundleContext = context; logger.debug("Service Impl: " + getClass().getName() + " [ STARTED ]"); - Hashtable hashtable = new Hashtable(); mclServiceImpl = new MetaContactListServiceImpl(); //reg the icq account man. - mclServiceRegistration = context.registerService( - MetaContactListService.class.getName(), - mclServiceImpl, - hashtable); + context.registerService(MetaContactListService.class.getName(), + mclServiceImpl, null); mclServiceImpl.start(context); diff --git a/src/net/java/sip/communicator/impl/contactlist/MclStorageManager.java b/src/net/java/sip/communicator/impl/contactlist/MclStorageManager.java index 1f196566a..b7008201a 100644 --- a/src/net/java/sip/communicator/impl/contactlist/MclStorageManager.java +++ b/src/net/java/sip/communicator/impl/contactlist/MclStorageManager.java @@ -671,7 +671,7 @@ void extractContactsForAccount(String accountID) throws XMLException * level groups. */ private void processGroupXmlNode(MetaContactListServiceImpl mclServiceImpl, - String accountID, Element groupNode, MetaContactGroup parentGroup, + String accountID, Element groupNode, MetaContactGroupImpl parentGroup, Map parentProtoGroups) { // first resolve the group itself.(unless this is the meta contact list @@ -1151,11 +1151,11 @@ private Element createMetaContactGroupNode(MetaContactGroup metaGroup) this.contactListDocument.createElement(SUBGROUPS_NODE_NAME); metaGroupElement.appendChild(subgroupsElement); - Iterator subroups = metaGroup.getSubgroups(); + Iterator subroups = metaGroup.getSubgroups(); while (subroups.hasNext()) { - MetaContactGroup subgroup = (MetaContactGroup) subroups.next(); + MetaContactGroup subgroup = subroups.next(); Element subgroupEl = createMetaContactGroupNode(subgroup); subgroupsElement.appendChild(subgroupEl); } @@ -1166,11 +1166,11 @@ private Element createMetaContactGroupNode(MetaContactGroup metaGroup) this.contactListDocument.createElement(CHILD_CONTACTS_NODE_NAME); metaGroupElement.appendChild(childContactsElement); - Iterator childContacts = metaGroup.getChildContacts(); + Iterator childContacts = metaGroup.getChildContacts(); while (childContacts.hasNext()) { - MetaContact metaContact = (MetaContact) childContacts.next(); + MetaContact metaContact = childContacts.next(); Element metaContactEl = createMetaContactNode(metaContact); childContactsElement.appendChild(metaContactEl); } diff --git a/src/net/java/sip/communicator/impl/contactlist/MetaContactGroupImpl.java b/src/net/java/sip/communicator/impl/contactlist/MetaContactGroupImpl.java index 650d5288a..71d5e31fb 100644 --- a/src/net/java/sip/communicator/impl/contactlist/MetaContactGroupImpl.java +++ b/src/net/java/sip/communicator/impl/contactlist/MetaContactGroupImpl.java @@ -56,8 +56,8 @@ public class MetaContactGroupImpl * in order to avoid creating it upon each query. The copy is updated upon * each modification */ - private List childContactsOrderedCopy - = new LinkedList(); + private List childContactsOrderedCopy + = new LinkedList(); /** * The meta contact group that is currently containing us. @@ -173,7 +173,7 @@ public int countSubgroups() * * @return a java.util.Iterator over an empty contacts list. */ - public Iterator getChildContacts() + public Iterator getChildContacts() { return childContactsOrderedCopy.iterator(); } @@ -187,10 +187,10 @@ public Iterator getChildContacts() */ public MetaContact getMetaContact(String metaContactID) { - Iterator contactsIter = getChildContacts(); + Iterator contactsIter = getChildContacts(); while(contactsIter.hasNext()) { - MetaContactImpl contact = contactsIter.next(); + MetaContact contact = contactsIter.next(); if (contact.getMetaUID().equals(metaContactID)) return contact; @@ -215,11 +215,11 @@ public int indexOf(MetaContact metaContact) { int i = 0; - Iterator childrenIter = getChildContacts(); + Iterator childrenIter = getChildContacts(); while (childrenIter.hasNext()) { - MetaContactImpl current = childrenIter.next(); + MetaContact current = childrenIter.next(); if (current == metaContact) { @@ -256,15 +256,15 @@ public int indexOf(MetaContactGroup metaContactGroup) * contactID is pertaining to. * @param contactID a String identifier of the protocol specific contact * whose container meta contact we're looking for. - * @return the MetaContact with the specified idnetifier. + * @return the MetaContact with the specified identifier. */ public MetaContact getMetaContact(ProtocolProviderService provider, String contactID) { - Iterator contactsIter = getChildContacts(); + Iterator contactsIter = getChildContacts(); while(contactsIter.hasNext()) { - MetaContactImpl contact = contactsIter.next(); + MetaContact contact = contactsIter.next(); if (contact.getContact(contactID, provider) != null) return contact; @@ -283,27 +283,27 @@ public MetaContact getMetaContact(ProtocolProviderService provider, * @return the MetaContact with the specified UID or null if no such * contact exists. */ - public MetaContactImpl findMetaContactByMetaUID(String metaUID) + public MetaContact findMetaContactByMetaUID(String metaUID) { //first go through the contacts that are direct children of this method. - Iterator contactsIter = getChildContacts(); + Iterator contactsIter = getChildContacts(); while(contactsIter.hasNext()) { - MetaContactImpl mContact = contactsIter.next(); + MetaContact mContact = contactsIter.next(); if( mContact.getMetaUID().equals(metaUID) ) return mContact; } //if we didn't find it here, let's try in the subougroups - Iterator groupsIter = getSubgroups(); + Iterator groupsIter = getSubgroups(); while( groupsIter.hasNext() ) { - MetaContactGroupImpl mGroup = groupsIter.next(); + MetaContactGroupImpl mGroup = (MetaContactGroupImpl) groupsIter.next(); - MetaContactImpl mContact = mGroup.findMetaContactByMetaUID(metaUID); + MetaContact mContact = mGroup.findMetaContactByMetaUID(metaUID); if (mContact != null) return mContact; @@ -321,13 +321,13 @@ public MetaContactImpl findMetaContactByMetaUID(String metaUID) * @return the MetaContactGroup with the specified UID or null if no such * contact exists. */ - public MetaContactGroupImpl findMetaContactGroupByMetaUID(String metaUID) + public MetaContactGroup findMetaContactGroupByMetaUID(String metaUID) { if (metaUID.equals(groupUID)) return this; //if we didn't find it here, let's try in the subougroups - Iterator groupsIter = getSubgroups(); + Iterator groupsIter = getSubgroups(); while( groupsIter.hasNext() ) { @@ -462,14 +462,14 @@ public Iterator getContactGroupsForAccountID(String accountID) * @return the MetaContactImpl that contains the specified protocol specific * contact. */ - public MetaContactImpl findMetaContactByContact(Contact protoContact) + public MetaContact findMetaContactByContact(Contact protoContact) { //first go through the contacts that are direct children of this method. - Iterator contactsIter = getChildContacts(); + Iterator contactsIter = getChildContacts(); while(contactsIter.hasNext()) { - MetaContactImpl mContact = contactsIter.next(); + MetaContact mContact = contactsIter.next(); Contact storedProtoContact = mContact.getContact( protoContact.getAddress(), protoContact.getProtocolProvider()); @@ -479,13 +479,13 @@ public MetaContactImpl findMetaContactByContact(Contact protoContact) } //if we didn't find it here, let's try in the subougroups - Iterator groupsIter = getSubgroups(); + Iterator groupsIter = getSubgroups(); while( groupsIter.hasNext() ) { - MetaContactGroupImpl mGroup = groupsIter.next(); + MetaContactGroupImpl mGroup = (MetaContactGroupImpl) groupsIter.next(); - MetaContactImpl mContact = mGroup.findMetaContactByContact( + MetaContact mContact = mGroup.findMetaContactByContact( protoContact); if (mContact != null) @@ -509,15 +509,15 @@ public MetaContactImpl findMetaContactByContact(Contact protoContact) * @return the MetaContactImpl that contains the specified protocol specific * contact. */ - public MetaContactImpl findMetaContactByContact(String contactAddress, + public MetaContact findMetaContactByContact(String contactAddress, String accountID) { //first go through the contacts that are direct children of this method. - Iterator contactsIter = getChildContacts(); + Iterator contactsIter = getChildContacts(); while(contactsIter.hasNext()) { - MetaContactImpl mContact = contactsIter.next(); + MetaContactImpl mContact = (MetaContactImpl) contactsIter.next(); Contact storedProtoContact = mContact.getContact( contactAddress, accountID); @@ -527,13 +527,13 @@ public MetaContactImpl findMetaContactByContact(String contactAddress, } //if we didn't find it here, let's try in the subougroups - Iterator groupsIter = getSubgroups(); + Iterator groupsIter = getSubgroups(); while( groupsIter.hasNext() ) { - MetaContactGroupImpl mGroup = groupsIter.next(); + MetaContactGroupImpl mGroup = (MetaContactGroupImpl) groupsIter.next(); - MetaContactImpl mContact = mGroup.findMetaContactByContact( + MetaContact mContact = mGroup.findMetaContactByContact( contactAddress, accountID); if (mContact != null) @@ -563,11 +563,11 @@ public MetaContactGroupImpl findMetaContactGroupByContactGroup( //if we didn't find it here, let's try in the subougroups - Iterator groupsIter = getSubgroups(); + Iterator groupsIter = getSubgroups(); while( groupsIter.hasNext() ) { - MetaContactGroupImpl mGroup = groupsIter.next(); + MetaContactGroupImpl mGroup = (MetaContactGroupImpl) groupsIter.next(); MetaContactGroupImpl foundMetaContactGroup = mGroup .findMetaContactGroupByContactGroup( protoContactGroup ); @@ -590,7 +590,7 @@ public MetaContactGroupImpl findMetaContactGroupByContactGroup( public MetaContact getMetaContact(int index) throws IndexOutOfBoundsException { - return (MetaContactImpl)this.childContactsOrderedCopy.get(index); + return this.childContactsOrderedCopy.get(index); } /** @@ -623,7 +623,7 @@ int lightAddMetaContact(MetaContactImpl metaContact) this.childContacts.add(metaContact); //no need to synch it's not a disaster if s.o. else reads the old copy. childContactsOrderedCopy - = new LinkedList(childContacts); + = new LinkedList(childContacts); return childContactsOrderedCopy.indexOf(metaContact); } } @@ -647,7 +647,7 @@ void lightRemoveMetaContact(MetaContactImpl metaContact) this.childContacts.remove(metaContact); //no need to synch it's not a disaster if s.o. else reads the old copy. childContactsOrderedCopy - = new LinkedList(childContacts); + = new LinkedList(childContacts); } } @@ -686,11 +686,11 @@ public MetaContactGroup getMetaContactSubgroup(int index) throws */ public MetaContactGroup getMetaContactSubgroup(String groupName) { - Iterator groupsIter = getSubgroups(); + Iterator groupsIter = getSubgroups(); while(groupsIter.hasNext()) { - MetaContactGroupImpl mcGroup = groupsIter.next(); + MetaContactGroup mcGroup = groupsIter.next(); if(mcGroup.getGroupName().equals(groupName)) return mcGroup; @@ -706,13 +706,13 @@ public MetaContactGroup getMetaContactSubgroup(String groupName) * @return the MetaContactGroup with the specified uid or null * if no such group exists. */ - public MetaContactGroupImpl getMetaContactSubgroupByUID(String groupUID) + public MetaContactGroup getMetaContactSubgroupByUID(String groupUID) { - Iterator groupsIter = getSubgroups(); + Iterator groupsIter = getSubgroups(); while(groupsIter.hasNext()) { - MetaContactGroupImpl mcGroup = groupsIter.next(); + MetaContactGroup mcGroup = groupsIter.next(); if(mcGroup.getMetaUID().equals(groupUID)) return mcGroup; @@ -762,9 +762,9 @@ public boolean contains(MetaContactGroup group) *

* @return a java.util.Iterator containing all subgroups. */ - public Iterator getSubgroups() + public Iterator getSubgroups() { - return new LinkedList( subgroups ).iterator(); + return new LinkedList( subgroups ).iterator(); } /** @@ -797,10 +797,10 @@ public String toString() StringBuffer buff = new StringBuffer(getGroupName()); buff.append(".subGroups=" + countSubgroups() + ":\n"); - Iterator subGroups = getSubgroups(); + Iterator subGroups = getSubgroups(); while (subGroups.hasNext()) { - MetaContactGroupImpl group = (MetaContactGroupImpl)subGroups.next(); + MetaContactGroup group = subGroups.next(); buff.append(group.getGroupName()); if (subGroups.hasNext()) buff.append("\n"); @@ -822,10 +822,10 @@ public String toString() buff.append("\nRootChildContacts="+countChildContacts()+":["); - Iterator contacts = getChildContacts(); + Iterator contacts = getChildContacts(); while (contacts.hasNext()) { - MetaContactImpl contact = contacts.next(); + MetaContact contact = contacts.next(); buff.append(contact.toString()); if(contacts.hasNext()) buff.append(", "); diff --git a/src/net/java/sip/communicator/impl/contactlist/MetaContactListServiceImpl.java b/src/net/java/sip/communicator/impl/contactlist/MetaContactListServiceImpl.java index 2fb4e1ba3..4f2e57f99 100644 --- a/src/net/java/sip/communicator/impl/contactlist/MetaContactListServiceImpl.java +++ b/src/net/java/sip/communicator/impl/contactlist/MetaContactListServiceImpl.java @@ -705,12 +705,12 @@ public void createMetaContactGroup(MetaContactGroup parent, //make sure that "parent" does not already contain a subgroup called //"groupName" - Iterator subgroups + Iterator subgroups = ((MetaContactGroupImpl)parent).getSubgroups(); while(subgroups.hasNext()) { - MetaContactGroupImpl group = subgroups.next(); + MetaContactGroup group = subgroups.next(); if(group.getGroupName().equals(groupName)) { @@ -1227,7 +1227,7 @@ private void locallyRemoveAllContactsForProvider( MetaContactGroupImpl parentMetaGroup, ContactGroup groupToRemove) { - Iterator childrenContactsIter + Iterator childrenContactsIter = parentMetaGroup.getChildContacts(); //first go through all direct children. @@ -1268,13 +1268,13 @@ private void locallyRemoveAllContactsForProvider( } } - Iterator subgroupsIter + Iterator subgroupsIter = parentMetaGroup.getSubgroups(); //then go through all subgroups. while (subgroupsIter.hasNext()) { - MetaContactGroupImpl subMetaGroup = subgroupsIter.next(); + MetaContactGroupImpl subMetaGroup = (MetaContactGroupImpl) subgroupsIter.next(); Iterator contactGroups = subMetaGroup.getContactGroups(); @@ -2703,12 +2703,12 @@ public void contactPresenceStatusChanged( * @return the newly created meta contact group. */ MetaContactGroupImpl loadStoredMetaContactGroup( - MetaContactGroup parentGroup, + MetaContactGroupImpl parentGroup, String metaContactGroupUID, String displayName) { //first check if the group exists already. - MetaContactGroupImpl newMetaGroup = ((MetaContactGroupImpl)parentGroup) + MetaContactGroupImpl newMetaGroup = (MetaContactGroupImpl) parentGroup .getMetaContactSubgroupByUID(metaContactGroupUID); //if the group exists then we have already loaded it for another @@ -2719,7 +2719,7 @@ MetaContactGroupImpl loadStoredMetaContactGroup( newMetaGroup = new MetaContactGroupImpl(displayName, metaContactGroupUID); - ((MetaContactGroupImpl)parentGroup).addSubgroup(newMetaGroup); + parentGroup.addSubgroup(newMetaGroup); //I don't think this method needs to produce events since it is //currently only called upon initialization ... but it doesn't hurt diff --git a/src/net/java/sip/communicator/impl/growlnotification/GrowlNotificationServiceImpl.java b/src/net/java/sip/communicator/impl/growlnotification/GrowlNotificationServiceImpl.java index 1c12ca41d..225a45ef6 100644 --- a/src/net/java/sip/communicator/impl/growlnotification/GrowlNotificationServiceImpl.java +++ b/src/net/java/sip/communicator/impl/growlnotification/GrowlNotificationServiceImpl.java @@ -85,9 +85,9 @@ public void start(BundleContext bc) /* Register to Growl */ try { - Constructor constructor = Growl.class.getConstructor(new Class[] - {String.class, String.class}); - notifier = (Growl)constructor.newInstance( + Constructor constructor = Growl.class.getConstructor( + new Class[] { String.class, String.class }); + notifier = constructor.newInstance( new Object[]{"SIP Communicator", sipIconPath}); //init the setAllowedNotifications method diff --git a/src/net/java/sip/communicator/impl/gui/PopupDialogImpl.java b/src/net/java/sip/communicator/impl/gui/PopupDialogImpl.java index 8983929da..3e19538d0 100644 --- a/src/net/java/sip/communicator/impl/gui/PopupDialogImpl.java +++ b/src/net/java/sip/communicator/impl/gui/PopupDialogImpl.java @@ -19,7 +19,9 @@ public class PopupDialogImpl extends JOptionPane implements PopupDialog { - /** + private static final long serialVersionUID = 0L; + + /** * Creates an instance of PopupDialogImpl. */ public PopupDialogImpl() diff --git a/src/net/java/sip/communicator/impl/gui/customcontrols/BooleanToCheckTableModel.java b/src/net/java/sip/communicator/impl/gui/customcontrols/BooleanToCheckTableModel.java index 663643b21..956412cc1 100644 --- a/src/net/java/sip/communicator/impl/gui/customcontrols/BooleanToCheckTableModel.java +++ b/src/net/java/sip/communicator/impl/gui/customcontrols/BooleanToCheckTableModel.java @@ -15,22 +15,20 @@ * @author Yana Stamcheva */ public class BooleanToCheckTableModel extends DefaultTableModel { + private static final long serialVersionUID = 0L; - /* + /* * JTable uses this method to determine the default renderer/ * editor for each cell. If we didn't implement this method, * then the first column in the wizard would contain text * ("true"/"false"), rather than a check box. */ - public Class getColumnClass(int c) { + public Class getColumnClass(int c) { return getValueAt(0, c).getClass(); } public boolean isCellEditable(int row, int col) { - if(col < 1) - return true; - else - return false; + return (col < 1); } } diff --git a/src/net/java/sip/communicator/impl/gui/customcontrols/BoxPopupMenu.java b/src/net/java/sip/communicator/impl/gui/customcontrols/BoxPopupMenu.java index 94861274f..08840e25c 100644 --- a/src/net/java/sip/communicator/impl/gui/customcontrols/BoxPopupMenu.java +++ b/src/net/java/sip/communicator/impl/gui/customcontrols/BoxPopupMenu.java @@ -4,7 +4,6 @@ * Distributable under LGPL license. * See terms of license at gnu.org. */ - package net.java.sip.communicator.impl.gui.customcontrols; import java.awt.*; diff --git a/src/net/java/sip/communicator/impl/gui/customcontrols/ChatToolbarButton.java b/src/net/java/sip/communicator/impl/gui/customcontrols/ChatToolbarButton.java index 2ae495a2b..319f800ea 100644 --- a/src/net/java/sip/communicator/impl/gui/customcontrols/ChatToolbarButton.java +++ b/src/net/java/sip/communicator/impl/gui/customcontrols/ChatToolbarButton.java @@ -4,7 +4,6 @@ * Distributable under LGPL license. * See terms of license at gnu.org. */ - package net.java.sip.communicator.impl.gui.customcontrols; import java.awt.*; @@ -18,7 +17,9 @@ */ public class ChatToolbarButton extends SIPCommButton { - /** + private static final long serialVersionUID = 0L; + + /** * Creates an instance of MsgToolbarButton. * @param iconImage The icon to display on this button. */ diff --git a/src/net/java/sip/communicator/impl/gui/customcontrols/ErrorDialog.java b/src/net/java/sip/communicator/impl/gui/customcontrols/ErrorDialog.java index bc4da54dc..cc57f9350 100644 --- a/src/net/java/sip/communicator/impl/gui/customcontrols/ErrorDialog.java +++ b/src/net/java/sip/communicator/impl/gui/customcontrols/ErrorDialog.java @@ -33,7 +33,7 @@ public class ErrorDialog implements ActionListener, HyperlinkListener { - private Logger logger = Logger.getLogger(ErrorDialog.class); + private final Logger logger = Logger.getLogger(ErrorDialog.class); private JButton okButton = new JButton( GuiActivator.getResources().getI18NString("service.gui.OK")); diff --git a/src/net/java/sip/communicator/impl/gui/customcontrols/ExtListCellRenderer.java b/src/net/java/sip/communicator/impl/gui/customcontrols/ExtListCellRenderer.java index 9267203db..56357a451 100644 --- a/src/net/java/sip/communicator/impl/gui/customcontrols/ExtListCellRenderer.java +++ b/src/net/java/sip/communicator/impl/gui/customcontrols/ExtListCellRenderer.java @@ -16,23 +16,26 @@ /** * @author Yana Stamcheva */ -public class ExtListCellRenderer extends JPanel - implements ListCellRenderer { - +public class ExtListCellRenderer + extends JPanel + implements ListCellRenderer +{ private final JLabel label = new JLabel(); private boolean isSelected; - public ExtListCellRenderer() { + public ExtListCellRenderer() + { super(new BorderLayout()); this.add(label); } + /** * Implements the ListCellRenderer method. */ public Component getListCellRendererComponent(JList list, Object value, - int index, boolean isSelected, boolean cellHasFocus) { - + int index, boolean isSelected, boolean cellHasFocus) + { this.label.setText(value.toString()); this.isSelected = isSelected; diff --git a/src/net/java/sip/communicator/impl/gui/customcontrols/ExtendedTableModel.java b/src/net/java/sip/communicator/impl/gui/customcontrols/ExtendedTableModel.java index 6114ed1c5..0fe9621d7 100644 --- a/src/net/java/sip/communicator/impl/gui/customcontrols/ExtendedTableModel.java +++ b/src/net/java/sip/communicator/impl/gui/customcontrols/ExtendedTableModel.java @@ -17,8 +17,10 @@ * @author Yana Stamcheva */ public class ExtendedTableModel extends DefaultTableModel -{ - /** +{ + private static final long serialVersionUID = 0L; + + /** * Returns the index of the row, in which the given value is contained. * @param value the value to search for * @return the index of the row, in which the given value is contained. diff --git a/src/net/java/sip/communicator/impl/gui/customcontrols/LabelTableCellRenderer.java b/src/net/java/sip/communicator/impl/gui/customcontrols/LabelTableCellRenderer.java index 254c407de..fa025400e 100644 --- a/src/net/java/sip/communicator/impl/gui/customcontrols/LabelTableCellRenderer.java +++ b/src/net/java/sip/communicator/impl/gui/customcontrols/LabelTableCellRenderer.java @@ -21,10 +21,13 @@ * * @author Yana Stamcheva */ -public class LabelTableCellRenderer extends JLabel +public class LabelTableCellRenderer + extends JLabel implements TableCellRenderer { - public LabelTableCellRenderer() + private static final long serialVersionUID = 0L; + + public LabelTableCellRenderer() { this.setHorizontalAlignment(JLabel.LEFT); this.setOpaque(true); diff --git a/src/net/java/sip/communicator/impl/gui/customcontrols/RadioButtonTableCellRenderer.java b/src/net/java/sip/communicator/impl/gui/customcontrols/RadioButtonTableCellRenderer.java index 0bbb56528..68d8e54ac 100644 --- a/src/net/java/sip/communicator/impl/gui/customcontrols/RadioButtonTableCellRenderer.java +++ b/src/net/java/sip/communicator/impl/gui/customcontrols/RadioButtonTableCellRenderer.java @@ -17,8 +17,6 @@ public class RadioButtonTableCellRenderer public Component getTableCellRendererComponent(JTable table, Object value, boolean isSelected, boolean hasFocus, int row, int column) { - if (value == null) - return null; - return (Component) value; + return (value == null) ? null : (Component) value; } } diff --git a/src/net/java/sip/communicator/impl/gui/customcontrols/SCScrollPane.java b/src/net/java/sip/communicator/impl/gui/customcontrols/SCScrollPane.java index 4042011b2..1a2af0e32 100644 --- a/src/net/java/sip/communicator/impl/gui/customcontrols/SCScrollPane.java +++ b/src/net/java/sip/communicator/impl/gui/customcontrols/SCScrollPane.java @@ -18,7 +18,9 @@ public class SCScrollPane extends JScrollPane { - public SCScrollPane() + private static final long serialVersionUID = 0L; + + public SCScrollPane() { this.setBorder(null); this.setOpaque(false); diff --git a/src/net/java/sip/communicator/impl/gui/customcontrols/SIPCommMenu.java b/src/net/java/sip/communicator/impl/gui/customcontrols/SIPCommMenu.java index 9465e8d4e..5d3ec1585 100644 --- a/src/net/java/sip/communicator/impl/gui/customcontrols/SIPCommMenu.java +++ b/src/net/java/sip/communicator/impl/gui/customcontrols/SIPCommMenu.java @@ -22,12 +22,8 @@ public class SIPCommMenu extends JMenu { - private Object selectedItem; - private Object selectedObject; - private boolean isMouseOver; - /** * Creates an instance of SIPCommMenu. */ @@ -121,7 +117,6 @@ public Object getSelectedObject() */ public void setMouseOver(boolean isMouseOver) { - this.isMouseOver = isMouseOver; this.repaint(); } } diff --git a/src/net/java/sip/communicator/impl/gui/customcontrols/SIPCommMsgTextArea.java b/src/net/java/sip/communicator/impl/gui/customcontrols/SIPCommMsgTextArea.java index ffa310944..a9ec4362a 100644 --- a/src/net/java/sip/communicator/impl/gui/customcontrols/SIPCommMsgTextArea.java +++ b/src/net/java/sip/communicator/impl/gui/customcontrols/SIPCommMsgTextArea.java @@ -15,9 +15,12 @@ * * @author Yana Stamcheva */ -public class SIPCommMsgTextArea extends JTextArea { +public class SIPCommMsgTextArea + extends JTextArea +{ + private static final long serialVersionUID = 0L; - public SIPCommMsgTextArea() + public SIPCommMsgTextArea() { this.setEditable(false); this.setLineWrap(true); diff --git a/src/net/java/sip/communicator/impl/gui/customcontrols/SIPCommSmartComboBox.java b/src/net/java/sip/communicator/impl/gui/customcontrols/SIPCommSmartComboBox.java index 53780969f..f61232f18 100644 --- a/src/net/java/sip/communicator/impl/gui/customcontrols/SIPCommSmartComboBox.java +++ b/src/net/java/sip/communicator/impl/gui/customcontrols/SIPCommSmartComboBox.java @@ -22,16 +22,17 @@ * * @author Yana Stamcheva */ -public class SIPCommSmartComboBox extends JComboBox +public class SIPCommSmartComboBox + extends JComboBox { - private ArrayList historyList = new ArrayList(); + private static final long serialVersionUID = 0L; - /** + /** * Creates an instance of SIPCommSmartComboBox. */ public SIPCommSmartComboBox() { - setModel(new FilterableComboBoxModel(historyList)); + setModel(new FilterableComboBoxModel(new ArrayList())); setEditor(new CallComboEditor()); setEditable(true); setFocusable(true); @@ -41,7 +42,7 @@ public SIPCommSmartComboBox() * The data model used for this combo box. Filters the contents of the * combo box popup according to the user input. */ - public class FilterableComboBoxModel + public static class FilterableComboBoxModel extends AbstractListModel implements MutableComboBoxModel { @@ -151,9 +152,9 @@ public static interface Filter public boolean accept(Object obj); } - class StartsWithFilter implements Filter + private static class StartsWithFilter implements Filter { - private String prefix; + private final String prefix; public StartsWithFilter(String prefix) { diff --git a/src/net/java/sip/communicator/impl/gui/customcontrols/SIPCommToolBar.java b/src/net/java/sip/communicator/impl/gui/customcontrols/SIPCommToolBar.java index d7f0e1f3b..fb597b146 100644 --- a/src/net/java/sip/communicator/impl/gui/customcontrols/SIPCommToolBar.java +++ b/src/net/java/sip/communicator/impl/gui/customcontrols/SIPCommToolBar.java @@ -16,21 +16,23 @@ /** * The SIPCommToolBar is a JToolBar, which has its own drag icon - * and seperatator. The drag icon is shown in the beginning of the toolbar, + * and separator. The drag icon is shown in the beginning of the toolbar, * before any of the containing toolbar buttons. It allows to drag the toolbar * out of the container, where it is added and show it in a separate window. * The separator is a line that could be added between two buttons. This way - * the developer could visualy group buttons with similar functionality. + * the developer could visually group buttons with similar functionality. * * @author Yana Stamcheva */ -public class SIPCommToolBar extends JToolBar { +public class SIPCommToolBar + extends JToolBar +{ + private static final long serialVersionUID = 0L; - /** + /** * Creates an instance of SIPCommToolBar. */ public SIPCommToolBar() { - this.add(Box.createRigidArea(new Dimension(4, 4))); } diff --git a/src/net/java/sip/communicator/impl/gui/customcontrols/StyledHTMLEditorPane.java b/src/net/java/sip/communicator/impl/gui/customcontrols/StyledHTMLEditorPane.java index 704b630b1..e3a0f0b7f 100644 --- a/src/net/java/sip/communicator/impl/gui/customcontrols/StyledHTMLEditorPane.java +++ b/src/net/java/sip/communicator/impl/gui/customcontrols/StyledHTMLEditorPane.java @@ -6,26 +6,23 @@ */ package net.java.sip.communicator.impl.gui.customcontrols; -import java.io.IOException; +import java.io.*; -import javax.swing.JEditorPane; -import javax.swing.text.BadLocationException; -import javax.swing.text.Element; -import javax.swing.text.html.HTMLDocument; -import javax.swing.text.html.HTMLEditorKit; +import javax.swing.*; +import javax.swing.text.*; +import javax.swing.text.html.*; -import net.java.sip.communicator.impl.gui.utils.Constants; -import net.java.sip.communicator.impl.gui.utils.SIPCommHTMLEditorKit; -import net.java.sip.communicator.util.Logger; +import net.java.sip.communicator.impl.gui.utils.*; +import net.java.sip.communicator.util.*; public class StyledHTMLEditorPane extends JEditorPane { - private Logger logger = Logger.getLogger(StyledHTMLEditorPane.class); + private final Logger logger = Logger.getLogger(StyledHTMLEditorPane.class); - private HTMLEditorKit editorKit = new SIPCommHTMLEditorKit(); + private final HTMLEditorKit editorKit = new SIPCommHTMLEditorKit(); - private HTMLDocument document; + private final HTMLDocument document; public StyledHTMLEditorPane() { diff --git a/src/net/java/sip/communicator/impl/gui/customcontrols/TitlePanel.java b/src/net/java/sip/communicator/impl/gui/customcontrols/TitlePanel.java index 758ee71f0..6ee7f910a 100644 --- a/src/net/java/sip/communicator/impl/gui/customcontrols/TitlePanel.java +++ b/src/net/java/sip/communicator/impl/gui/customcontrols/TitlePanel.java @@ -22,11 +22,11 @@ public class TitlePanel extends TransparentPanel { - private JLabel titleLabel = new JLabel(); + private final JLabel titleLabel = new JLabel(); - private Color gradientStartColor = new Color(255, 255, 255, 200); + private final Color gradientStartColor = new Color(255, 255, 255, 200); - private Color gradientEndColor = new Color(255, 255, 255, 50); + private final Color gradientEndColor = new Color(255, 255, 255, 50); /** * Creates an instance of TitlePanel. diff --git a/src/net/java/sip/communicator/impl/gui/customcontrols/events/CloseTabbedPaneEvent.java b/src/net/java/sip/communicator/impl/gui/customcontrols/events/CloseTabbedPaneEvent.java index dd821c283..2c2978519 100644 --- a/src/net/java/sip/communicator/impl/gui/customcontrols/events/CloseTabbedPaneEvent.java +++ b/src/net/java/sip/communicator/impl/gui/customcontrols/events/CloseTabbedPaneEvent.java @@ -19,12 +19,11 @@ * @author Yana Stamcheva */ public class CloseTabbedPaneEvent extends Event { + private final String description; - private String description; + private final MouseEvent e; - private MouseEvent e; - - private int overTabIndex; + private final int overTabIndex; public CloseTabbedPaneEvent(MouseEvent e, String description, int overTabIndex) { diff --git a/src/net/java/sip/communicator/impl/gui/customcontrols/wizard/WizardModel.java b/src/net/java/sip/communicator/impl/gui/customcontrols/wizard/WizardModel.java index 99e9dffb9..afc89b24c 100644 --- a/src/net/java/sip/communicator/impl/gui/customcontrols/wizard/WizardModel.java +++ b/src/net/java/sip/communicator/impl/gui/customcontrols/wizard/WizardModel.java @@ -4,7 +4,6 @@ * Distributable under LGPL license. * See terms of license at gnu.org. */ - package net.java.sip.communicator.impl.gui.customcontrols.wizard; import java.beans.*; @@ -22,8 +21,6 @@ * * @author Yana Stamcheva */ - - public class WizardModel { /** diff --git a/src/net/java/sip/communicator/impl/gui/customcontrols/wizard/WizardPanelNotFoundException.java b/src/net/java/sip/communicator/impl/gui/customcontrols/wizard/WizardPanelNotFoundException.java index 217f61a76..e1975e248 100644 --- a/src/net/java/sip/communicator/impl/gui/customcontrols/wizard/WizardPanelNotFoundException.java +++ b/src/net/java/sip/communicator/impl/gui/customcontrols/wizard/WizardPanelNotFoundException.java @@ -4,7 +4,6 @@ * Distributable under LGPL license. * See terms of license at gnu.org. */ - package net.java.sip.communicator.impl.gui.customcontrols.wizard; /** @@ -13,9 +12,11 @@ * * @author Yana Stamcheva */ -public class WizardPanelNotFoundException extends RuntimeException { - - public WizardPanelNotFoundException() { - super(); +public class WizardPanelNotFoundException + extends RuntimeException +{ + private static final long serialVersionUID = 0L; + + public WizardPanelNotFoundException() { } } \ No newline at end of file