[sc1.0-cvs] CVS update: /sip-communicator-1-0-draft/src/net/java/sip/communicator/impl/gui/main/

yanas at dev.java.net yanas at dev.java.net
Fri Feb 24 11:34:09 CET 2006


User: yanas   
Date: 2006/02/24 02:34:09

Log:
 MetaContactListService integrated

File Changes:

Directory: /sip-communicator-1-0-draft/src/net/java/sip/communicator/impl/gui/main/
===================================================================================

File [changed]: CommunicatorMain.java
Url: https://sip-communicator-1-0-draft.dev.java.net/source/browse/sip-communicator-1-0-draft/src/net/java/sip/communicator/impl/gui/main/CommunicatorMain.java?r1=1.15&r2=1.16
Delta lines:  +6 -53
--------------------
--- CommunicatorMain.java	16 Feb 2006 12:52:36 -0000	1.15
+++ CommunicatorMain.java	24 Feb 2006 10:34:07 -0000	1.16
@@ -10,7 +10,6 @@
 import java.io.File;
 import java.net.MalformedURLException;
 
-import javax.swing.ImageIcon;
 import javax.swing.JOptionPane;
 import javax.swing.UIManager;
 import javax.swing.plaf.metal.MetalLookAndFeel;
@@ -18,6 +17,7 @@
 
 import net.java.sip.communicator.impl.gui.main.configforms.ConfigurationFrame;
 import net.java.sip.communicator.impl.gui.main.utils.ImageLoader;
+import net.java.sip.communicator.service.contactlist.MetaContactListService;
 
 import com.l2fprod.gui.plaf.skin.Skin;
 import com.l2fprod.gui.plaf.skin.SkinLookAndFeel;
@@ -33,7 +33,7 @@
 
     private MainFrame mainFrame;
 
-    // private MetaContactListService contactList;
+    private MetaContactListService contactList;
 
     public CommunicatorMain() {
 
@@ -41,8 +41,7 @@
 
         ConfigurationFrame configFrame = new ConfigurationFrame();
 
-        mainFrame = new MainFrame(this.getUser(),
-                getContactList());
+        mainFrame = new MainFrame(this.getUser());
 
         mainFrame.setConfigFrame(configFrame);
 
@@ -51,46 +50,6 @@
                 ImageLoader.getImage(ImageLoader.SIP_LOGO));
     }
 
-    /**
-     * To be removed after the real contact list is implemented.
-     */
-    public ContactList getContactList() {
-
-        ContactList clist = new ContactList();
-
-        ContactItem citem1 = new ContactItem("Ivancho");
-        ContactItem citem2 = new ContactItem("Traiancho");
-        ContactItem citem3 = new ContactItem("Glupancho");
-
-        citem1.setUserIcon(new ImageIcon(ImageLoader
-                .getImage(ImageLoader.USER_ONLINE_ICON)));
-        citem2.setUserIcon(new ImageIcon(ImageLoader
-                .getImage(ImageLoader.USER_ONLINE_ICON)));
-        citem3.setUserIcon(new ImageIcon(ImageLoader
-                .getImage(ImageLoader.USER_ONLINE_ICON)));
-
-        citem1
-                .setPhoto(ImageLoader
-                        .getImage(ImageLoader.DEFAULT_CHAT_USER_PHOTO));
-        citem2
-                .setPhoto(ImageLoader
-                        .getImage(ImageLoader.DEFAULT_CHAT_USER_PHOTO));
-        citem3
-                .setPhoto(ImageLoader
-                        .getImage(ImageLoader.DEFAULT_CHAT_USER_PHOTO));
-
-        clist.addContact(citem1);
-        clist.addContact(citem2);
-        clist.addContact(citem3);
-
-        citem1.setProtocolList(new String[] { "SIP", "ICQ",
-                "MSN" });
-        citem2.setProtocolList(new String[] { "ICQ" });
-        citem3.setProtocolList(new String[] { "SIP", "ICQ",
-                "MSN" });
-
-        return clist;
-    }
 
     public User getUser() {
 
@@ -214,10 +173,4 @@
         return mainFrame;
     }
 
-    /*
-     * public void setContactList(MetaContactListService contactList) {
-     * this.contactList = contactList;
-     * 
-     * this.mainFrame.setContactList(contactList); }
-     */
 }

File [changed]: MainTabbedPane.java
Url: https://sip-communicator-1-0-draft.dev.java.net/source/browse/sip-communicator-1-0-draft/src/net/java/sip/communicator/impl/gui/main/MainTabbedPane.java?r1=1.4&r2=1.5
Delta lines:  +7 -3
-------------------
--- MainTabbedPane.java	5 Feb 2006 19:25:02 -0000	1.4
+++ MainTabbedPane.java	24 Feb 2006 10:34:07 -0000	1.5
@@ -33,15 +33,15 @@
 	

 	private DialPanel dialPanel = new DialPanel();

 	

-	private ContactListPanel clistPanel;

+	private ContactListPanel contactListPanel;

 	

 	public MainTabbedPane(MainFrame parent){		

 	

-		clistPanel = new ContactListPanel(parent);

+		contactListPanel = new ContactListPanel(parent);

 		

 		dialPanel.setPhoneNumberCombo(parent.getCallPanel().getPhoneNumberCombo());

 				

-		this.addTab(Messages.getString("contacts"), clistPanel);

+		this.addTab(Messages.getString("contacts"), contactListPanel);

 		this.addTab(Messages.getString("callList"), new JPanel());

 		this.addTab(Messages.getString("dial"), dialPanel);

 	}

@@ -52,5 +52,9 @@
 	

 		super.paint(g);

 	}

+

+    public ContactListPanel getContactListPanel() {

+        return contactListPanel;

+    }

 

 }


File [changed]: ContactRightButtonMenu.java
Url: https://sip-communicator-1-0-draft.dev.java.net/source/browse/sip-communicator-1-0-draft/src/net/java/sip/communicator/impl/gui/main/ContactRightButtonMenu.java?r1=1.2&r2=1.3
Delta lines:  +4 -3
-------------------
--- ContactRightButtonMenu.java	5 Feb 2006 19:24:58 -0000	1.2
+++ ContactRightButtonMenu.java	24 Feb 2006 10:34:07 -0000	1.3
@@ -25,6 +25,7 @@
 import net.java.sip.communicator.impl.gui.main.message.MessageWindow;
 import net.java.sip.communicator.impl.gui.main.utils.Constants;
 import net.java.sip.communicator.impl.gui.main.utils.ImageLoader;
+import net.java.sip.communicator.service.contactlist.MetaContact;
 
 public class ContactRightButtonMenu extends JPopupMenu implements
 		ActionListener {
@@ -61,11 +62,11 @@
 			Messages.getString("viewHistory"),
 			new ImageIcon(ImageLoader.getImage(ImageLoader.HISTORY_16x16_ICON)));
 
-	private ContactItem contactItem;
+	private MetaContact contactItem;
 
 	private MainFrame mainFrame;
 
-	public ContactRightButtonMenu(MainFrame mainFrame, ContactItem contactItem) {
+	public ContactRightButtonMenu(MainFrame mainFrame, MetaContact contactItem) {
 		super();
 
 		this.mainFrame = mainFrame;
@@ -174,7 +175,7 @@
 			MessageDialog warning = new MessageDialog(this.mainFrame);
 			
 			String message =  "<HTML>Are you sure you want to remove <B>"
-								+ this.contactItem.getNickName()
+								+ this.contactItem.getDisplayName()
 								+"</B><BR>from your contact list?</html>";
 			
 			warning.setMessage(message);

File [changed]: MainFrame.java
Url: https://sip-communicator-1-0-draft.dev.java.net/source/browse/sip-communicator-1-0-draft/src/net/java/sip/communicator/impl/gui/main/MainFrame.java?r1=1.8&r2=1.9
Delta lines:  +7 -9
-------------------
--- MainFrame.java	23 Feb 2006 15:35:26 -0000	1.8
+++ MainFrame.java	24 Feb 2006 10:34:07 -0000	1.9
@@ -59,8 +59,6 @@
 

 	private QuickMenu quickMenu;

 

-	private ContactList contactList;

-

 	private User user;

 

     private Map supportedOperationSets;

@@ -72,11 +70,9 @@
     

     private OperationSetPresence presence;

 

-	public MainFrame(User user, ContactList contactList) {

-		

-		this.user = user;

+    private MetaContactListService contactList;

 

-		this.contactList = contactList;

+	public MainFrame(User user) {

 		

 		callPanel = new CallPanel(this);

 		tabbedPane = new MainTabbedPane(this);

@@ -121,14 +117,16 @@
 		return callPanel;

 	}

 

-	public ContactList getContactList() {

+	public MetaContactListService getContactList() {

 		

 		return this.contactList;

 	}

 

-	public void setContactList(ContactList contactList) {

+	public void setContactList(MetaContactListService contactList) {

 		

 		this.contactList = contactList;

+        

+        this.tabbedPane.getContactListPanel().setContactList(contactList);

 	}

 

 	public User getUser() {





---------------------------------------------------------------------
To unsubscribe, e-mail: cvs-unsubscribe at sip-communicator-1-0-draft.dev.java.net
For additional commands, e-mail: cvs-help at sip-communicator-1-0-draft.dev.java.net





More information about the commits mailing list